Ghost/ghost/i18n
Cathy Sarisky 1196688b0e
🌐 Improved i18n support for Portal error messages (#21190)
no ref

Expose (some) Portal error strings for translations

💩This is a somewhat hacky (but test-passing and individual inspection
passing) solution to the way Portal handles errors. Or rather, the
half-dozen ways Portal handles errors.

Passing 't' around with context and state, and occasionally recreating
it from the site object. Yes, I am also somewhat horrified, but a better
implementation will need a major rewrite of Portal.

Addresses errors in both the popover React app and in the
data-attributes.

There are probably more. Since Portal exposes raw API responses in some
places, it's hard to enumerate everything that /might/ end up being
client-facing, but at least I've gotten the ones that I've commonly
seen.

Improvements very welcome.
2024-10-03 13:35:23 +00:00
..
lib 🌐 Added Kazakh locale and translations (#21174) 2024-10-01 21:45:03 +00:00
locales 🌐 Improved i18n support for Portal error messages (#21190) 2024-10-03 13:35:23 +00:00
test Improved i18n tests to include commits with missing i18n.js entries (#21175) 2024-10-01 15:04:21 -05:00
.eslintrc.js Added i18n package 2023-01-18 13:54:14 +01:00
generate-context.js Added locales/context.json to help with translating 2023-03-23 16:29:59 +01:00
i18next-parser.config.js Added support for namespaces to i18n package 2023-03-01 10:24:08 +01:00
index.js Added i18n package 2023-01-18 13:54:14 +01:00
package.json Added i18n support to search - ready for translator work! (#21055) 2024-09-24 12:39:32 +01:00
README.md Added i18n package 2023-01-18 13:54:14 +01:00

i18n

i18n translations for Ghost

Develop

This is a monorepo package.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Test

  • yarn lint run just eslint
  • yarn test run lint and tests