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

Unified Diff: chrome/browser/resources/settings/about_page/about_page.js

Issue 2927213002: [MD settings] I18nBehavior return textContent from i18n() (Closed)
Patch Set: merge with master Created 3 years, 6 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/resources/settings/about_page/about_page.js
diff --git a/chrome/browser/resources/settings/about_page/about_page.js b/chrome/browser/resources/settings/about_page/about_page.js
index 9d990aa56976380bf42ba4f868bc4e183be34106..639345d1490b01b04135ffc55a83789ea582dd96 100644
--- a/chrome/browser/resources/settings/about_page/about_page.js
+++ b/chrome/browser/resources/settings/about_page/about_page.js
@@ -277,25 +277,28 @@ Polymer({
switch (this.currentUpdateStatusEvent_.status) {
case UpdateStatus.CHECKING:
case UpdateStatus.NEED_PERMISSION_TO_UPDATE:
- return this.i18n('aboutUpgradeCheckStarted');
+ return this.i18nAdvanced('aboutUpgradeCheckStarted');
case UpdateStatus.NEARLY_UPDATED:
// <if expr="chromeos">
if (this.currentChannel_ != this.targetChannel_)
- return this.i18n('aboutUpgradeSuccessChannelSwitch');
+ return this.i18nAdvanced('aboutUpgradeSuccessChannelSwitch');
// </if>
- return this.i18n('aboutUpgradeRelaunch');
+ return this.i18nAdvanced('aboutUpgradeRelaunch');
case UpdateStatus.UPDATED:
- return this.i18n('aboutUpgradeUpToDate');
+ return this.i18nAdvanced('aboutUpgradeUpToDate');
case UpdateStatus.UPDATING:
assert(typeof this.currentUpdateStatusEvent_.progress == 'number');
var progressPercent = this.currentUpdateStatusEvent_.progress + '%';
// <if expr="chromeos">
if (this.currentChannel_ != this.targetChannel_) {
- return this.i18n(
- 'aboutUpgradeUpdatingChannelSwitch',
- this.i18n(settings.browserChannelToI18nId(this.targetChannel_)),
- progressPercent);
+ return this.i18nAdvanced('aboutUpgradeUpdatingChannelSwitch', {
+ substitutions: [
+ this.i18nAdvanced(
+ settings.browserChannelToI18nId(this.targetChannel_)),
+ progressPercent
+ ]
+ });
}
// </if>
if (this.currentUpdateStatusEvent_.progress > 0) {
@@ -304,9 +307,11 @@ Polymer({
// it's certainly quite possible to validly end up here with 0% on
// platforms that support incremental progress, nobody really likes
// seeing that they're 0% done with something.
- return this.i18n('aboutUpgradeUpdatingPercent', progressPercent);
+ return this.i18nAdvanced('aboutUpgradeUpdatingPercent', {
+ substitutions: [progressPercent],
+ });
}
- return this.i18n('aboutUpgradeUpdating');
+ return this.i18nAdvanced('aboutUpgradeUpdating');
default:
function formatMessage(msg) {
return parseHtmlSubset(

Powered by Google App Engine
This is Rietveld 408576698