ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

French translation

Open jo-spek opened this issue 1 year ago • 10 comments

Would it take long to implement a language switch button in the settings?

I'm happy to take the string.xml and translate everything to French if that helps. Doesn't seem to be all that much.

jo-spek avatar Aug 21 '24 17:08 jo-spek

The app currently uses the device language, but shouldn't be hard to allow users to select the language under settings. @shobhitagarwal1612 wdyt?

Translating sounds good, we should also tidy up the file a bit to make it easier to translate:

  • [ ] Clean up unused strings in strings.xml
  • [ ] Add comments describing where each string is used
  • [ ] Do actual translations

gino-m avatar Aug 22 '24 13:08 gino-m

Yes, we can add a setting to switch the language of the app. However, that won't change the language of the questions in the data collection screen since they are populated from firestore.

shobhitagarwal1612 avatar Aug 23 '24 05:08 shobhitagarwal1612

Yes, we can add a setting to switch the language of the app. However, that won't change the language of the questions in the data collection screen since they are populated from firestore.

Do you mean the questions that the survey organizer creates?

jo-spek avatar Aug 23 '24 09:08 jo-spek

Do you mean the questions that the survey organizer creates?

Yes

shobhitagarwal1612 avatar Aug 23 '24 10:08 shobhitagarwal1612

That's alright. I'm just talking about translating the GUI here. We'll have a training in Togo soon and having the GUI in French would make things a lot easier. The individual survey questions would then also be made in French by the participants. I'm halfway through translating the strings.xml. Can I just send it to you later or what's the best way to go about this?

jo-spek avatar Aug 23 '24 13:08 jo-spek

Please feel free to raise a PR.

shobhitagarwal1612 avatar Aug 23 '24 14:08 shobhitagarwal1612

Please feel free to raise a PR.

I created a new folder "values-fr" under "ground/src/main/res/" containing the translated strings.xml in my fork. The CI workflow run outputs that 'All jobs have failed'.

The errors all look like this: /home/runner/work/ground-android/ground-android/ground/src/main/res/values-fr/strings.xml:63:2: string/admin_request_access does not contain a valid string resource. /home/runner/work/ground-android/ground-android/ground/src/main/res/values-fr/strings.xml:62:2: Failed to flatten XML for resource 'agree_checkbox' with error: Invalid unicode escape sequence in string "{str}"

When uploading the original strings.xml in the same directory it passes.

Should I do a Pull Request nonetheless?

Here's the translated strings.xml: strings.zip

jo-spek avatar Aug 27 '24 10:08 jo-spek

More interest has been raised for a French translation plus also a Spanish one. Can you implement the French strings.xml already @shobhitagarwal1612?

jo-spek avatar Sep 27 '24 13:09 jo-spek

Sure. I'll use the strings.xml from https://github.com/google/ground-android/issues/2676#issuecomment-2312093838

shobhitagarwal1612 avatar Sep 27 '24 15:09 shobhitagarwal1612

For the fun of it I just started a pull request with the file in a new subfolder values-fr, since there is also values-es and values-pt. The French strings.xml is in it. Up to you if you want to merge or upload. Since there is also the Spanish and Portuguese version, can these languages also been made available for the user's choice?

jo-spek avatar Sep 27 '24 16:09 jo-spek

French translations have been added (https://github.com/google/ground-android/pull/2770) and should automatically be displayed to users with French language system locale in the next update. Closing this one and making a separate Feature request for a language switch button.

jo-spek avatar Nov 14 '24 16:11 jo-spek