Commit Graph

6 Commits

Author SHA1 Message Date
renovate[bot]
3737788d75 Update dependency i18next to v22.4.9 2023-01-19 17:58:16 +00:00
Daniel Lockyer
1f32a7be8a
Added CI test to ensure i18n strings are extracted out
refs https://github.com/TryGhost/Ghost/issues/15502

- this will test if we have strings that aren't present in the JSON
  files in CI, so we don't miss out on translations
2023-01-19 16:20:55 +01:00
Daniel Lockyer
fbbea1c8a1
Configured i18next-parser settings
refs https://github.com/TryGhost/Ghost/issues/15502

- prevent it from creating `_old` files
- set JSON indentation to 4 spaces
2023-01-18 18:29:54 +01:00
Daniel Lockyer
2cf161168b
Added yarn translate:portal command
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
2023-01-18 18:23:53 +01:00
Daniel Lockyer
fb030353fe
Moved i18n translations into JSON files
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
2023-01-18 17:03:22 +01:00
Daniel Lockyer
0d9268ad86 Added i18n package
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 :)
2023-01-18 13:54:14 +01:00