apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

Issue 1 launguage order backend queries

Open Adeeth101 opened this issue 1 year ago • 2 comments

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) image image

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.

Adeeth101 avatar Oct 24 '24 12:10 Adeeth101

Ill work on name changes and the change in the res file is unintentional sorry about that...

Adeeth101 avatar Oct 25 '24 06:10 Adeeth101

Also, please rebase or merge from master. Thanks! :-)

nicolas-raoul avatar Oct 25 '24 13:10 nicolas-raoul

@nicolas-raoul Ive squashed merge conflicts and resolved above points.

Adeeth101 avatar Oct 27 '24 04:10 Adeeth101

I am so sorry for leaving it for so long, would you mind this other conflict? Thanks a lot!

nicolas-raoul avatar Nov 15 '24 09:11 nicolas-raoul

Ill look into it

Adeeth101 avatar Nov 16 '24 05:11 Adeeth101

@nicolas-raoul Sorry again for being late. Ill fix it today.

Adeeth101 avatar Dec 20 '24 04:12 Adeeth101

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.

Adith101 avatar Dec 20 '24 17:12 Adith101

I made a new MR, which should now be good for the updated Kotlin version of the app.

Adeeth101 avatar Dec 21 '24 13:12 Adeeth101