Skip to content
Snippets Groups Projects
Commit 42b6f0f8 authored by cira@chromium.org's avatar cira@chromium.org
Browse files

CL is the same as http://codereview.chromium.org/173487, but had to be moved...

CL is the same as http://codereview.chromium.org/173487, but had to be moved to new CL number because I switched machines.

Implemented the rest of loading/parsing logic for extension i18n:

1. Loading message catalogs for default and application locale.
2. Parsing JSON and replacing placeholders with actual content within a message.
3. Creating unified dictionary (union of default and application dictionaries,
where application dict. has priority for common messages).

New class ExtensionMessageBundle holds new dictionary, and parses data. It's
injected into Extension.

ExtensionMessageHandler::ReplaceVariablesInString can replace both
$placeholders$ and __MSG_messages__ in given string (HTML, manifest, actual
message string...).

Implemented actual manifest name/description replacement too, as an example.

Extension is now pretty agnostic about localization, and this makes it easier to use message bundles
with things that are not extensions...

BUG=12131

Review URL: http://codereview.chromium.org/202063

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26609 0039d316-1c4b-4281-b951-d872f2087c98
parent 60ad3e2b
No related branches found
No related tags found
Loading
Showing
with 934 additions and 229 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment