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

Issue 2607843002: [MD settings] i18n template replacements in shared HTML resources (Closed)

Created:
3 years, 11 months ago by dschuyler
Modified:
3 years, 11 months ago
Reviewers:
Dan Beam
CC:
chromium-reviews, dbeam+watch-options_chromium.org, jam, michaelpg+watch-options_chromium.org, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MD settings] i18n template replacements in shared HTML resources This CL unifies the DictionaryValue to TemplateReplacements and provides for $i18n{} replacements in shared resources. This CL doesn't include the html changes to convert i18n-* to $i18n{} replacements. This is so that those changes (which may be large) can be mechanical replacements only (without these code changs). BUG=677338 Committed: https://crrev.com/fe6f5905169ab6f89e7a84a69358269686a8274b Cr-Commit-Position: refs/heads/master@{#441540}

Patch Set 1 #

Patch Set 2 : added TemplateReplacementsSetBool #

Total comments: 2

Patch Set 3 : removed TemplateReplacementsSetBool #

Total comments: 4

Patch Set 4 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -24 lines) Patch
M chrome/browser/ui/webui/options/options_ui.cc View 1 2 3 4 chunks +2 lines, -14 lines 0 comments Download
M content/browser/webui/web_ui_data_source_impl.cc View 1 2 3 1 chunk +2 lines, -9 lines 0 comments Download
M ui/base/template_expressions.h View 2 1 chunk +11 lines, -0 lines 0 comments Download
M ui/base/template_expressions.cc View 1 2 2 chunks +14 lines, -0 lines 0 comments Download
M ui/base/webui/jstemplate_builder.cc View 1 2 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 37 (20 generated)
dschuyler
3 years, 11 months ago (2016-12-28 23:23:27 UTC) #6
Dan Beam
do we really want to support booleans in $i18n{}? is that helpful? https://codereview.chromium.org/2607843002/diff/20001/ui/base/template_expressions.cc File ui/base/template_expressions.cc ...
3 years, 11 months ago (2017-01-03 20:03:15 UTC) #9
dschuyler
On 2017/01/03 20:03:15, Dan Beam wrote: > do we really want to support booleans in ...
3 years, 11 months ago (2017-01-03 20:36:25 UTC) #10
dschuyler
https://codereview.chromium.org/2607843002/diff/20001/ui/base/template_expressions.cc File ui/base/template_expressions.cc (right): https://codereview.chromium.org/2607843002/diff/20001/ui/base/template_expressions.cc#newcode43 ui/base/template_expressions.cc:43: // if truthy and by complete absence (empty string) ...
3 years, 11 months ago (2017-01-03 20:36:57 UTC) #11
dschuyler
On 2017/01/03 20:36:57, dschuyler wrote: > https://codereview.chromium.org/2607843002/diff/20001/ui/base/template_expressions.cc > File ui/base/template_expressions.cc (right): > > https://codereview.chromium.org/2607843002/diff/20001/ui/base/template_expressions.cc#newcode43 > ...
3 years, 11 months ago (2017-01-03 21:33:03 UTC) #12
Dan Beam
On 2017/01/03 20:36:57, dschuyler wrote: > https://codereview.chromium.org/2607843002/diff/20001/ui/base/template_expressions.cc > File ui/base/template_expressions.cc (right): > > https://codereview.chromium.org/2607843002/diff/20001/ui/base/template_expressions.cc#newcode43 > ...
3 years, 11 months ago (2017-01-03 21:33:42 UTC) #13
dschuyler
There are only a few places that would use the boolean values. Removed the boolean ...
3 years, 11 months ago (2017-01-03 22:04:07 UTC) #16
dschuyler
On 2017/01/03 22:04:07, dschuyler wrote: > There are only a few places that would use ...
3 years, 11 months ago (2017-01-03 22:38:17 UTC) #17
Dan Beam
On 2017/01/03 22:38:17, dschuyler wrote: > On 2017/01/03 22:04:07, dschuyler wrote: > > There are ...
3 years, 11 months ago (2017-01-04 03:03:07 UTC) #20
dschuyler
On 2017/01/04 03:03:07, Dan Beam wrote: > On 2017/01/03 22:38:17, dschuyler wrote: > > On ...
3 years, 11 months ago (2017-01-04 03:11:23 UTC) #21
dschuyler
On 2017/01/04 03:11:23, dschuyler wrote: > On 2017/01/04 03:03:07, Dan Beam wrote: > > On ...
3 years, 11 months ago (2017-01-04 03:12:01 UTC) #22
Dan Beam
lgtm https://codereview.chromium.org/2607843002/diff/40001/chrome/browser/ui/webui/options/options_ui.cc File chrome/browser/ui/webui/options/options_ui.cc (right): https://codereview.chromium.org/2607843002/diff/40001/chrome/browser/ui/webui/options/options_ui.cc#newcode205 chrome/browser/ui/webui/options/options_ui.cc:205: ui::TemplateReplacementsFromDictionaryValue(*(localized_strings_.get()), nit: just *localized_strings_
3 years, 11 months ago (2017-01-04 22:41:20 UTC) #23
Dan Beam
https://codereview.chromium.org/2607843002/diff/40001/ui/base/template_expressions.cc File ui/base/template_expressions.cc (right): https://codereview.chromium.org/2607843002/diff/40001/ui/base/template_expressions.cc#newcode27 ui/base/template_expressions.cc:27: if (it.value().IsType(base::Value::Type::STRING)) { might be worth writing a small ...
3 years, 11 months ago (2017-01-04 22:41:51 UTC) #24
dschuyler
I'll think a bit on the unit test. https://codereview.chromium.org/2607843002/diff/40001/chrome/browser/ui/webui/options/options_ui.cc File chrome/browser/ui/webui/options/options_ui.cc (right): https://codereview.chromium.org/2607843002/diff/40001/chrome/browser/ui/webui/options/options_ui.cc#newcode205 chrome/browser/ui/webui/options/options_ui.cc:205: ui::TemplateReplacementsFromDictionaryValue(*(localized_strings_.get()), ...
3 years, 11 months ago (2017-01-04 23:18:29 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2607843002/60001
3 years, 11 months ago (2017-01-05 01:04:23 UTC) #32
commit-bot: I haz the power
Committed patchset #4 (id:60001)
3 years, 11 months ago (2017-01-05 01:11:45 UTC) #35
commit-bot: I haz the power
3 years, 11 months ago (2017-01-05 01:15:32 UTC) #37
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/fe6f5905169ab6f89e7a84a69358269686a8274b
Cr-Commit-Position: refs/heads/master@{#441540}

Powered by Google App Engine
This is Rietveld 408576698