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 the existing translations in the location page #488

Open
wbazant opened this issue Oct 8, 2024 · 1 comment
Open

Apply the existing translations in the location page #488

wbazant opened this issue Oct 8, 2024 · 1 comment
Labels
Milestone

Comments

@wbazant
Copy link
Collaborator

wbazant commented Oct 8, 2024

This issue is related to #487 (and the ultimate goal is to translate the whole site).

Change the language to French, then go to a page like http://localhost:3000/locations/1989712. There are many untranslated lines, for example "Fruiting status" is still in English.

We already have translations for many of the strings on the old site, for example, that one is at locations.form.fruiting_status, which I can see here: https://github.com/falling-fruit/falling-fruit/blob/main/config/locales/en.yml#L231

We want to leverage the translations which we already have. It could be good to use AI translations for a first pass since they're great in 2024, but we'd like to figure out a workflow for them - maybe a query to the language model with a glossary for a reference - so try to solve the issue with the ultimate goal in mind.

Relatedly, switching the locale to French, and putting any English words into the little command line program ag is a great way to find out where in the source code to make changes:


wbazant@wbazant-19-01:~/dev/falling-fruit-web$ ag 'Summary'
...
src/components/entry/ReviewSummary.js
...
141:      <h3>Summary</h3>
...
wbazant@wbazant-19-01:~/dev/falling-fruit-web$ ag 'Fruiting status'
src/components/form/ReviewForm.js
64:      label="Fruiting status"
wbazant@wbazant-19-01:~/dev/falling-fruit-web$ ag 'Added by'
public/locales/en.json
19:  "added_by": "Added by {{name}}",
@wbazant wbazant added the good first issue Good for newcomers label Oct 8, 2024
@ezwelty
Copy link
Collaborator

ezwelty commented Oct 8, 2024

I'll reiterate this point: We want to leverage the translations which we already have.

The current website (https://fallingfruit.org) has been translated by humans in 10 languages. That locale data is available at https://github.com/falling-fruit/falling-fruit/tree/main/config/locales

The keys can be found in-situ on the old website by using this link:
https://fallingfruit.org/?i18n_viz=1
And navigating around and hovering over text snippets.

When migrating over these existing translations, use the same exact key names as used by the old website, so that we can benefit from the existing translations.

p.s. I'll also add that when possible, try to remove the need for words with good styling. Because words need to be translated...

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

2 participants