Closed yhdgms1 closed 1 year ago
I think the following should be done:
@novely/t9n
. I can include its functionality in @novely/core
, make a separate exportinternal
, and create a separate function which fill omit internal translationsLike
const { t, te /** better name needed */ } = novely(...);
t('internal:Settings') // ok
te('internal:Settings') // error
t('User translation key') // ok
te('User translation key') // ok
or keep t
for user translations, and create a ti
- translate internal
or use t
, and i
const { t, i } = novely({
t9n: createT9N({
ru: {
pluralization: {},
internal: {
...RU_TRANSLATION,
'Settings': 'Открыть Настройки'
},
strings: {
'Settings': 'Что-то не связанное с Novely'
}
},
}),
});
t('Settings') // 'Что-то не связанное с Novely'
i('Settings') // 'Открыть Настройки'
Снова должна быть изменена система сохранений - язык должен храниться отдельно от сохранения, также требуется сделать функцию novely
асинхронной, т.к. для получения языка должна выполняться асинхронная операция, или можно придумать другой способ отрисовки после получения языка.
This is Done now, however the only renderer is not done yet.
At the moment, the
@novely/t9n
module is used for translation. It does not require the initial translation values.@novely/core