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

Issue 202063: Implemented the rest of loading/parsing logic for extension i18n:... (Closed)

Created:
11 years, 3 months ago by Nebojša Ćirić
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, pam+watch_chromium.org, Ben Goodger (Google), Paweł Hajdan Jr.
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 34

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+936 lines, -231 lines) Patch
M chrome/browser/extensions/extension_file_util.h View 4 chunks +14 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_file_util.cc View 1 2 3 5 chunks +46 lines, -19 lines 0 comments Download
M chrome/browser/extensions/extension_file_util_unittest.cc View 1 2 3 3 chunks +21 lines, -51 lines 0 comments Download
M chrome/browser/extensions/extension_l10n_util.h View 3 chunks +19 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_l10n_util.cc View 1 2 3 5 chunks +69 lines, -15 lines 0 comments Download
M chrome/browser/extensions/extension_l10n_util_unittest.cc View 1 2 3 1 chunk +75 lines, -89 lines 0 comments Download
A chrome/browser/extensions/extension_message_bundle.h View 1 2 3 1 chunk +110 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_message_bundle.cc View 1 2 3 1 chunk +256 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_message_bundle_unittest.cc View 1 2 3 1 chunk +288 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_ui_unittest.cc View 1 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 chunks +9 lines, -18 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 2 chunks +12 lines, -14 lines 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/_locales/en_US/messages.json View 1 2 3 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/_locales/sr/messages.json View 1 2 3 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Nebojša Ćirić
Ready for another pass.
11 years, 3 months ago (2009-09-11 23:26:40 UTC) #1
Nebojša Ćirić
Ping... I promise to send next one to somebody else :) On 2009/09/11 23:26:40, Nebojša ...
11 years, 3 months ago (2009-09-15 17:44:59 UTC) #2
Nebojša Ćirić
Erik, Aaron, could you point somebody in the group who can do the review? I ...
11 years, 3 months ago (2009-09-16 18:17:09 UTC) #3
Erik does not do reviews
Sorry, I didn't notice that I was on the review list for this one. It ...
11 years, 3 months ago (2009-09-16 20:57:43 UTC) #4
Aaron Boodman
Sorry for slow review. I sux. http://codereview.chromium.org/202063/diff/2031/2042 File chrome/browser/extensions/extension_file_util.cc (right): http://codereview.chromium.org/202063/diff/2031/2042#newcode313 Line 313: if (file_util::PathExists(locale_path)) ...
11 years, 3 months ago (2009-09-16 22:37:39 UTC) #5
Nebojša Ćirić
> http://codereview.chromium.org/202063/diff/2031/2047#newcode618 > Line 618: // Initialize & localize name. > It makes me uncomfortable ...
11 years, 3 months ago (2009-09-17 16:33:46 UTC) #6
Erik does not do reviews
On Thu, Sep 17, 2009 at 9:33 AM, <cira@chromium.org> wrote: > >> http://codereview.chromium.org/202063/diff/2031/2047#newcode618 >> Line ...
11 years, 3 months ago (2009-09-17 16:53:11 UTC) #7
Nebojša Ćirić
Uploading new version... http://codereview.chromium.org/202063/diff/2031/2042 File chrome/browser/extensions/extension_file_util.cc (right): http://codereview.chromium.org/202063/diff/2031/2042#newcode313 Line 313: if (file_util::PathExists(locale_path)) { On 2009/09/16 ...
11 years, 3 months ago (2009-09-17 20:54:17 UTC) #8
Aaron Boodman
lgtm!
11 years, 3 months ago (2009-09-17 21:34:17 UTC) #9
Aaron Boodman
11 years, 2 months ago (2009-10-07 01:33:17 UTC) #10
If this issue is dead, can we close it please?

Powered by Google App Engine
This is Rietveld 408576698