Commit e9a7d248 authored by Michael Checo's avatar Michael Checo Committed by Commit Bot

Diagnostics: Add localized strings for data point titles

Bug: 1125150
Test: browser_tests --gtest_filter=DiagnosticsApp*
Change-Id: Ica69cdfa0325461711373bef5258284ade11b841
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434147Reviewed-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@{#814452}
parent a64ddc44
......@@ -487,6 +487,39 @@ Try tapping the mic to ask me anything.
<message name="IDS_DIAGNOSTICS_CPU_TITLE" desc="The title of the diagnostics CPU section which shows users' information about their computer CPU usage." translateable="false">
CPU
</message>
<message name="IDS_DIAGNOSTICS_CPU_USAGE_LABEL" desc="The label for the percentage of CPU that is currently being used." translateable="false">
Currently using
</message>
<message name="IDS_DIAGNOSTICS_CPU_TEMPERATURE_LABEL" desc="The label for the current CPU temperature." translateable="false">
Temperature
</message>
<message name="IDS_DIAGNOSTICS_TOTAL_MEMORY_LABEL" desc="The label for the total amount of memory on a device." translateable="false">
Total Memory
</message>
<message name="IDS_DIAGNOSTICS_MEMORY_AVAILABLE_LABEL" desc="The label for the amount of memory available on a device." translateable="false">
Memory available
</message>
<message name="IDS_DIAGNOSTICS_POWER_LABEL" desc="The label for the power adapter status." translateable="false">
Power
</message>
<message name="IDS_DIAGNOSTICS_POWER_TIME_LABEL" desc="The label for the time until the battery is fully charged." translateable="false">
Time until full
</message>
<message name="IDS_DIAGNOSTICS_CHARGE_NOW_LABEL" desc="The label for a battery's current battery level represented in milliamps." translateable="false">
Now charge
</message>
<message name="IDS_DIAGNOSTICS_CURRENT_NOW_LABEL" desc="The label for a battery's current power consumption represented in milliamps." translateable="false">
Now current
</message>
<message name="IDS_DIAGNOSTICS_DESIGNED_FULL_CHARGE_LABEL" desc="The label for a battery's designed full charge capacity represented in milliamp hours." translateable="false">
Designed full charge
</message>
<message name="IDS_DIAGNOSTICS_NOW_FULL_CHARGE_LABEL" desc="The label for a battery's full charge capacity represented in milliamp hours." translateable="false">
Now full charge
</message>
<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>
</messages>
</release>
......
......@@ -28,10 +28,21 @@ constexpr char kGeneratedPath[] =
void AddDiagnosticsStrings(content::WebUIDataSource* html_source) {
static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"adapterStatus", IDS_DIAGNOSTICS_POWER_LABEL},
{"batteryTitle", IDS_DIAGNOSTICS_BATTERY_TITLE},
{"chargeFullDesign", IDS_DIAGNOSTICS_DESIGNED_FULL_CHARGE_LABEL},
{"chargeFullNow", IDS_DIAGNOSTICS_NOW_FULL_CHARGE_LABEL},
{"chargeNow", IDS_DIAGNOSTICS_CHARGE_NOW_LABEL},
{"cpuTemp", IDS_DIAGNOSTICS_CPU_TEMPERATURE_LABEL},
{"cpuTitle", IDS_DIAGNOSTICS_CPU_TITLE},
{"cpuUsage", IDS_DIAGNOSTICS_CPU_USAGE_LABEL},
{"currentNow", IDS_DIAGNOSTICS_CURRENT_NOW_LABEL},
{"cycleCount", IDS_DIAGNOSTICS_CYCLE_COUNT_LABEL},
{"diagnosticsTitle", IDS_DIAGNOSTICS_TITLE},
{"memoryAvailable", IDS_DIAGNOSTICS_MEMORY_AVAILABLE_LABEL},
{"memoryTitle", IDS_DIAGNOSTICS_MEMORY_TITLE},
{"powerTime", IDS_DIAGNOSTICS_POWER_TIME_LABEL},
{"totalMemory", IDS_DIAGNOSTICS_TOTAL_MEMORY_LABEL},
};
for (const auto& str : kLocalizedStrings) {
html_source->AddLocalizedString(str.name, str.id);
......
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