diff options
author | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-09 20:05:45 +0000 |
---|---|---|
committer | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-09 20:05:45 +0000 |
commit | 7f93717b442d05e12f90c69cd191fb6b7e9b7573 (patch) | |
tree | dcee846a22f2638e8ce569881428893f9ff63e22 /chrome/browser/extensions/extension_l10n_util.cc | |
parent | ef5ff1b40f1024d834620f5cede62dfd4aea6e0c (diff) | |
download | chromium_src-7f93717b442d05e12f90c69cd191fb6b7e9b7573.zip chromium_src-7f93717b442d05e12f90c69cd191fb6b7e9b7573.tar.gz chromium_src-7f93717b442d05e12f90c69cd191fb6b7e9b7573.tar.bz2 |
Simple fix of extension_l10n_util that allows folders in form ".some_name" to exist in _locales folder.
It helps testing/loading extensions from svn tree (skips .svn folder, doesn't fail).
Review URL: http://codereview.chromium.org/196029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25779 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_l10n_util.cc')
-rw-r--r-- | chrome/browser/extensions/extension_l10n_util.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_l10n_util.cc b/chrome/browser/extensions/extension_l10n_util.cc index 77fddba..5176b60 100644 --- a/chrome/browser/extensions/extension_l10n_util.cc +++ b/chrome/browser/extensions/extension_l10n_util.cc @@ -30,7 +30,6 @@ bool ValidateDefaultLocale(const Extension* extension) { } } - bool AddLocale(const std::set<std::string>& chrome_locales, const FilePath& locale_folder, Extension* extension, @@ -38,6 +37,10 @@ bool AddLocale(const std::set<std::string>& chrome_locales, std::string* error) { // Normalize underscores to hyphens because that's what our locale files use. std::replace(locale_name->begin(), locale_name->end(), '_', '-'); + // Accept name that starts with a . but don't add it to the list of supported + // locales. + if (locale_name->find(".") == 0) + return true; if (chrome_locales.find(*locale_name) == chrome_locales.end()) { // Fail if there is an extension locale that's not in the Chrome list. *error = StringPrintf("Supplied locale %s is not supported.", |