Skip to content

Conversation

@madhurgupta10
Copy link
Collaborator

Description
Fixes #4583 Empty default lang bug

Tests performed
Tested betaDebug on Pixel 5 with API level 30

@misaochan
Copy link
Member

misaochan commented Sep 6, 2021

Hi @madhurgupta10 , unfortunately the issue for me is not solved. :(

I notice that it seems to mostly happen when instanceOf is being used (because the item has no Wikidata description). For instance, see the screenshot below:

Screenshot_20210907-013754_Commons

And then look at https://www.wikidata.org/wiki/Q19873498 . So the desc should say "historic site", but on our app it says "historische Stätte in Australien" (which I presume is German).

@madhurgupta10
Copy link
Collaborator Author

@misaochan Could you please try this (not a solution but a check) and let me know if it solves the issue

Go To Settings < Scroll to App user interface language < Tap on English (even if it is already selected)

Then try the nearby again

@madhurgupta10
Copy link
Collaborator Author

@misaochan I did some digging for this issue, I can confirm that the request and response are both completed in the lang "en" It seems like that the backend is providing this result

image

@misaochan
Copy link
Member

misaochan commented Sep 7, 2021

@misaochan Could you please try this (not a solution but a check) and let me know if it solves the issue

Go To Settings < Scroll to App user interface language < Tap on English (even if it is already selected)

Then try the nearby again

I tried this, does not solve the problem for me.

@misaochan I did some digging for this issue, I can confirm that the request and response are both completed in the lang "en" It seems like that the backend is providing this result

Hmm, sorry if I'm missing something... I understand that this is the current longDescription, but we don't get longDescription directly from the backend. It is a concatenation of the label and either the description (if there is a description), or the instanceOf (if there is no description).

So we do get the instanceOf from the backend in this case... but we've been getting instanceOf from the backend for a long time, and it has previously said "historic site" for me. This issue is fairly recent.

If you go to the coordinates for https://www.wikidata.org/wiki/Q19873498 (check the Wikidata coords, then use them in your emulator), what do you see in our app for that item? Does it also say "historische Stätte in Australien" for you?

@madhurgupta10
Copy link
Collaborator Author

If you go to the coordinates for https://www.wikidata.org/wiki/Q19873498 (check the Wikidata coords, then use them in your emulator), what do you see in our app for that item? Does it also say "historische Stätte in Australien" for you?

Yes

@madhurgupta10
Copy link
Collaborator Author

So we do get the instanceOf from the backend in this case... but we've been getting instanceOf from the backend for a long time, and it has previously said "historic site" for me. This issue is fairly recent.

I did a careful research on this issue, I found out that earlier we were using item.getClassLabel().getValue() instead of description (see the 2nd screenshot below) that is why "historic site" was displayed instead of "historische Stätte in Australien" I can confirm this with the following test where I changed back to item.getClassLabel().getValue() and got the following result

Screenshot 2021-09-07 215214

@madhurgupta10
Copy link
Collaborator Author

madhurgupta10 commented Sep 7, 2021

The API gives us "de" instead of "en" for description that is why we are getting wrong lang

image

One way to solve this is to use back "classLabel" instead of "description"

@misaochan
Copy link
Member

Interesting discovery, thanks for looking into it @madhurgupta10 ! I wonder why this only happens for some descriptions and not for others... the majority of the descriptions are still in English.

@nicolas-raoul could you weigh in on this please?

@nicolas-raoul
Copy link
Member

Screen Shot 2021-09-08 at 08 30 06

The only solution would be for someone to write descriptions in English. Until there is an English description, we should continue using a description in another language, which might or might not be readable by the user but is better than nothing in my opinion. Like everything in Wikimedia, people will probably only start writing descriptions when they see a need for it.

@misaochan misaochan merged commit 174b476 into commons-app:3.1-release Sep 10, 2021
@misaochan
Copy link
Member

Merging this anyway as it fixes a separate bug. Thanks!

@madhurgupta10 madhurgupta10 deleted the fix4583 branch September 10, 2021 13:04
misaochan added a commit that referenced this pull request Sep 16, 2021
* Cherry-Picked NPE fix from master (#4569)

* Fix notification bug #4547 (#4570)

* Make Single Query for Nearby and WLM pins (#4573)

* Merge nearby and monument queries

* Bug Fix- query resource path change on shouldQueryForMonuments

* Bug Fixes
1. Propagate exceptions for nearby API calls to caller
2. Fix too much work on main thread exception in NearbyParentFragment

* Modify parameters for Nearby query

* Bug fix- current location marker (#4580)

* Move WLM template below geolocation template (#4582)

* Modify string for WLM upload notice

* Fix bug #4583 (#4591)

* Fix bug #4585 by updating kotlin and acra version (#4592)

* Fixes #4554 - only use WLM2021 template for countries that are included in it (#4574)

* Fixes #4554
1. For WLM uploads reverse geo code and see if the country code is supported -only then is the WLM upload flow triggered, otherwise usual nearby uploads happen
2. Bug Fix - Current Location marker and area

* Fixed compile error added after rebasing

* Bug fix for country code in reverse geo code

* Update WLM camaign dates [Do not merge now, merge only after alpha release] (#4584)

* Updates dates for WML campaign

* Bug fix- campaign dates

* Fixed logic for WLM enablement - stick to the month of September

* Add countries supported by WLM2021 template, except Italy

* Versioning for v3.1.0

* Update changelog.md

* Fix empty default lang bug (#4608)

* Fix bug #4583

* Fix empty default lang bug

* Fixes #4595 - Updated nearby query (#4622)

* Fixes #4595 - Updated nearby query

* Removed logic to replace local language in nearby query - that might acccidentally replace other strings

* Fetch property location in usual nearby query

* Remove duplicate line (#4626)

* Change "learn more" link to new wiki

* Add Sweden's P3426 to property filter

* Fixes #4601 - 1. Handle possible exceptions in upload file from stash 2. Modify MWException, as error is nullable, update getTitle and getMessage to rever that (#4627)

* Versioning for v3.1.1

* Update changelog.md

* Updated DB version to rever integrity

Co-authored-by: Madhur Gupta <30932899+madhurgupta10@users.noreply.github.com>
Co-authored-by: Josephine Lim <josephinelim86@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants