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
982 stars 1.18k forks source link

[Bug]: Deletion requests are added to the log with the date written with user's native number system instead of with Arabic numbers #5266

Open Jonteemil opened 11 months ago

Jonteemil commented 11 months ago

Summary

When the user's native number system is another than Arabic (0-9), any user nominating a file or any other page for deletion add these to the logs with the date written in their number system, for example for example Commons:Deletion_requests/২০২৩/০৭/০৬. And here are the rest I've found. In these pages the pattern is the same but instead of Arabic numbers, there are two with Bengali numbers and the rest with Persian Arabic numbers. The creation of these pages all have the //android app edit// tag and the users probably have another number system than the Arabic one 1-9 resulting in non-Arabic numbers incorrectly being used. So instead of these users adding the deletion request to the normal logs, they add it to the log based on their number system.

Steps to reproduce

Not having the app or an Android myself I would suspect the way to reproduce would be:

  1. Have a native number system other than Arabic (i.e. Bengali och Persian Arabic)
  2. Open the app
  3. Nominate a page for deletion

Expected behaviour

The deletion request is transcluded to the log based on Arabic numbers no matter what native number system the user has, so for today it's Commons:Deletion_requests/2023/08/07

Actual behaviour

The deletion request is transcluded to the log based on the user's native number system, so Commons:Deletion_requests/2023/08/07 if it's Arabic, Commons:Deletion_requests/۲۰۲۳/۰۸/۰۷ if it's Persian Arabic and Commons:Deletion_requests/২০২৩/০৮/০৭ if it's Bengali.

Device name

-

Android version

-

Commons app version

-

Device logs

-

Screen-shots

-

Would you like to work on the issue?

Prefer not

nicolas-raoul commented 11 months ago

Thanks for spotting and reporting this!

whym commented 10 months ago

The date seems to be in the default locale indeed. So the fix should be using English or something similar instead. https://github.com/commons-app/apps-android-commons/blob/a620cc9de686687e160ce51c373b10a0886c7421/app/src/main/java/fr/free/nrw/commons/delete/DeleteHelper.java#L95-L96

safan41 commented 3 months ago

I can see what works best to allow Bengali numbers to work better.