2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

For #15796 - Use the device locale for the system locale subtitle (#15975)

This commit is contained in:
Gabriel Luong 2020-10-17 09:40:28 -04:00 committed by GitHub
parent 87ec7a77ae
commit d33bd76e40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,8 +20,9 @@ class LocaleViewHolder(
) : BaseLocaleViewHolder(view, selectedLocale) {
override fun bind(locale: Locale) {
// capitalisation is done using the rules of the appropriate locale (endonym and exonym)
// Capitalisation is done using the rules of the appropriate locale (endonym and exonym).
locale_title_text.text = locale.getDisplayName(locale).capitalize(locale)
// Show the given locale using the device locale for the subtitle.
locale_subtitle_text.text = locale.displayName.capitalize(Locale.getDefault())
locale_selected_icon.isVisible = isCurrentLocaleSelected(locale, isDefault = false)
@ -39,7 +40,8 @@ class SystemLocaleViewHolder(
override fun bind(locale: Locale) {
locale_title_text.text = itemView.context.getString(R.string.default_locale_text)
locale_subtitle_text.text = locale.displayName.capitalize(Locale.getDefault())
// Use the device locale for the system locale subtitle.
locale_subtitle_text.text = locale.getDisplayName(locale).capitalize(locale)
locale_selected_icon.isVisible = isCurrentLocaleSelected(locale, isDefault = true)
itemView.setOnClickListener {
interactor.onDefaultLocaleSelected()