Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Side by Side Diff: chrome/common/extensions/extension_l10n_util.h

Issue 7552028: Injected CSS localization fix (see bug no.) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file declares extension specific l10n utils. 5 // This file declares extension specific l10n utils.
6 6
7 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_ 7 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_
8 #define CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_ 8 #define CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 // Returns default locale in form "en-US" or "sr" or empty string if 33 // Returns default locale in form "en-US" or "sr" or empty string if
34 // "default_locale" section was not defined in the manifest.json file. 34 // "default_locale" section was not defined in the manifest.json file.
35 std::string GetDefaultLocaleFromManifest(const base::DictionaryValue& manifest, 35 std::string GetDefaultLocaleFromManifest(const base::DictionaryValue& manifest,
36 std::string* error); 36 std::string* error);
37 37
38 // Returns true iff the extension was localized, and the current locale 38 // Returns true iff the extension was localized, and the current locale
39 // doesn't match the locale written into info.extension_manifest. 39 // doesn't match the locale written into info.extension_manifest.
40 bool ShouldRelocalizeManifest(const ExtensionInfo& info); 40 bool ShouldRelocalizeManifest(const ExtensionInfo& info);
41 41
42 // Localize a CSS script content.
43 void LocalizeCSSScript(const Extension* extension, std::string& css_script);
44
42 // Localize extension name, description, browser_action and other fields 45 // Localize extension name, description, browser_action and other fields
43 // in the manifest. 46 // in the manifest.
44 bool LocalizeManifest(const ExtensionMessageBundle& messages, 47 bool LocalizeManifest(const ExtensionMessageBundle& messages,
45 base::DictionaryValue* manifest, 48 base::DictionaryValue* manifest,
46 std::string* error); 49 std::string* error);
47 50
48 // Load message catalogs, localize manifest and attach message bundle to the 51 // Load message catalogs, localize manifest and attach message bundle to the
49 // extension. 52 // extension.
50 bool LocalizeExtension(const FilePath& extension_path, 53 bool LocalizeExtension(const FilePath& extension_path,
51 base::DictionaryValue* manifest, 54 base::DictionaryValue* manifest,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // |locales_path| is extension_id/_locales 100 // |locales_path| is extension_id/_locales
98 // |locale_path| is extension_id/_locales/xx 101 // |locale_path| is extension_id/_locales/xx
99 // |all_locales| is a set of all valid Chrome locales. 102 // |all_locales| is a set of all valid Chrome locales.
100 bool ShouldSkipValidation(const FilePath& locales_path, 103 bool ShouldSkipValidation(const FilePath& locales_path,
101 const FilePath& locale_path, 104 const FilePath& locale_path,
102 const std::set<std::string>& all_locales); 105 const std::set<std::string>& all_locales);
103 106
104 } // namespace extension_l10n_util 107 } // namespace extension_l10n_util
105 108
106 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_ 109 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698