Ghost/ghost/i18n
Ronald Langeveld 4fcaabe563
Added initial i18n implementation for Signup-form (#16914)
closes https://github.com/TryGhost/Team/issues/3307

This commit includes several important updates to add internationalisation (i18n) support within the signup form package:

- Modified the translate script in `package.json` to include translations for the signup form.
- Added a new test for the signup form resources in `i18n.test.js`.
- Updated `tsconfig.json` to allow synthetic default imports.
- Made updates to `package.json`, including adding a prebuild command for `@tryghost/i18n` to ensure typescript declaration files get built.
- added `vite-plugin-commonjs` so we can bundle commonjs packages to be useable by the browser.
- In `App.tsx`, imported the `i18n` library and created an `i18n` instance for the `signup-form` namespace. This `i18n` instance's `t` function was added to the application context.
- Updated the `AppContextType` in `AppContext.ts` to include the `t` function from i18n​

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-06-02 11:02:52 +02:00
..
lib Added typescript declerations to i18n (#16894) 2023-05-31 10:37:21 +02:00
locales Added initial i18n implementation for Signup-form (#16914) 2023-06-02 11:02:52 +02:00
test Added initial i18n implementation for Signup-form (#16914) 2023-06-02 11:02:52 +02: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 initial i18n implementation for Signup-form (#16914) 2023-06-02 11:02:52 +02:00
README.md Added i18n package 2023-01-18 13:54:14 +01:00
tsconfig.json Added initial i18n implementation for Signup-form (#16914) 2023-06-02 11:02:52 +02: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