summaryrefslogtreecommitdiffstats
path: root/app/l10n_util.h
Commit message (Collapse)AuthorAgeFilesLines
* Add DCHECK for misused string resources.estade@chromium.org2010-10-041-3/+3
| | | | | | | | | | | When replacing a placeholder in a localized string, make sure the correct number of placeholders were found (i.e. the same number of strings that the calling code passed). BUG=none TEST=running/testing the browser in debug doesn't cause errors Review URL: http://codereview.chromium.org/3396025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61420 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 7)thestig@chromium.org2010-08-271-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3176026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57737 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obviously unneeded forward declarations from headers under ↵viettrungluu@chromium.org2010-08-211-3/+1
| | | | | | | | | | | src/{app,base,net}. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3136025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56995 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a deprecated wstring ToLower function.tony@chromium.org2010-08-041-4/+0
| | | | | | | | BUG=23581 Review URL: http://codereview.chromium.org/3044043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54946 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstrings from l10n_util/ResourceBundle locale functions.evan@chromium.org2010-08-041-1/+1
| | | | | | Review URL: http://codereview.chromium.org/3069026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54917 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored the translate infobars.jcivelli@chromium.org2010-06-091-0/+3
| | | | | | | | | | | | | | Since some work is needed on Linux and Mac to use the new translate infobar delegate, I created a new version of the refactored classes instead of replacing them. Once Linux and Mac use the new classes, we can make the swicth. The TranslateInfoBarDelegate now contains all states, so there is no more logic on the infobar classes. I broke down the single infobar class into multiple ones (there is now an infobar for each state: before translate, translating, after translate, error): it makes the code simpler. I had to fix ReplaceInfoBar on Windows as it was not working properly. BUG=40828 TEST=Test thoroughly the translate feature. Review URL: http://codereview.chromium.org/2602003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49307 0039d316-1c4b-4281-b951-d872f2087c98
* translate infobar: sort languages in menus by application localekuan@chromium.org2010-04-021-2/+5
| | | | | | | | | | | | - provide string16 sorting methods (there were only std::wstring sorting methods before) - problem is fixed on win, mac, linux and chromeos BUG=39850 TEST=verify per bug report. Review URL: http://codereview.chromium.org/1542009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43484 0039d316-1c4b-4281-b951-d872f2087c98
* Move RTL related functions from app/l10n_util to base/i18n/rtlben@chromium.org2010-03-201-98/+0
| | | | | | | | | | TBR=darin BUG=none TEST=none Review URL: http://codereview.chromium.org/1073005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42182 0039d316-1c4b-4281-b951-d872f2087c98
* linux: use ICU direction for determining text direction in rendererevan@chromium.org2010-03-011-0/+4
| | | | | | | | | | | | We use the GTK text direction in the browser process, but that is not available in the renderer. BUG=36624 TEST=Arabic error pages are properly RTL Review URL: http://codereview.chromium.org/660176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40260 0039d316-1c4b-4281-b951-d872f2087c98
* Translate: Move label parsing logic into common code.jeremy@chromium.org2010-02-171-0/+4
| | | | | | | | | | | | | * Add a string16 & Cocoa version of GetStringF(). * Move logic for parsing translate infobar label into translate_infobars_delegates. * Make views variant of translate infobars use new code. BUG=34466 TEST=Translate infobars should continue to workon Windows. Review URL: http://codereview.chromium.org/597042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39206 0039d316-1c4b-4281-b951-d872f2087c98
* Maps our internal Chinese locale codes to those expected by the ICU API for jshin@chromium.org2010-02-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | the display name of a locale and expected by Google (in case of 'nb vs no'). 1. Map zh-CN and zh-TW to zh-Hans and zh-Hant in GetDisplay 2. Map nb to no before adding 'hl' param for Google services. This will be removed once Google begins to honor 'nb'. 3. While doing so, I found that language_combox_model.cc has the exactly the same code as in l10n_util.cc and refactored it. BUG=34531 TEST=1. app_unittest: L10nUt*.LocaleDispla* 2. See the bug 34531 3. On Windows, the language menu in Options | Under the hood | Fonts & Language Menu | Language tab lists 'Chinese (Simplified Han)' and 'Chinese (Traditional Han)' for Simplified Chinese and Traditional Chinese in English Chrome along with Chinese names for those two languages. This is the behavior without this CL and it should't change with the refactoring. Review URL: http://codereview.chromium.org/596033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38813 0039d316-1c4b-4281-b951-d872f2087c98
* remove ICU includes from l10n_util.hevan@chromium.org2010-01-251-165/+1
| | | | | | | | | | | | | | | | 95% of users of l10n_util use it for some functions; the other 5% want some complicated templates that pull in a ton of ICU headers as well. Before this change, the average includer of l10n_util.h pulled in an additional 80 subheaders because of it. Additionally, #including ICU headers from a header makes the includee depend on having the ICU include path in the -I header. Review URL: http://codereview.chromium.org/515059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37032 0039d316-1c4b-4281-b951-d872f2087c98
* Make BrowserProcess::GetApplicationLocale thread safe and migratetony@chromium.org2009-12-101-1/+1
| | | | | | | | | | | | | | | | | callers of l10n_util::GetApplicationLocale to use this instead. In the browser process, it's wrong to call l10n_util::GetApplicationLocale with an empty string because then it won't consider the user pref value when resolving the locale. On Linux, it's also wrong to call l10n_util::GetApplicationLocale after startup because the call touches disk and on Linux, we assume that all of the program files can be deleted after startup (so updates in place can work). Review URL: http://codereview.chromium.org/476002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34206 0039d316-1c4b-4281-b951-d872f2087c98
* Fix lint errors in app/ and turn on presubmit check.erg@google.com2009-11-171-4/+4
| | | | | | Review URL: http://codereview.chromium.org/400016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32222 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Remove a check for < 0 on an unsigned int.jhawkins@chromium.org2009-10-011-5/+5
| | | | | | | | | CID=4546 BUG=none TEST=none Review URL: http://codereview.chromium.org/249047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27753 0039d316-1c4b-4281-b951-d872f2087c98
* This CL fixes issue 10860 - RTL: Hebrew file names should have forced LTRxji@chromium.org2009-09-161-3/+9
| | | | | | | | | | | | | | | | | | | 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
* Add a "ToUpper" method.paul@chromium.org2009-09-091-0/+3
| | | | | | | | | BUG=None. TEST=Covered by new unittest. Review URL: http://codereview.chromium.org/194060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25809 0039d316-1c4b-4281-b951-d872f2087c98
* Gtk languages options page part 1: accept-languages configuration.mattm@chromium.org2009-08-191-0/+4
| | | | | | | | | | | Move accept_language_list to l10n_util, use it for LanguagesPageGtk. BUG=13524 TEST=You can view, reorder, remove and add accept-languages. Review URL: http://codereview.chromium.org/174043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23695 0039d316-1c4b-4281-b951-d872f2087c98
* Use 'icu::' namespace explicitly throughout Chrome tree instead of relying ↵jshin@chromium.org2009-08-181-9/+9
| | | | | | | | | | | | | | | | | | | on 'using namespace icu'. This is Chrome's counterpart to the ICU header change that disables 'using namespace icu' (http://codereview.chromium.org/171010/show), which is required to avoid the name colission between Chrome's StringPiece (in base) and ICU's StringPiece. The webkit change (which is minor) will be dealt with in the webkit bugzilla. This can go in before the ICU change/upgrade without affecting anything. BUG=8198 TEST=All the targets are built without an error on all platforms. Review URL: http://codereview.chromium.org/171012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23613 0039d316-1c4b-4281-b951-d872f2087c98
* Move some Mac l10n helpers out into app/l10n so they are closer to the ↵thomasvl@chromium.org2009-08-071-0/+8
| | | | | | | | | | | | | generic ones. Complete the apis points so the ones folks might need are all there already. Switch the code using the old calls over to the new helpers. TEST=no l10n stuff broke BUG=none Review URL: http://codereview.chromium.org/165132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22753 0039d316-1c4b-4281-b951-d872f2087c98
* Replace std:;wstring with std::string and string16 in locale-name related APIs.jshin@chromium.org2009-06-241-14/+55
| | | | | | | | | | | | | | | 1. Change the locale param to be std::string because they're always ASCII and change call-sites accordingly. 2. Add GetStringFUTF16 to l10n_util. On Windows, they're inline helpers calling the correspondingGetStringF returning wstring while on Mac/Linux, they just return the result of |string16 GetStringF|without converting to wstring. This is part 1 of the fix for issue 8647. Some of newly introduced conversions are temporary and will be removed later (e.g. ASCIIToWide applied to the result of GetApplicationLocale in a few places). Note : this CL will be landed after http://codereview.chromium.org/147038 is landed. BUG=8647 (http://crbug.com/8647) TEST=Pass l10n_util_unittest and other unit tests Review URL: http://codereview.chromium.org/126223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19183 0039d316-1c4b-4281-b951-d872f2087c98
* Add helper for forcing a GtkEntry to lowercase.mattm@chromium.org2009-06-181-0/+4
| | | | | | | | | | Make l10n_util::ToLower string16 friendly. BUG=13326 Review URL: http://codereview.chromium.org/126260 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18742 0039d316-1c4b-4281-b951-d872f2087c98
* Add general options page. Options are working with the following exceptions:tc@google.com2009-05-281-0/+1
| | | | | | | | | | | | | | | | | | | Custom start urls and default search options widgets aren't hooked up. Home page settings work, but are overridden by the linux start page settings. Default browser checking/setting functions are not implemented, so the option isn't useful yet. Refactors some common code out of browser/views/options/options_page_view.* into browser/options_page_base.{cc,h} BUG=11507 Patch by Matt Mueller (mattm@google.com). Review URL: http://codereview.chromium.org/113967 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17115 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land of earlier NTP theme patch; now with mac and linux compatibility.glen@chromium.org2009-05-151-0/+10
| | | | | | Review URL: http://codereview.chromium.org/115413 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16205 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeCanvas->gfx::Canvasben@chromium.org2009-05-151-4/+4
| | | | | | | | | | | Rename files too. TBR=brettw http://crbug.com/11387 Review URL: http://codereview.chromium.org/113443 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16148 0039d316-1c4b-4281-b951-d872f2087c98
* Undo 16020glen@chromium.org2009-05-141-10/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16021 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the new tab page to be themed (you may want to review DOMUIThemeSource ↵glen@chromium.org2009-05-141-0/+10
| | | | | | | | | | | | | as a whole and not just these changes). Change global std::strings to chars* in browser theme provider. Add ability for ReplaceStringPlaceHolder to take up to 9 replacements. BUG=11235,11685 Review URL: http://codereview.chromium.org/115172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16020 0039d316-1c4b-4281-b951-d872f2087c98
* Move l10n_util to app/ben@chromium.org2009-05-051-0/+370
http://crbug.com/11387 Review URL: http://codereview.chromium.org/109043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15352 0039d316-1c4b-4281-b951-d872f2087c98