Closed kaljarv closed 1 month ago
New thing to consider:
Translation key
+ Translated string
A question is how should we define the target language: as a part of the key, as its own field, or have the translated string be a LocalizedString
json object?
Remove all localisation stuff from Strapi so as not to mix things up.
Check that all of the translation keys in all locales (and fields in
App Labels
) match, before merging intomain
. Better yet, define the content type dynamically to always all appropriate keys from the translations, but this maybe limited to only those that are mostly frequently edited if exposing all of them is unwarranted.Consider also adding a check that confirms that all separate translations files are included in the
keys
list ini18n/translations/index.ts
Consider also if we can automatically generate a translation key string literal type so we get code completion for
$t(key: AutoGeneratedTranslationKeyType)
.One challenge is that the
json
translation files currently have multiple levels of hierarchy, which might be an issue for Strapi's Content Type – Component – Field model.