Commit c84c8100 authored by Nnamdi Theodore Johnson-Kanu's avatar Nnamdi Theodore Johnson-Kanu Committed by Commit Bot

[CrOS Settings] Update EOL string in "about" settings.

Before this CL, when a device had an end of life (EOL) date set,
we would show a message in the future tense telling the user when
the EOL date would occur. This was confusing if the device had
already passed the EOL date, since that date should have been in
the past tense. This CL adds a new, past-tense string and
displays it when appropriate.

Fixed: 1045687
Change-Id: I09c17a00a2c67fda505feabd30d216a09e5e25e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033342Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Nnamdi Theodore Johnson-kanu <tjohnsonkanu@google.com>
Cr-Commit-Position: refs/heads/master@{#737922}
parent 382170a4
...@@ -53,8 +53,11 @@ ...@@ -53,8 +53,11 @@
<message name="IDS_SETTINGS_ABOUT_PAGE_END_OF_LIFE_TITLE" desc="Title used for End of Life section on the About Page."> <message name="IDS_SETTINGS_ABOUT_PAGE_END_OF_LIFE_TITLE" desc="Title used for End of Life section on the About Page.">
Update schedule Update schedule
</message> </message>
<message name="IDS_SETTINGS_ABOUT_PAGE_END_OF_LIFE_MESSAGE" desc="Message used for End of Life section on the About Page."> <message name="IDS_SETTINGS_ABOUT_PAGE_END_OF_LIFE_MESSAGE_FUTURE" desc="Message used when end of life has not yet past current date in End of Life section on the About Page.">
This device will get automatic software and security updates until <ph name="MONTH_AND_YEAR">$1<ex>September 2020</ex></ph>. &lt;a target="_blank" href="<ph name="URL">$2<ex>https://google.com/</ex></ph>"&gt;Learn more&lt;/a&gt; This device will get automatic software and security updates until <ph name="MONTH_AND_YEAR">$1<ex>September 2020</ex></ph>. <ph name="LINK_BEGIN">&lt;a target="_blank" href="$2<ex>https://google.com/</ex>"&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_ABOUT_PAGE_END_OF_LIFE_MESSAGE_PAST" desc="Message used when End of Life is past current date in END OF LIFE section on the About Page.">
This device stopped getting automatic software and security updates in <ph name="MONTH_AND_YEAR">$1<ex>September 2020</ex></ph>. <ph name="LINK_BEGIN">&lt;a target="_blank" href="$2<ex>https://google.com/</ex>"&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message> </message>
<message name="IDS_SETTINGS_ABOUT_PAGE_LAST_UPDATE_MESSAGE" desc="Message shown on the top level about page to inform the user that this device will no longer receive latest software updates."> <message name="IDS_SETTINGS_ABOUT_PAGE_LAST_UPDATE_MESSAGE" desc="Message shown on the top level about page to inform the user that this device will no longer receive latest software updates.">
This is the last automatic software and security update for this <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph>. To get future updates, upgrade to a newer model. &lt;a target="_blank" href="<ph name="URL">$2<ex>https://google.com/</ex></ph>"&gt;Learn more&lt;/a&gt; This is the last automatic software and security update for this <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph>. To get future updates, upgrade to a newer model. &lt;a target="_blank" href="<ph name="URL">$2<ex>https://google.com/</ex></ph>"&gt;Learn more&lt;/a&gt;
......
f7e4bd12adeb9c148a1a64d2c5dbb34376d348a5
\ No newline at end of file
...@@ -714,11 +714,14 @@ void AboutHandler::OnGetEndOfLifeInfo( ...@@ -714,11 +714,14 @@ void AboutHandler::OnGetEndOfLifeInfo(
base::Value response(base::Value::Type::DICTIONARY); base::Value response(base::Value::Type::DICTIONARY);
if (!eol_info.eol_date.is_null()) { if (!eol_info.eol_date.is_null()) {
response.SetBoolKey("hasEndOfLife", eol_info.eol_date <= base::Time::Now()); response.SetBoolKey("hasEndOfLife", eol_info.eol_date <= base::Time::Now());
response.SetStringKey("aboutPageEndOfLifeMessage", int eol_string_id = eol_info.eol_date <= base::Time::Now()
l10n_util::GetStringFUTF16( ? IDS_SETTINGS_ABOUT_PAGE_END_OF_LIFE_MESSAGE_PAST
IDS_SETTINGS_ABOUT_PAGE_END_OF_LIFE_MESSAGE, : IDS_SETTINGS_ABOUT_PAGE_END_OF_LIFE_MESSAGE_FUTURE;
base::TimeFormatMonthAndYear(eol_info.eol_date), response.SetStringKey(
base::ASCIIToUTF16(chrome::kEolNotificationURL))); "aboutPageEndOfLifeMessage",
l10n_util::GetStringFUTF16(
eol_string_id, base::TimeFormatMonthAndYear(eol_info.eol_date),
base::ASCIIToUTF16(chrome::kEolNotificationURL)));
} else { } else {
response.SetBoolKey("hasEndOfLife", false); response.SetBoolKey("hasEndOfLife", false);
response.SetStringKey("aboutPageEndOfLifeMessage", ""); response.SetStringKey("aboutPageEndOfLifeMessage", "");
......
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