-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix logging in i18n #445
Conversation
src/core/prelude/i18n/helpers.ts
Outdated
@@ -91,13 +94,13 @@ export function i18nFactory( | |||
* console.log(examplePluralize); // '5 products' | |||
* ``` | |||
*/ | |||
export function resolveTemplate(value: Translation, params?: I18nParams, opts: I18nOpts = {}): string { | |||
export function resolveTemplate(value: Translation, params?: I18nParams, opts: I18nOpts = {}, meta?: I18nMeta): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Как то дохрена аргументов выходит. Я уже запутался.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Например, почему meta нельзя сделать частью opts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kobezzza
opts - для настройки перевода. Например прокинуть правила плюрализации или настройки формата чисел.
meta - мета информация о текущем переводе. Язык, кейсеты, ключ и т.д.
meta никак не влияет на логику переводов, поэтому посчитал странным делать это частью opts.
В перспективе больше параметров появляться не должно.
This reverts commit 382b424.
No description provided.