-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n Milestone 2: Framework and build tools #15502
Comments
Portal is now officially part of the monorepo and the dev workflow is working really well. By default Would love to get some volunteers to start wiring up i18next. |
refs #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 :)
refs #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 :)
refs #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 #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 #15502 - prevent it from creating `_old` files - set JSON indentation to 4 spaces
refs #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
refs #15502 - needed to add the `i18n` tests so we don't lose the "Hello" test I wrote, and keeping everything under one command is easier
refs #15502 - this adds the package to Portal and integrates it into the state we pass around - note: I've currently left the detection of the language (`site.locale`) commented for now until we flesh more of the implementation out
refs #15502 - in the event the value is an empty string, we want to return the key - this config option enables that
refs #15502 - this allows use of the `t` function whilst running tests
refs #15502 - in order to use the translations, strings must be wrapped in the `t` function, which is passed through AppContext - whilst I haven't instrumented all public strings, the vast majority are done here and the strings have been brought into the JSON locale files using `yarn translate:generate`
refs #15502 - in order to use the translations, strings must be wrapped in the `t` function, which is passed through AppContext - whilst I haven't instrumented all public strings, the vast majority are done here and the strings have been brought into the JSON locale files using `yarn translate:generate`
refs #15502 - this adds support for namespaces to the i18n package so we can separate translations for different packages
refs #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 #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 #15502 - this adds the i18n translation wrapper to the titles, plaintext versions and one HTML version of the member emails
refs #15502 - this commit migrates Portal from CRA to Vite, as it brings the package more inline with the direction we're going in terms of tooling for builds - the bulk of the changes here are just config related to get things working with Vite, and then cleaning up all the CRA boilerplate
refs #15502 - this adds the i18n translation wrapper to the titles, plaintext versions and one HTML version of the member emails
refs #15502 - this commit migrates Portal from CRA to Vite, as it brings the package more inline with the direction we're going in terms of tooling for builds - the bulk of the changes here are just config related to get things working with Vite, and then cleaning up all the CRA boilerplate
refs #15502 - this makes the translations files a lot nicer because they only contain one line per key
refs #15502 - this makes the translations files a lot nicer because they only contain one line per key
refs #15502 - these aren't going to change across languages so we can exclude them from the strings to simplify things
refs #15502 - these aren't going to change across languages so we can exclude them from the strings to simplify things
Hi all! 👋🏻 The tasks above has been completed and milestone 2 is complete 🙂 We're doing some testing internally and then we'll look at opening it up to translations 🕺🏻 |
This issue represents a single milestone within our i18n project. The full project is documented on the Ghost forum.
Expected structure
ghost/locales
folder in the monorepo contains namespaced JSON files e.g.locales/es/common.json
,/ocales/es/portal.json
,locales/es/email.json
Goals:
Tasks:
yarn translate es
would create/locales/es/portal.js
and/locales/es/email.js
each containing one string.I'm hoping to find people interested in the different parts to do initial spike implementations - then we can figure out the tasks more clearly.
Notes on participating & Hacktoberfest:
We aren't going to merge half-baked spikes or wiring that doesn't match the spec yet - so if you're just trying to get through Hacktoberfest as fast as possible, this is not the issue for you! (There are plenty of small bugs though!)
However, if you're using Hacktoberfest as a vehicle to find a cool & meaningful project to work on, this should be well up your street :)
We'll do our best to ensure that those who actively contribute value to this project get something merged and appropriately labelled by the end of Hacktoberfest 🎃
👉 If you're interested, drop a note to say Hi and which part you're interested in before getting stuck in, just in case we end up with multiple people trying to get the same things merged.
The text was updated successfully, but these errors were encountered: