Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3810)

Unified Diff: chrome/browser/ui/webui/options2/browser_options_handler2.cc

Issue 9514015: Force URL in settings page to be left-to-right. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options2/browser_options_handler2.cc
===================================================================
--- chrome/browser/ui/webui/options2/browser_options_handler2.cc (revision 124011)
+++ chrome/browser/ui/webui/options2/browser_options_handler2.cc (working copy)
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
+#include "base/i18n/rtl.h"
#include "base/memory/singleton.h"
#include "base/path_service.h"
#include "base/stl_util.h"
@@ -543,9 +544,11 @@
if (prefs->GetBoolean(prefs::kHomePageIsNewTabPage)) {
str = l10n_util::GetStringUTF16(IDS_OPTIONS_SHOW_HOME_BUTTON_FOR_NTP);
} else {
+ string16 home_page = UTF8ToUTF16(prefs->GetString(prefs::kHomePage));
+ if (base::i18n::IsRTL())
+ base::i18n::WrapStringWithLTRFormatting(&home_page);
str = l10n_util::GetStringFUTF16(
- IDS_OPTIONS_SHOW_HOME_BUTTON_FOR_URL,
- UTF8ToUTF16(prefs->GetString(prefs::kHomePage)));
+ IDS_OPTIONS_SHOW_HOME_BUTTON_FOR_URL, home_page);
Evan Stade 2012/02/28 22:22:43 does it not work to just set dir=ltr on the DOM no
xji 2012/02/28 22:34:11 If we translate "show home button for" to Arabic o
}
label.reset(Value::CreateStringValue(str));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698