summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-05-09 00:58:29 +0200
committerTao Bao <tbao@google.com>2018-05-09 02:56:33 +0200
commit347a659d9b9d262b8c815cbfeae8319c0d246374 (patch)
tree849c31d13c46a8b7fb2ad95026870d178fedd001 /screen_ui.cpp
parenttests: Add tests for ScreenRecoveryUI. (diff)
downloadandroid_bootable_recovery-347a659d9b9d262b8c815cbfeae8319c0d246374.tar
android_bootable_recovery-347a659d9b9d262b8c815cbfeae8319c0d246374.tar.gz
android_bootable_recovery-347a659d9b9d262b8c815cbfeae8319c0d246374.tar.bz2
android_bootable_recovery-347a659d9b9d262b8c815cbfeae8319c0d246374.tar.lz
android_bootable_recovery-347a659d9b9d262b8c815cbfeae8319c0d246374.tar.xz
android_bootable_recovery-347a659d9b9d262b8c815cbfeae8319c0d246374.tar.zst
android_bootable_recovery-347a659d9b9d262b8c815cbfeae8319c0d246374.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 9198073df..2a8d7f9eb 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -1099,9 +1099,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