commons-app/apps-android-commons

SPARQL: Item label does not seem to follow configured language, "en" hard-coded

Closed this issue ยท 6 comments

https://github.com/commons-app/apps-android-commons/blob/main/app/src/main/resources/queries/query_for_item.rq#L21

Problem: "en" is hard-coded for item label

Replacing with "${LANG}" might be enough to fix the issue.

Could I have a go at this ?

After replacing, please test with various languages and post screenshots showing Nearby with a famous Wikidata item selected, for instance https://www.wikidata.org/wiki/Q243

Thanks!

I have been able to implement the required changes. But I would like to clarify the expected behaviour for testing. My understanding of the test is to select a famous Wikidata item in the nearby page and ensure that the tags with the native language is given preference. Is this correct ?

Since the explore page doesn't have a search button, I found a nearby item that had a tag in French and English. I had swapped the languages to check if the label that closely matches the user language is retrieved.

Item Wikidata

English

French:

Couple more tests were done with the Bust of Gustave Eiffel link, The langages tested were, French, Armenian, Arabic & Turkish. Before each screenshot was taken, language preference was updated and then the item was located in Nearby.

P.S: I tried real hard to locate and retrieve info about Eiffel Tower however, despite mocking the exact co-ordinates of its location, I was unable to locate / retrieve its details.

Looks great!
Would you mind sending a pull request?