summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/views/options/advanced_contents_view.cc11
-rw-r--r--chrome/common/l10n_util.cc2
-rw-r--r--chrome/common/l10n_util.h5
3 files changed, 15 insertions, 3 deletions
diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc
index d3860e6..c73b858 100644
--- a/chrome/browser/views/options/advanced_contents_view.cc
+++ b/chrome/browser/views/options/advanced_contents_view.cc
@@ -685,8 +685,15 @@ void WebContentSection::InitControlLayout() {
l10n_util::GetString(IDS_OPTIONS_SHOWPOPUPBLOCKEDNOTIFICATION));
popup_blocked_notification_checkbox_->SetListener(this);
- gears_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_GEARSSETTINGS_GROUP_NAME));
+ if (l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT) {
+ gears_label_ = new views::Label(
+ l10n_util::GetString(IDS_OPTIONS_GEARSSETTINGS_GROUP_NAME));
+ } else {
+ // Add an RTL mark so that
+ // ":" in "Google Gears:" in Hebrew Chrome is displayed left-most.
+ gears_label_ = new views::Label(l10n_util::GetString(
+ IDS_OPTIONS_GEARSSETTINGS_GROUP_NAME) + l10n_util::kRightToLeftMark);
+ }
gears_settings_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_GEARSSETTINGS_CONFIGUREGEARS_BUTTON));
gears_settings_button_->SetListener(this);
diff --git a/chrome/common/l10n_util.cc b/chrome/common/l10n_util.cc
index f783aad..d9fb299 100644
--- a/chrome/common/l10n_util.cc
+++ b/chrome/common/l10n_util.cc
@@ -313,7 +313,7 @@ std::wstring GetLocalName(const std::wstring& locale_code_wstr,
name_local.resize(actual_size);
// Add an RTL mark so parentheses are properly placed.
if (is_for_ui && GetTextDirection() == RIGHT_TO_LEFT)
- return name_local + L"\x200f";
+ return name_local + kRightToLeftMark;
else
return name_local;
}
diff --git a/chrome/common/l10n_util.h b/chrome/common/l10n_util.h
index 7631a1f..b5dd18a 100644
--- a/chrome/common/l10n_util.h
+++ b/chrome/common/l10n_util.h
@@ -23,6 +23,8 @@ class PrefService;
namespace l10n_util {
+const wchar_t kRightToLeftMark[] = L"\x200f";
+
// This method is responsible for determining the locale as defined below. In
// nearly all cases you shouldn't call this, rather use GetApplicationLocale
// defined on browser_process.
@@ -147,6 +149,9 @@ void WrapStringWithRTLFormatting(std::wstring* text);
// Callers should OR this value into their extended style value when creating
// a window.
int GetExtendedStyles();
+
+// TODO(xji):
+// This is a temporary name, it will eventually replace GetExtendedStyles
int GetExtendedTooltipStyles();
// Returns the default text alignment to be used when drawing text on a