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

"Multiple substitutions specified in non-positional format of string resource" warnings #5774

Open nicolas-raoul opened 1 month ago

nicolas-raoul commented 1 month ago

I see these warnings when building a fresh clone:

app/src/main/res/values-zh-rTW/strings.xml:628:2: Multiple substitutions specified in non-positional format of string resource string/wikipedia_instructions_step_6. Did you mean to add the formatted="false" attribute?
app/src/main/res/values-sl/strings.xml:111:2: Multiple substitutions specified in non-positional format of string resource string/contribution_state_in_progress. Did you mean to add the formatted="false" attribute?
app/src/main/res/values-sl/strings.xml:620:2: Multiple substitutions specified in non-positional format of string resource string/wikipedia_instructions_step_6. Did you mean to add the formatted="false" attribute?
sivaraam commented 1 month ago

I raised an MR #5776 to handle this. Kindly check @nicolas-raoul Let me know your thoughts about testing the change visually.

Also, handled one of the cases by editing the translatewiki entry. Let me know if that looks good.

nicolas-raoul commented 1 month ago

No idea either where it is used, the copy the wikitext to the clipboard button does not seem to use it.

How about trying to remove these strings? Either they can be removed without impacting anything, or we will learn where they are used. :-) Removing app/src/main/res/layout/dialog_add_to_wikipedia_instructions.xml makes compilation fail without saying why. :-/

sivaraam commented 1 month ago

I think the same was introduced via #3783 which is a PR that fixes #872. So, I think we need a Nearby uploaded image to cross-check if that functionality works fine or not. Would you be able to cross check this, Nicolas?

nicolas-raoul commented 1 month ago

I just uploaded a picture via Nearby but do not see the Wikipedia icon:

Screenshot_20240725-215633.png

I remember seeing such an icon in the past though.