summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-05-11 23:46:52 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-05-11 23:46:52 +0200
commit13d56e9beda58e642f92b6e91e92decdaff0359a (patch)
tree75ee5592b760bc9ed38b2355f3994ea1a1f11f48 /screen_ui.cpp
parentMerge "Move device.cpp into librecovery_ui." (diff)
parentscreen_ui: Fix an issue in RTL locale detection. (diff)
downloadandroid_bootable_recovery-13d56e9beda58e642f92b6e91e92decdaff0359a.tar
android_bootable_recovery-13d56e9beda58e642f92b6e91e92decdaff0359a.tar.gz
android_bootable_recovery-13d56e9beda58e642f92b6e91e92decdaff0359a.tar.bz2
android_bootable_recovery-13d56e9beda58e642f92b6e91e92decdaff0359a.tar.lz
android_bootable_recovery-13d56e9beda58e642f92b6e91e92decdaff0359a.tar.xz
android_bootable_recovery-13d56e9beda58e642f92b6e91e92decdaff0359a.tar.zst
android_bootable_recovery-13d56e9beda58e642f92b6e91e92decdaff0359a.zip
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 4ea458f1d..fd7a1bea5 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -1101,9 +1101,9 @@ void ScreenRecoveryUI::SetLocale(const std::string& new_locale) {
rtl_locale_ = false;
if (!new_locale.empty()) {
- size_t underscore = new_locale.find('_');
- // lang has the language prefix prior to '_', or full string if '_' doesn't exist.
- std::string lang = new_locale.substr(0, underscore);
+ size_t separator = new_locale.find('-');
+ // lang has the language prefix prior to the separator, or full string if none exists.
+ std::string lang = new_locale.substr(0, separator);
// A bit cheesy: keep an explicit list of supported RTL languages.
if (lang == "ar" || // Arabic