summaryrefslogtreecommitdiffstats
path: root/chrome/common/l10n_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Block Oriya locale on Windows XP.jungshik@google.com2009-03-261-0/+5
| | | | | | | | | | | | Add IsLocaleSupportedByOS to l10n_util_{win,posix}.cc. Posix version always returns true. Windows blocks Oriya on Windows XP. BUG=7325 TEST=1. L10n*.GetAppLocale 2. On Win XP, Oriya should not be shown in the UI language switch menu while it should be shown elsewhere. Review URL: http://codereview.chromium.org/45054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12557 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the path layout in both bookmark manager and download location. (issue 8997)xji@chromium.org2009-03-261-30/+6
| | | | | | | | | | | | http://crbug.com/8997 Previously, the path itself and every single path component are marked with LTR marks. The fix is only mark the path as a whole (but not every single path component)with LTR marks. Review URL: http://codereview.chromium.org/49034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12539 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite GetTextDirection() to call GetTextDirectionForLocale(locale_name), whichjungshik@google.com2009-03-251-20/+23
| | | | | | | | | | | in turn calls uscript_getCode() to get the script code and compare it against Hebrew and Arabic scripts (as opposed to languages). TEST=L10n*.GetTextDirection Review URL: http://codereview.chromium.org/40125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12435 0039d316-1c4b-4281-b951-d872f2087c98
* Switch some more ASCII locale code wstrings to strings.estade@chromium.org2009-03-241-6/+5
| | | | | | | | Also, don't alphabetize available spellchecker locale codes. Review URL: http://codereview.chromium.org/42531 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12388 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE.maruel@google.com2009-03-101-1/+2
| | | | | | | Fix files with lines > 80 cols. Part 2. Review URL: http://codereview.chromium.org/40226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11326 0039d316-1c4b-4281-b951-d872f2087c98
* Change locale handling to deal with mac resource bundles in the ↵pinkerton@chromium.org2009-02-271-0/+9
| | | | | | | | corresponding .lproj folder so we can more easily find them. The nibs have not yet been moved, that'll be a further step. Review URL: http://codereview.chromium.org/28259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10609 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a NOTIMPLEMENTED() in l10n_util.cc from it expecting .dll in the file name.evan@chromium.org2009-02-261-11/+13
| | | | | | | | While I'm at it, remove references to .dll in comments in the file. Review URL: http://codereview.chromium.org/27223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10524 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unnecessary include. Also add copyright to the new files.tc@google.com2009-02-261-3/+0
| | | | | | | Review URL: http://codereview.chromium.org/28127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10480 0039d316-1c4b-4281-b951-d872f2087c98
* Wire up resource bundles on the mac:thomasvl@chromium.org2009-02-261-15/+0
| | | | | | | | | | | | | - compile resource_bundle - add resource_bundle_mac by cloning the linux and using some NSBundle to find the files. - enable resource bundles on the mac in the calling code. - added script to app target to repack .pak files into larger chunks (chrome, theme, and localized bits). - added script to copy repacked files into the app bundle. Review URL: http://codereview.chromium.org/28171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10460 0039d316-1c4b-4281-b951-d872f2087c98
* Move windows specific functions from l10n_util.h to l10n_util_win.h.tc@google.com2009-02-241-25/+0
| | | | | | Review URL: http://codereview.chromium.org/27103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10307 0039d316-1c4b-4281-b951-d872f2087c98
* Adds a method to sort the elements of a vector by invoking a method onsky@google.com2009-02-241-31/+29
| | | | | | | | | | | | | | each that returns a string. The strings are then compared using a collator, or operator < if no collator is found. I'm going to use this for sorting bookmarks. BUG=1750 TEST=none yet Review URL: http://codereview.chromium.org/20484 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10252 0039d316-1c4b-4281-b951-d872f2087c98
* This CL fixes issue 6099 -- bad display of multi-line English message in pop ↵xji@chromium.org2009-02-231-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ups. (http://crbug.com/6099) Currently, in RTL locales, a pure *multi-line* English message is displayed as right aligned and has RTL directionality (such as the ending punctuation appears at the very left). Single-line message works fine. I do not know why, but simply putting LRE-PDF around a multi-line English text which has the following flags DT_WORDBREAK | DT_RTLREADING wont render the English message as LTR. We have to remove the DT_RTLREADING to render multi-line English message correctly in LTR direction. The fix is that in RTL locales, for JavaScript message, if the message is pure English, the alignment is set to be left-aligned, and the directionality is set to be left-to-right. If the message is mixed BiDi text, the alignment and the directionality is determined by the directionality of the first character with strong directionality in the text. JavaScript message is a MessageBoxView, and the message is a view::Label. Both MessageBoxView and Label are used by Chrome's UI as well. If the message is one of Chrome UI's, the alignment and directionality of the message should be taken from that of the UI's. In order to distinguish where the message comes from, a new flag kFlagWebMessage is introduced in MessageBoxView, and a new argument is introduced in Label::SetHorizontalAlignment() to control whether the alignment need to be flipped or not for RTL locales. Consequently, quite a few files which calls Label::SetHorizontalAlignment() are changed. The main changes are in 5 areas. Other files are changed due to the signature change of Label::SetHorizontalAlignment(). 1. jsmessage_box_handler.cc: pass in extra flag kFlagWebPage when creating MessageBoxView to indicate the message box is one from a web page, not from Chrome UI. 2. l10n_util.h/.cc added function GetFirstStrongDirection() 3. label.h/.cc a new argument is introduced in Label::SetHorizontalAlignment() to control whether the alignment need to be flipped or not for RTL locales. 4. message_box_view.cc when init message box view, if the flag is kFlagWebPage, get the text directionality from the text itself (not Chrome UI's) and calls Label::SetHorizontalAlignment() to not resetting the flag for RTL locales. 5. chrome_canvas_win.cc 5.1 ComputeFormatFlags() only set flag DT_RTLREADING for RTL locales if the text contains strong RTL characters and the alignment is RIGHT aligned. All labels of Chrome's UI and other Chrome UI components in RTL locales have been set as (or flipped to) RIGHT aligned. 5.2 DoDrawText() Only adjust string for locale is the reading direction is DT_RTLREADING. Review URL: http://codereview.chromium.org/18863 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10178 0039d316-1c4b-4281-b951-d872f2087c98
* This CL fix the following 2 bugs:xji@chromium.org2009-02-201-12/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.7324 -- RTL: Path contains Hebrew is wrong on "Download location" text box (http://crbug.com/7324) 2. 7326 -- RTL: Folder icon missing on "Download location" text box (http://crbug.com/7326) The fix are: 1. force path to have LTR directionality. 2. draw icon in mirrored position in RTL locales. Steps for test: 1. Create a folder with a Hebrew file name on Hebrew XP 2. Change the download location to the folder created in step 1 3. Observe the path displayed on "Google Chrome Options" --> "Minor Tweaks" --> "Download location" text box Without the fix: The path contains Hebrew folder name is wrong. It displayed as "cCBA\:" while the path is "c:\CBA" where "CBA" is a Hebrew folder name. And there is no folder icon in the "download location" text box. With the fix: The path displayed correctly as "c:\CBA" or "c:\CBA\FED" where "FED" is subfolder of "CBA". And the folder icon showed at the very right. Review URL: http://codereview.chromium.org/20038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10121 0039d316-1c4b-4281-b951-d872f2087c98
* We will sort the encoding menu items according to current used UI language ↵jnd@chromium.org2009-02-201-56/+41
| | | | | | | | | | | except the UTF-8 encoding and the recently selectd encodings. For details, see Fix bug http://code.google.com/p/chromium/issues/detail?id=7647 BUG=7647 Review URL: http://codereview.chromium.org/21414 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10077 0039d316-1c4b-4281-b951-d872f2087c98
* Try to land strings on linux again (r9972). This time, enabletc@google.com2009-02-181-3/+5
| | | | | | | | | | the resource bundle on linux unittests and make the unit_tests executable require the various .pak files. Review URL: http://codereview.chromium.org/20471 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9984 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "load strings and display them on linux" because linux unittests broke.tc@google.com2009-02-181-5/+3
| | | | | | | | | | | This reverts commit r9972. TBR=evan Review URL: http://codereview.chromium.org/21478 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9979 0039d316-1c4b-4281-b951-d872f2087c98
* load strings and display them on linuxtc@google.com2009-02-181-3/+5
| | | | | | | Review URL: http://codereview.chromium.org/21465 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9972 0039d316-1c4b-4281-b951-d872f2087c98
* Relocate a NOTIMPLEMENTED() to its proper place.evan@chromium.org2009-02-131-0/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9722 0039d316-1c4b-4281-b951-d872f2087c98
* Fix tiny fonts in Mac/Linux. Tony deserves credit for this.evan@chromium.org2009-02-131-0/+1
| | | | | | | Review URL: http://codereview.chromium.org/21323 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9716 0039d316-1c4b-4281-b951-d872f2087c98
* By changing how we #ifdef, we get a bunch more l10n functions.evan@chromium.org2009-02-091-3/+6
| | | | | | | Review URL: http://codereview.chromium.org/20171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9405 0039d316-1c4b-4281-b951-d872f2087c98
* first stab at scaffolding WebContents.pinkerton@chromium.org2009-02-031-1/+1
| | | | | | Review URL: http://codereview.chromium.org/19757 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9055 0039d316-1c4b-4281-b951-d872f2087c98
* Make CommandLine into a normal object, with some statics for getting at the ↵evan@chromium.org2009-01-211-1/+1
| | | | | | | | | | | current process's command line. One explicit goal of this change is to *not* deal with the string/wstring issues at the API on POSIX; the functions are the same as before, which means they remain as broken as before. (I did try to fix the internals, though, so migrating the callers is now possible by adding platform-appropriate hooks.) Review URL: http://codereview.chromium.org/18248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8347 0039d316-1c4b-4281-b951-d872f2087c98
* This change list fix issues 6093 [settings] bad directionality for gears buttonxji@chromium.org2009-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | (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
* Add more tests to unit_tests on Linux, and some platform cleanups.phajdan.jr@chromium.org2009-01-121-2/+7
| | | | | | Review URL: http://codereview.chromium.org/17277 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7864 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 7574 which reverted 7570. It was an error on my part.maruel@chromium.org2009-01-061-15/+74
| | | | | | Review URL: http://codereview.chromium.org/16529 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7575 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 7570.maruel@chromium.org2009-01-061-74/+15
| | | | | | Review URL: http://codereview.chromium.org/16528 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7574 0039d316-1c4b-4281-b951-d872f2087c98
* * Port l10n_utiL and it's unit test on POSIX.jeremy@chromium.org2009-01-051-15/+74
| | | | | | | | * Bringup visit_database_unittest.cc on POSIX Review URL: http://codereview.chromium.org/17025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7570 0039d316-1c4b-4281-b951-d872f2087c98
* Fix RTL issues in the About box (bug 3756).finnur@google.com2008-10-311-2/+45
| | | | | | | | I used the BiDiLineIterator, which I moved out of the AutocompletePopup and into the l10n_util file. I also added a wrapper function around ubidi_getLogicalRun. Review URL: http://codereview.chromium.org/8727 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4294 0039d316-1c4b-4281-b951-d872f2087c98
* Dupe of http://codereview.chromium.org/238jungshik@google.com2008-09-051-7/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The download page was quickly changed to address bug 1358202, but still there's a problem that the UI langauge of Chrome set-up program is different from what a user choose in the following scenarios: * English is chosen on non-en-US OS * Hebrew is chosen on non-Hebrew OS * Norwegian Bokmal is selected on non-Norwegian Bokmal OS Once these changes go in for next-point-release, the change made on the download server can be reverted. 1. Aliases {iw,no,tl} to {he,nb,fil}. 2. Also map en to en-US. 3. Map {zh-HK, zh-MK, zh-SG} to {zh-TW, zh-TW, zh-CN} This does not yet deal with other potentially problematic cases. Added a similar change for l10n_string_util.cc for installer . Tony already LGTM'd 238 so that I'm tbr'ing here. BUG=1358202 TEST=L10n* unittest TBR=tc Review URL: http://codereview.chromium.org/260 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1800 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add chrome to the repository.initial.commit2008-07-261-0/+570
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98