diff options
author | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-16 19:53:00 +0000 |
---|---|---|
committer | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-16 19:53:00 +0000 |
commit | 1a3f426f71ee35848e94356dd6bdd423aaff5608 (patch) | |
tree | 2fe68d926194ad16627b6db0f7836a34b4ceb841 /chrome/common | |
parent | 650e4d7f574f4f122e122f11142f53133e467b6d (diff) | |
download | chromium_src-1a3f426f71ee35848e94356dd6bdd423aaff5608.zip chromium_src-1a3f426f71ee35848e94356dd6bdd423aaff5608.tar.gz chromium_src-1a3f426f71ee35848e94356dd6bdd423aaff5608.tar.bz2 |
This change list fix issues 6093 [settings] bad directionality for gears button
(http://crbug.com/6093).
The directionality of gears button is already fixed.
This CL fixes the wrong location of ":".
It adds RLM at the end of string "Google Gears:" for Hebrew and Arabic Chrome,
so that the ":" in "Google Gears:" in Hebrew is displayed leftmost instead of
rightmost.
Test:
1) open chrome, Hebrew UI
2) option -> under the hood -> google gears
Without the fix, the name appears as "Google Gears:".
With the fix, the name appears as ":Google Gears".
Review URL: http://codereview.chromium.org/18279
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/l10n_util.cc | 2 | ||||
-rw-r--r-- | chrome/common/l10n_util.h | 5 |
2 files changed, 6 insertions, 1 deletions
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 |