Issue 1 launguage order backend queries
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:
- Had to accommodate new preference in OnCreate
- Made a new dialog called prepareSecondaryLanguageDialog().
- Made helper methods for that dialog that use a new language adapter SavedLanguagesAdapter
- modified saving and getting key value methods to accommodate the new category in Prefs
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)
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.
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! :-)
@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.