refs https://ghost.slack.com/archives/C02G9E68C/p1692784819620269
refs https://github.com/TryGhost/Product/issues/3504
- Somehow, when using i18n in TypeScript, the require will put some of the keys into 'default' and not into the root. Mainly all keys that have a space in them. Couldn't find any documentation about this
- The solution is to also add 'default' to the keys that are being used in the code
This change also fixes the translate script (wasn't updated for updated paths), includes the missing translations, and already adds comments to lookup translation strings
fixes https://github.com/TryGhost/Ghost/issues/17715
- `ja` was missing from the list of supported locales
- also fixes some small typos discovered now the language is supported
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
refs https://github.com/TryGhost/Team/issues/3307
Added TypeScript support and a new namespace for the `i18n` module. This
enables type checking and localisation for the new signup form component and future typescript projects that may need to add i18n support.
refs https://github.com/TryGhost/Team/issues/2795
- this helps reduce conflicts when multiple PRs are coming in to add new
languages
- I'd also like to enforce alphabetically sorted keys but I can't figure
out the magic eslint incantation yet
refs https://github.com/TryGhost/Ghost/issues/15502
- this adds the scaffolding for enabling i18n translations within Ghost
core
- also adds `yarn translate:ghost` as an option to the `i18n` package
- the locale is currently hardcoded to `en` so we don't utilize the
translations until we're ready
refs https://github.com/TryGhost/Ghost/issues/15502
- the amazing `i18next-parser` dependency will extract our translated
strings from Portal and dump them into locale files, so we never have
to add them manually
refs https://github.com/TryGhost/Ghost/issues/15502
- plain JSON files are cleaner and less overwhelming than boilerplate JS
files, and given they're going to be automatically generated, we
probably won't be able to support comments anyway
refs https://github.com/TryGhost/Ghost/issues/15502
- this is an early implementation of an i18n provider by
exporting an instance of `i18next`
- there's a lot more to be done here but baby steps :)