Fixes previous PR - FIX #2918 Add option for default language for file descriptions (#3020)

* FIX #2918 Add option for default language for file descriptions

* navigation menu error fixed and improvement of code quality

* error language description default fixed

* adapter language selected fixed

* local language selected per default in description language

* Use a better string and variable name as required in review 1

* Add comments

* Add previously missing setValue methods so that list item will be chosen along with the summary

* Add missing Javadocs

* Fix capitalization

* Lint and formatting issues

* Rename methods so it's clearer they are to do with languages

* Use default kv store instead of shared preferences variable

* Make sure saved language code from settings activity is handled on init
This commit is contained in:
neslihanturan 2019-06-24 14:40:12 +03:00 committed by Josephine Lim
parent 2837748540
commit dd50e83319
8 changed files with 150 additions and 29 deletions

View file

@ -558,4 +558,5 @@ Upload your first media by tapping on the add button.</string>
<string name="upload_cancelled">Cancelled Upload</string>
<string name="previous_image_title_description_not_found">There is no data for previous image\'s title or description</string>
<string name="dialog_box_text_nomination">Why should %1$s be deleted?</string>
<string name="default_description_language">Default description language</string>
</resources>

View file

@ -29,6 +29,11 @@
android:inputType="number"
android:maxLength="3" />
<fr.free.nrw.commons.ui.LongTitlePreferences.LongTitleListPreference
android:key="descriptionDefaultLanguagePref"
android:title= "@string/default_description_language"
android:summary="English" />
<fr.free.nrw.commons.ui.LongTitlePreferences.LongTitleSwitchPreference
android:key="useAuthorName"
android:title="@string/preference_author_name_toggle"