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

Unified Diff: chrome/browser/extensions/extension_l10n_util.cc

Issue 256022: Loads local resources from current locale subtree if available, if not it fal... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_l10n_util.cc
===================================================================
--- chrome/browser/extensions/extension_l10n_util.cc (revision 28272)
+++ chrome/browser/extensions/extension_l10n_util.cc (working copy)
@@ -144,4 +144,16 @@
error);
}
+FilePath GetL10nRelativePath(const FilePath& relative_resource_path) {
+ // Get locale relative path.
+ static std::string current_locale = l10n_util::GetApplicationLocale(L"");
+ std::replace(current_locale.begin(), current_locale.end(), '-', '_');
+
+ FilePath locale_relative_path;
+ return locale_relative_path
+ .AppendASCII(Extension::kLocaleFolder)
+ .AppendASCII(current_locale)
+ .Append(relative_resource_path);
+}
+
} // namespace extension_l10n_util
« no previous file with comments | « chrome/browser/extensions/extension_l10n_util.h ('k') | chrome/browser/extensions/extension_l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698