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

Apply existing translation for the data page #587

Open
wbazant opened this issue Nov 14, 2024 · 0 comments
Open

Apply existing translation for the data page #587

wbazant opened this issue Nov 14, 2024 · 0 comments
Labels
Milestone

Comments

@wbazant
Copy link
Collaborator

wbazant commented Nov 14, 2024

Part of #538.

The /data shows content that used to be spread through /data and /datasets on the live site. See how the translation keys are used on the live site: https://fallingfruit.org/data?i18n_viz=1
https://fallingfruit.org/datasets?i18n_viz=1

Implementation steps:

  1. Replace English with translation keys in the component file
    The file to change is src/components/about/DataPage.js.

To test, we expect our helper script to say all of these translation keys which we see on hover under i18n_viz=1 in the live site, are in the component file - run this command:

python3 scripts/translation_manager.py  --component_path src/components/about/DataPage.js --list-in-component
  1. Move the keys between locale files

We have a script for this:

python3 scripts/translation_manager.py --component_path src/components/about/DataPage.js --json_folder public/locales/ --yaml_folder ../falling-fruit/config/locales --migrate
  1. Compare content

Now you can look at the localhost vs. beta site, and localhost vs. live site, in English and French. The content should be the same!

You can just look at them, or also, comparing text is a good trick - switch to Reader View, copy text from the site, save to a text file, and compare as text files.

  1. Submit for review

Don't add any keys yourself in this issue since we will do that later - leave English in the source code, and optionally you can make a new issue that reminds us, but we'll do that later.

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

No branches or pull requests

1 participant