Skip to content
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

WIP Translation process improvements #3268

Open
pdcp1 opened this issue Dec 6, 2024 · 0 comments
Open

WIP Translation process improvements #3268

pdcp1 opened this issue Dec 6, 2024 · 0 comments
Assignees

Comments

@pdcp1
Copy link
Collaborator

pdcp1 commented Dec 6, 2024

Pain points

1. Env variable

GATSBY_AVAILABLE_LANGUAGES=en,es,fr,ja

2. i18n config file

site/gatsby-site/i18n/config.json

3. UI translations

JSON files with the translations under the folder site/gatsby-site/i18n/locales/[language code]. E.g: site/gatsby-site/i18n/locales/ja/account.json

Improvements

  • The meta i18n page helps to identify pending translations
  • We should implement fallback to English translations when a new text lacks a translation.

4. Site language switcher

Change site/gatsby-site/src/components/i18n/LanguageSwitcher.js code adding the new language

5. Atlas rules

Add the Atlas rules file for the translations/reports_[language code] collection.

Improvements

  • We are going to leave Atlas soon ✅

6. Gatsby type definition

Add Gatsby type definition to this file: site/gatsby-site/typeDefs.js

7. Sorting option on Discover page

Add Sorting option to Discover page for each field: site/gatsby-site/src/components/discover/SORTING_LISTS.js

Improvements

8. Report translation MongoDB query

Add report translation query on site/gatsby-site/src/graphql/reports.js

Improvements

  • Change the way we store the translations. Using just one reports collection with a new document field language.
  • Change the API to use this new DB approach
  • Change the client graphql mutations

9. Blog posts translations

Not mandatory since we have translations fallback to English

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant