commons-app / apps-android-commons

The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons
https://commons-app.github.io/
Apache License 2.0
1.03k stars 1.23k forks source link

Tutorial display unicode error in french #5821

Closed PetitPotiron closed 2 months ago

PetitPotiron commented 2 months ago

Summary

When displaying the tutorial in the french version of the app, the bullet lists don't show well : •  instead of is shown.

See the screenshots for more information.

Steps to reproduce

  1. Change the app user interface language to french in the settings
  2. Quit the settings and open the tutorial
  3. Slide right and observe

Expected behaviour

Only a bullet is shown :

Actual behaviour

A bullet and some other caracters are shown : •  

Device name

Samsung A40

Android version

Android 11

Commons app version

4.2.1

Device logs

No response

Screen-shots

Screenshot_20240907-172204_Commons Screenshot_20240907-172536_Commons

Would you like to work on the issue?

Prefer not

nicolas-raoul commented 2 months ago

Could anyone please check whether the problem comes from the French localization on TranslateWiki?

rohit9625 commented 2 months ago

The issue is not from TranslateWiki but in the localization file for bullet points. Linking a PR :)

nicolas-raoul commented 2 months ago

Very strangely I can't find bullet in TranslateWiki:

Screenshot 2024-09-09 at 17 22 05

... despite the source XML file (English) being:

  <string name="preference_category_feedback">Feedback</string>
  <string name="preference_category_privacy">Privacy</string>
  <string name="app_name">Commons</string>
  <string name="bullet">&#8226;</string>
  <string name="menu_settings">Settings</string>
  <string name="intent_share_upload_label">Upload to Commons</string>
  <string name="upload_in_progress">Upload in progress</string>

It does not seem to be an ordering issue, I don't find this bullet anywhere in the TranslateWiki list. If anyone finds it please let us know. :-) It seems to have been localized to various forms:

$ grep -R bullet app/src/main/res/values*
app/src/main/res/values/strings.xml:  <string name="bullet">&#8226;</string>
app/src/main/res/values-ar/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-as/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ast/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-b+roa+tara/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-b+sr+Latn/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ba/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ban/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-bg/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-bn/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-br/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-cs/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-cy/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-da/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-de/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-diq/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-el/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-eo/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-es/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-eu/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-fa/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-fi/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-fr/strings.xml:  <string name="bullet">•&#32;</string>
app/src/main/res/values-gl/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-hi/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-hr/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-hu/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-in/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-is/strings.xml:  <string name="bullet">•  \\</string>
app/src/main/res/values-it/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-iw/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ja/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ji/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-jv/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ka/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ko/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ko-rKP/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ku/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-kum/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-lb/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-li/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-lt/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-lv/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-mk/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-mni/strings.xml:  <string name="bullet">꯫</string>
app/src/main/res/values-mnw/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-mr/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-my/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-nb/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ne/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-nl/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-pl/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-pms/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ps/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-pt/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-pt-rBR/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ro/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ru/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-sd/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-sk/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-skr/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-sl/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-sr/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-su/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-sv/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ta/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-tcy/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-te/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-th/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-tr/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-ug/strings.xml:  <string name="bullet">.</string>
app/src/main/res/values-uk/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-vi/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-zgh/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-zh/strings.xml:  <string name="bullet">•</string>
app/src/main/res/values-zh-rTW/strings.xml:  <string name="bullet">•</string>
rohit9625 commented 2 months ago

I found this bullet resource marked as optional on the Gerrit: image

nicolas-raoul commented 2 months ago

Very interesting! I am honestly not sure what it means or why it was added there... does Gerrit history say something about that line?

rohit9625 commented 2 months ago

This is the PR that added that bullet resource as optional and said it's not an English-specific resource because bullet points are the same in every language.

https://gerrit.wikimedia.org/r/c/translatewiki/+/491958

I think the resource will not get overridden by the translate wiki.

nicolas-raoul commented 2 months ago

Great finding!

TranslateWiki maintainers have a lot of experience with languages, we can trust them that not localizing bullets is OK.

Then the right thing to do is to hard-code the bullets and remove them from localization files.

The same goes for any other string in the same situation, though that can be a separate issue&PR. For the licenses I am a bit surprised... when a Japanese person uploads a picture via the Commons website, do they see the licenses in English or Japanese?

rohit9625 commented 2 months ago

Should I remove all bullet string resources and hard code them where they are needed?

nicolas-raoul commented 2 months ago

@rohit9625 Yes 🙂

rohit9625 commented 2 months ago

Done :+1: Mr. @nicolas-raoul