diff options
author | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-16 17:21:13 +0000 |
---|---|---|
committer | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-16 17:21:13 +0000 |
commit | 48c70517e3bb914c4157e27fb0d70492f4f76cbe (patch) | |
tree | a4f31a59aaf2f2133dacc5440b285b9e6070ae6b /app/l10n_util.h | |
parent | 873043ae174de16897b9c9ff84ecd0e4f07ae516 (diff) | |
download | chromium_src-48c70517e3bb914c4157e27fb0d70492f4f76cbe.zip chromium_src-48c70517e3bb914c4157e27fb0d70492f4f76cbe.tar.gz chromium_src-48c70517e3bb914c4157e27fb0d70492f4f76cbe.tar.bz2 |
This CL fixes issue 10860 - RTL: Hebrew file names should have forced LTR
directionality in download shelf.
File names in download shelf are forced to be LTR in DownloadItemView and
through ElideFileName().
BUG=http://crbug.com/10860
TEST=1. Open chrome with Hebrew UI.
2. Right click a link and chose Save As... (4th item from the top for
non-Hebrew
speakers)
3. In the save as dialog name the file קובץ.html
4. In the download shelf the filename should display as קובץ.html (not
html.קובץ)
Review URL: http://codereview.chromium.org/131001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/l10n_util.h')
-rw-r--r-- | app/l10n_util.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/l10n_util.h b/app/l10n_util.h index 85fa36b..5e50d6e 100644 --- a/app/l10n_util.h +++ b/app/l10n_util.h @@ -248,12 +248,18 @@ void WrapStringWithLTRFormatting(std::wstring* text); // strings are rendered properly in an LTR context. void WrapStringWithRTLFormatting(std::wstring* text); -// Wraps individual file path components to get them to display correctly in an -// RTL UI. All filepaths should be passed through this function before display -// in UI for RTL locales. +// Wraps file path to get it to display correctly in RTL UI. All filepaths +// should be passed through this function before display in UI for RTL locales. void WrapPathWithLTRFormatting(const FilePath& path, string16* rtl_safe_path); +// Given the string in |text|, this function returns the adjusted string having +// LTR directionality for display purpose. Which means that in RTL locale the +// string is wrapped with LRE (Left-To-Right Embedding) and PDF (Pop +// Directional Formatting) marks and returned. In LTR locale, the string itself +// is returned. +std::wstring GetDisplayStringInLTRDirectionality(std::wstring* text); + // Returns the default text alignment to be used when drawing text on a // gfx::Canvas based on the directionality of the system locale language. This // function is used by gfx::Canvas::DrawStringInt when the text alignment is |