-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 1 launguage order backend queries #5889
Issue 1 launguage order backend queries #5889
Conversation
Gradle fixes
…ult!. language!main/resources/Queries/query_for_item.rq, in retrieve item labels and descriptions.
…ult!. language!main/resources/Queries/query_for_item.rq, in retrieve item labels and descriptions.
…ult!. language!main/resources/Queries/query_for_item.rq, in retrieve item labels and descriptions.
…ult!. language!main/resources/Queries/query_for_item.rq, in retrieve item labels and descriptions.
…ult!. language!main/resources/Queries/query_for_item.rq, in retrieve item labels and descriptions.
…rder-backend-queries # Conflicts: # app/src/main/resources/queries/query_for_item.rq
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Sorry I am outside and can't test right now.
Would you mind describing how I should do to switch German (de) and Japanese (ja)?
Any specific reason to split primary and secondary, rather than having just one list of languages? It is fine but just curious what your thoughts are om this.
app/src/main/java/fr/free/nrw/commons/settings/SettingsFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/settings/SettingsFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/settings/SettingsFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/settings/SettingsFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/mwapi/OkHttpJsonApiClient.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/nearby/NearbyController.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/settings/SettingsFragment.java
Outdated
Show resolved
Hide resolved
Ill work on name changes and the change in the res file is unintentional sorry about that... |
Also, please rebase or merge from master. Thanks! :-) |
…queries' into issue-1-launguage-order-backend-queries
@nicolas-raoul Ive squashed merge conflicts and resolved above points. |
I am so sorry for leaving it for so long, would you mind this other conflict? Thanks a lot! |
Ill look into it |
@nicolas-raoul Sorry again for being late. Ill fix it today. |
Hi @nicolas-raoul this is (@Adeeth101) im on my alt account because I'm on my phone. A lot of the java classes I edited are now deleted and replaced kotlin versions. Not a huge deal but it does mean I basically cant auto merge and it will take some time to redo my work in kotlin. Give me another day please and thanks for the patience. |
I made a new MR, which should now be good for the updated Kotlin version of the app. |
Languages order preference UI and functionality enhancement.
Fixes #5826
What changes did you make and why?
Gradle Files:
Some fo the gradle code was outdated and didn't work on our latest emulators. I had to remove code that was no longer supported.
Preferences.XML:
Added a new preference category in the preferences UI for secondary language picking
Prefs.java was also changed to hold a serialised string of secondary language codes
Strings.XML:
Added new strings that represent additions in UI
SettingsFragments:
NearbyController and NearbyPlaces:
Injected the KV store into the controller and passed the serialised string as a new argument to the json API client in NearbyPlaces
OkHttpJsonApiClient:
changed the getPlaces method to make use of the new parameter (the serialised language code)
made stringbuilders to automatically generate further SparQL queries based on the serialised code list
(Also modified the SparQL file itself to add placeholders for the additional strings created by the method)
Tests performed (required)
Apart from extensive manual software testing, the following unit tests were created:
StringBuilderTest.java
SettingsFragmentSecondaryLanguageTests.kt
Tested {build variant, e.g. ProdDebug} on {name of device or emulator} with API level {API level}.
Screenshots (for UI changes only)
![image](https://private-user-images.githubusercontent.com/148426196/379776009-2846e1a9-a2bb-437b-90d9-338dcdb254d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MDg4MDgsIm5iZiI6MTczOTYwODUwOCwicGF0aCI6Ii8xNDg0MjYxOTYvMzc5Nzc2MDA5LTI4NDZlMWE5LWEyYmItNDM3Yi05MGQ5LTMzOGRjZGIyNTRkNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtS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9.-EcgYIzWEMeJFFj4f84fDOSFa68dyoK2ubsuFC3Yy-U)
Need help? See https://support.google.com/android/answer/9075928
Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.