Update strings in System Info Answer cards
Bug: b/263994165 Change-Id: If7421f20fbc4f0b145774dfb4da303e54ff28a05 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4677192 Commit-Queue: Lauren Commeignes <laurencom@chromium.org> Reviewed-by: Dmitry Grebenyuk <dgrebenyuk@google.com> Cr-Commit-Position: refs/heads/main@{#1169069}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
2ba732f0e5
commit
4d39f9bcc4
ash
ash_strings.grd
ash_strings_grd
IDS_ASH_BATTERY_STATUS_CHARGING_IN_LAUNCHER_DESCRIPTION_LEFT.png.sha1IDS_ASH_BATTERY_STATUS_CHARGING_IN_LAUNCHER_TITLE.png.sha1IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION.png.sha1IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_LEFT.png.sha1IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_LEFT_SHORT.png.sha1IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_RIGHT.png.sha1IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_TITLE.png.sha1IDS_ASH_CPU_IN_LAUNCHER_TITLE.png.sha1IDS_ASH_MEMORY_USAGE_IN_LAUNCHER_DESCRIPTION.png.sha1
chrome/browser/ash/app_list/search/system_info
@ -1997,21 +1997,24 @@ Style notes:
|
||||
Version <ph name="VERSION_NAME">$1<ex>109.0.5414.125</ex></ph> (<ph name="OFFICIAL_STATUS">$2<ex>Official Build</ex></ph>) <ph name="CHANNEL_NAME">$3<ex>Beta</ex></ph> <ph name="PROCESSOR_VARIATION">$4<ex>(64-bit)</ex></ph>
|
||||
</message>
|
||||
<message name="IDS_ASH_CPU_IN_LAUNCHER_TITLE" desc="Message content for the title of the answer card with the current CPU system information in the launcher.">
|
||||
CPU current usage: <ph name="CPU_USEAGE">$1<ex>89</ex></ph>%
|
||||
CPU usage snapshot: <ph name="CPU_USEAGE">$1<ex>89</ex></ph>%
|
||||
</message>
|
||||
<message name="IDS_ASH_CPU_IN_LAUNCHER_DESCRIPTION" desc="Message content for the description of the answer card with the current CPU system information in the launcher.">
|
||||
Temperature: <ph name="TEMPERATURE">$1<ex>34</ex></ph>°C - Current speed: <ph name="CPU_AVERAGE_CURRENT_FREQUENCY_GHZ">$2<ex>1.52</ex></ph>GHz
|
||||
</message>
|
||||
<message name="IDS_ASH_MEMORY_USAGE_IN_LAUNCHER_DESCRIPTION" desc="Message content for the description of the answer card with the current memory usage information in the launcher.">
|
||||
<ph name="USED_MEMORY">$1<ex>2.4 GB</ex></ph> of <ph name="TOTAL_MEMORY">$2<ex>7.6 GB</ex></ph> available
|
||||
Memory <ph name="USED_MEMORY">$1<ex>2.4 GB</ex></ph> | <ph name="TOTAL_MEMORY">$2<ex>7.6 GB</ex></ph> total
|
||||
</message>
|
||||
<message name="IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_TITLE" desc="Message content for the title of the battery answer card while the battery is discharging, showing the battery power as a percentage and the time left until the battery is empty.">
|
||||
<ph name="BATTERY_PERCENTAGE">$1<ex>56</ex></ph>% | <ph name="TIME">$2<ex>2 hours and 20 minutes</ex></ph> left
|
||||
<message name="IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_LEFT_SHORT" desc="Message content for the short description on the left of the battery answer card.">
|
||||
Battery <ph name="BATTERY_PERCENTAGE">$1<ex>56</ex></ph>%
|
||||
</message>
|
||||
<message name="IDS_ASH_BATTERY_STATUS_CHARGING_IN_LAUNCHER_TITLE" desc="Message content for the title of the battery answer card while the battery is charging, showing the battery power as a percentage and the time left until the battery is full.">
|
||||
<ph name="BATTERY_PERCENTAGE">$1<ex>56</ex></ph>% | <ph name="TIME">$2<ex>2 hours and 20 minutes</ex></ph> until full
|
||||
<message name="IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_LEFT" desc="Message content for the description on the left of the battery answer card while the battery is discharging, showing the battery power as a percentage and the time left until the battery is empty.">
|
||||
Battery <ph name="BATTERY_PERCENTAGE">$1<ex>56</ex></ph>% | <ph name="TIME">$2<ex>2 hours and 20 minutes</ex></ph> left
|
||||
</message>
|
||||
<message name="IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION" desc="Message content for the description of the battery answer card, showing the battery health percentage and the cycle count.">
|
||||
<message name="IDS_ASH_BATTERY_STATUS_CHARGING_IN_LAUNCHER_DESCRIPTION_LEFT" desc="Message content for the description on the left of the battery answer card while the battery is charging, showing the battery power as a percentage and the time left until the battery is full.">
|
||||
Battery <ph name="BATTERY_PERCENTAGE">$1<ex>56</ex></ph>% | <ph name="TIME">$2<ex>2 hours and 20 minutes</ex></ph> until full
|
||||
</message>
|
||||
<message name="IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_RIGHT" desc="Message content for the description on the right of the battery answer card, showing the battery health percentage and the cycle count.">
|
||||
Battery health <ph name="BATTERY_HEALTH_PERCENTAGE">$1<ex>97</ex></ph>% | Cycle count <ph name="CYCLE_COUNT">$2<ex>15</ex></ph>
|
||||
</message>
|
||||
<message name="IDS_ASH_STORAGE_STATUS_IN_LAUNCHER_DESCRIPTION" desc="Message content for the description of the storage answer card, showing the amount of storage currently in use and the total storage size.">
|
||||
|
1
ash/ash_strings_grd/IDS_ASH_BATTERY_STATUS_CHARGING_IN_LAUNCHER_DESCRIPTION_LEFT.png.sha1
Normal file
1
ash/ash_strings_grd/IDS_ASH_BATTERY_STATUS_CHARGING_IN_LAUNCHER_DESCRIPTION_LEFT.png.sha1
Normal file
@ -0,0 +1 @@
|
||||
c1b0ed5ac873b8ea31bee4c46c59e6eda6a2af49
|
@ -1 +0,0 @@
|
||||
1d0a473e04ffd49282cbe02250921d35049eb2df
|
@ -1 +0,0 @@
|
||||
1d0a473e04ffd49282cbe02250921d35049eb2df
|
@ -0,0 +1 @@
|
||||
5e7abbe84ac56dcc318a423fa0a4ddd9268be936
|
1
ash/ash_strings_grd/IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_LEFT_SHORT.png.sha1
Normal file
1
ash/ash_strings_grd/IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_LEFT_SHORT.png.sha1
Normal file
@ -0,0 +1 @@
|
||||
d2e1d6a719b542159d7113f69e13c7657ee18cf3
|
@ -0,0 +1 @@
|
||||
c1b0ed5ac873b8ea31bee4c46c59e6eda6a2af49
|
@ -1 +0,0 @@
|
||||
930303deb6deea305228d99e6d3ba7ee9eafeaa5
|
@ -1 +1 @@
|
||||
29a96f73916543be23bbd10d0a4dd284f2f1b173
|
||||
99c3ca9b43add51a519c9f55deed23a414fc19b2
|
@ -1 +1 @@
|
||||
1749ecf2ce3a463ce19ccb54f80f36f26a6d6120
|
||||
f596fed09846125e00a1844d999e5d3a40c8184f
|
@ -357,7 +357,7 @@ void SystemInfoCardProvider::OnBatteryInfoUpdated(
|
||||
PopulatePowerStatus(proto.value(), *new_battery_health.get());
|
||||
|
||||
std::u16string description = l10n_util::GetStringFUTF16(
|
||||
IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION,
|
||||
IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_RIGHT,
|
||||
base::NumberToString16(new_battery_health->GetBatteryWearPercentage()),
|
||||
base::NumberToString16(new_battery_health->GetCycleCount()));
|
||||
|
||||
|
@ -429,7 +429,7 @@ TEST_F(SystemInfoCardProviderTest, Cpu) {
|
||||
ASSERT_EQ(results()[0]->title_text_vector().size(), 1u);
|
||||
const auto& title = results()[0]->title_text_vector()[0];
|
||||
ASSERT_EQ(title.GetType(), ash::SearchResultTextItemType::kString);
|
||||
EXPECT_EQ(title.GetText(), u"CPU current usage: 66%");
|
||||
EXPECT_EQ(title.GetText(), u"CPU usage snapshot: 66%");
|
||||
EXPECT_TRUE(title.GetTextTags().empty());
|
||||
|
||||
ASSERT_EQ(results()[0]->details_text_vector().size(), 1u);
|
||||
@ -454,7 +454,7 @@ TEST_F(SystemInfoCardProviderTest, Cpu) {
|
||||
timer_ptr->Fire();
|
||||
Wait();
|
||||
|
||||
EXPECT_EQ(title.GetText(), u"CPU current usage: 60%");
|
||||
EXPECT_EQ(title.GetText(), u"CPU usage snapshot: 60%");
|
||||
EXPECT_EQ(details.GetText(), u"Temperature: 20°C - Current speed: 5.5GHz");
|
||||
|
||||
SetCrosHealthdCpuResponse({core_1 + core_1_delta + core_1_delta,
|
||||
@ -468,7 +468,7 @@ TEST_F(SystemInfoCardProviderTest, Cpu) {
|
||||
ASSERT_FALSE(results().empty());
|
||||
EXPECT_EQ(results().size(), 1u);
|
||||
const auto& title2 = results()[0]->title_text_vector()[0];
|
||||
EXPECT_EQ(title2.GetText(), u"CPU current usage: 60%");
|
||||
EXPECT_EQ(title2.GetText(), u"CPU usage snapshot: 60%");
|
||||
const auto& details2 = results()[0]->details_text_vector()[0];
|
||||
EXPECT_EQ(details2.GetText(), u"Temperature: 20°C - Current speed: 5.5GHz");
|
||||
}
|
||||
@ -532,7 +532,7 @@ TEST_F(SystemInfoCardProviderTest, Memory) {
|
||||
ASSERT_EQ(results()[0]->details_text_vector().size(), 1u);
|
||||
const auto& details = results()[0]->details_text_vector()[0];
|
||||
EXPECT_EQ(details.GetType(), ash::SearchResultTextItemType::kString);
|
||||
EXPECT_EQ(details.GetText(), u"3.8 GB of 7.6 GB available");
|
||||
EXPECT_EQ(details.GetText(), u"Memory 3.8 GB | 7.6 GB total");
|
||||
EXPECT_TRUE(details.GetTextTags().empty());
|
||||
|
||||
const uint32_t total_memory_kib_2 = 8000000;
|
||||
@ -546,7 +546,7 @@ TEST_F(SystemInfoCardProviderTest, Memory) {
|
||||
Wait();
|
||||
|
||||
EXPECT_EQ(title.GetText(), u"");
|
||||
EXPECT_EQ(details.GetText(), u"1.9 GB of 7.6 GB available");
|
||||
EXPECT_EQ(details.GetText(), u"Memory 1.9 GB | 7.6 GB total");
|
||||
EXPECT_EQ(results()[0]->system_info_answer_card_data()->bar_chart_percentage,
|
||||
75);
|
||||
|
||||
@ -556,7 +556,7 @@ TEST_F(SystemInfoCardProviderTest, Memory) {
|
||||
ASSERT_FALSE(results().empty());
|
||||
EXPECT_EQ(results().size(), 1u);
|
||||
const auto& details2 = results()[0]->details_text_vector()[0];
|
||||
EXPECT_EQ(details2.GetText(), u"1.9 GB of 7.6 GB available");
|
||||
EXPECT_EQ(details2.GetText(), u"Memory 1.9 GB | 7.6 GB total");
|
||||
EXPECT_EQ(results()[0]->system_info_answer_card_data()->bar_chart_percentage,
|
||||
75);
|
||||
}
|
||||
@ -623,7 +623,7 @@ TEST_F(SystemInfoCardProviderTest, Battery) {
|
||||
ASSERT_EQ(results()[0]->title_text_vector().size(), 1u);
|
||||
const auto& title = results()[0]->title_text_vector()[0];
|
||||
ASSERT_EQ(title.GetType(), ash::SearchResultTextItemType::kString);
|
||||
EXPECT_EQ(title.GetText(), u"94% | 17 minutes until full");
|
||||
EXPECT_EQ(title.GetText(), u"Battery 94% | 17 minutes until full");
|
||||
EXPECT_TRUE(title.GetTextTags().empty());
|
||||
|
||||
ASSERT_EQ(results()[0]->details_text_vector().size(), 1u);
|
||||
@ -646,8 +646,24 @@ TEST_F(SystemInfoCardProviderTest, Battery) {
|
||||
ASSERT_EQ(results()[0]->title_text_vector().size(), 1u);
|
||||
const auto& updated_title = results()[0]->title_text_vector()[0];
|
||||
ASSERT_EQ(updated_title.GetType(), ash::SearchResultTextItemType::kString);
|
||||
EXPECT_EQ(updated_title.GetText(), u"96% | 15 minutes until full");
|
||||
EXPECT_EQ(updated_title.GetText(), u"Battery 96% | 15 minutes until full");
|
||||
EXPECT_TRUE(updated_title.GetTextTags().empty());
|
||||
|
||||
SetPowerManagerProperties(power_source, battery_state, true,
|
||||
time_to_full_secs, time_to_empty_secs,
|
||||
new_battery_percent);
|
||||
StartSearch(u"battery");
|
||||
Wait();
|
||||
|
||||
EXPECT_EQ(results()[0]->system_info_answer_card_data()->bar_chart_percentage,
|
||||
96);
|
||||
|
||||
ASSERT_EQ(results()[0]->title_text_vector().size(), 1u);
|
||||
const auto& calculating_title = results()[0]->title_text_vector()[0];
|
||||
ASSERT_EQ(calculating_title.GetType(),
|
||||
ash::SearchResultTextItemType::kString);
|
||||
EXPECT_EQ(calculating_title.GetText(), u"Battery 96%");
|
||||
EXPECT_TRUE(calculating_title.GetTextTags().empty());
|
||||
}
|
||||
|
||||
TEST_F(SystemInfoCardProviderTest, BatteryProbeError) {
|
||||
|
@ -248,12 +248,13 @@ std::u16string CalculatePowerTime(
|
||||
std::u16string status_text;
|
||||
if (show_time) {
|
||||
status_text = l10n_util::GetStringFUTF16(
|
||||
charging ? IDS_ASH_BATTERY_STATUS_CHARGING_IN_LAUNCHER_TITLE
|
||||
: IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_TITLE,
|
||||
charging ? IDS_ASH_BATTERY_STATUS_CHARGING_IN_LAUNCHER_DESCRIPTION_LEFT
|
||||
: IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_LEFT,
|
||||
base::NumberToString16(percent), GetBatteryTimeText(time_left));
|
||||
} else {
|
||||
status_text = l10n_util::GetStringFUTF16(IDS_SETTINGS_BATTERY_STATUS_SHORT,
|
||||
base::NumberToString16(percent));
|
||||
status_text = l10n_util::GetStringFUTF16(
|
||||
IDS_ASH_BATTERY_STATUS_IN_LAUNCHER_DESCRIPTION_LEFT_SHORT,
|
||||
base::NumberToString16(percent));
|
||||
}
|
||||
return status_text;
|
||||
}
|
||||
|
Reference in New Issue
Block a user