Commit 8ef58b89 authored by Michael Checo's avatar Michael Checo Committed by Commit Bot

Diagnostics: Localize remaining string literals

Bug: 1125150
Test: browser_tests --gtest_filter=DiagnosticsApp*
Change-Id: Ic4abe2d2789e56f5a764a7475bbdc2c3b902a00c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446772Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Michael Checo <michaelcheco@google.com>
Cr-Commit-Position: refs/heads/master@{#814900}
parent 5c18b499
......@@ -520,6 +520,15 @@ Try tapping the mic to ask me anything.
<message name="IDS_DIAGNOSTICS_CYCLE_COUNT_LABEL" desc="The label for a battery's cycle count. The cycle count is the number of times the battery has been drained and recharged." translateable="false">
Cycle count
</message>
<message name="IDS_DIAGNOSTICS_REMAINING_CHARGE_LABEL" desc="The label for the progress bar that displays users' remaining battery charge." translateable="false">
Remaining charge
</message>
<message name="IDS_DIAGNOSTICS_SESSION_LOG_LABEL" desc="The label for the button that opens the session log for the diagnostics app." translateable="false">
Session log
</message>
<message name="IDS_DIAGNOSTICS_USED_MEMORY_LABEL" desc="The label for the progress bar that displays the amount of used memory on a users' device." translateable="false">
Used memory
</message>
</messages>
</release>
......
......@@ -42,7 +42,10 @@ void AddDiagnosticsStrings(content::WebUIDataSource* html_source) {
{"memoryAvailable", IDS_DIAGNOSTICS_MEMORY_AVAILABLE_LABEL},
{"memoryTitle", IDS_DIAGNOSTICS_MEMORY_TITLE},
{"powerTime", IDS_DIAGNOSTICS_POWER_TIME_LABEL},
{"remainingCharge", IDS_DIAGNOSTICS_REMAINING_CHARGE_LABEL},
{"sessionLog", IDS_DIAGNOSTICS_SESSION_LOG_LABEL},
{"totalMemory", IDS_DIAGNOSTICS_TOTAL_MEMORY_LABEL},
{"usedMemory", IDS_DIAGNOSTICS_USED_MEMORY_LABEL},
};
for (const auto& str : kLocalizedStrings) {
html_source->AddLocalizedString(str.name, str.id);
......
......@@ -3,8 +3,7 @@
<diagnostics-card>
<div id="cardTitle" slot="title">[[i18n('batteryTitle')]]</div>
<!-- TODO(joonbug): Localize once strings are confirmed -->
<percent-bar-chart slot="left-panel" header="Remaining charge"
<percent-bar-chart slot="left-panel" header="[[i18n('remainingCharge')]]"
value="[[batteryChargeStatus_.charge_now_milliamp_hours]]"
max="[[batteryChargeStatus_.charge_full_now_milliamp_hours]]">
</percent-bar-chart>
......
......@@ -43,9 +43,8 @@
<memory-card id="memoryCard"></memory-card>
</div>
<div class="session-log-container">
<!-- TODO(michaelcheco): Localize string -->
<cr-button class="session-log-button">
Session log
[[i18n('sessionLog')]]
</cr-button>
</div>
</div>
......@@ -3,8 +3,7 @@
<diagnostics-card>
<div id="cardTitle" slot="title">[[i18n('memoryTitle')]]</div>
<!-- TODO(joonbug): Localize once strings are confirmed -->
<percent-bar-chart slot="left-panel" header="Used memory"
<percent-bar-chart slot="left-panel" header="[[i18n('usedMemory')]]"
value="[[getTotalUsedMemory_(memoryUsage_)]]"
max="[[memoryUsage_.total_memory_kib]]">
</percent-bar-chart>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment