From c6d474f8e04b08306349ea514d529b8f25ffd4b2 Mon Sep 17 00:00:00 2001 From: "cira@chromium.org" Date: Wed, 16 Dec 2009 21:11:06 +0000 Subject: Localizing manifest for installed or unpacked extensions. 1. Use _MSG_ format for manifest fields instead of hard-coded names. 2. Localize manifest during installation procedure -> save localized version to prefs. 3. Add current_locale field to manifest so we can detect when chrome locale changes and re-localize manifest. 4. Adds prefs method to MigratePrefs&Write to disk. 5. General refactor of extension_file_util wrt l10n code. 6. Don't localize themes (we can revert this by adding default_locale and current_locale keys to allowed keys for theme section). BUG=27360 Review URL: http://codereview.chromium.org/434015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34749 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/extension_file_util.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'chrome/browser/extensions/extension_file_util.h') diff --git a/chrome/browser/extensions/extension_file_util.h b/chrome/browser/extensions/extension_file_util.h index 4cae8ec..95f01e5 100644 --- a/chrome/browser/extensions/extension_file_util.h +++ b/chrome/browser/extensions/extension_file_util.h @@ -86,13 +86,12 @@ void GarbageCollectExtensions( const std::set& installed_ids, const std::map& installed_versions); -// Loads locale information if _locales folder is present. -// Returns message bundle if there were no errors. If _locales folder is not -// present it returns NULL with empty error string. -// Loading failed only if function returns NULL and error is not empty. -ExtensionMessageBundle* LoadLocaleInfo(const FilePath& extension_path, - const DictionaryValue& manifest, - std::string* error); +// Loads extension message catalogs and returns message bundle. +// Returns NULL on error, or if extension is not localized. +ExtensionMessageBundle* LoadExtensionMessageBundle( + const FilePath& extension_path, + const DictionaryValue& manifest, + std::string* error); // We need to reserve the namespace of entries that start with "_" for future // use by Chrome. -- cgit v1.1