Commit a0632f58 authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

Update PWA and non-PWA shortcut menu and title texts

This CL implements recommendations from a Desktop PWA UI review.
 - Use "Install <app>..." instead of "Add <app> to shelf..." for PWAs.
   Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=331947&signed_aid=9D-HKXE7gYd0wUpreYCSAg==&inline=1
   After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=331948&signed_aid=cDTnW4abw74CAZfks6FXkw==&inline=1
 - Use "Create shortcut" instead of "Add to <shortcut container>" for non-PWAs.
   Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=331943&signed_aid=Ok3VbYPcM5cA0kp1mufUcQ==&inline=1
   After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=331944&signed_aid=Jn3zF1Bjunr7NY6U5HZs-Q==&inline=1

In addition to these changes the confirmation dialog for these actions
have been updated for consistency:
 - For PWAs:
   Use "Install app?" instead of "Add to shelf?" for the title.
   Use "Install" instead of "Add" for the button.
   Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=331949&signed_aid=NBRq_H4GTrT_Nlj4uJZUgg==&inline=1
   After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=331957&signed_aid=yEqown9Qn32Do3_UyXfbGw==&inline=1
 - For non-PWAs:
   Use "Create shortcut?" instead of "Add to shelf" for the title.
   Use "Create" instead of "Add" for the button.
   Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=331945&signed_aid=vHvplIxwxZt1AbSCXNlRug==&inline=1
   After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=331958&signed_aid=y82Q7ebdDf31vnnHy_vqcg==&inline=1

Bug: 789817, 822305
Change-Id: Ib2fbe35f43b575a985af6c50094235dc7693a149
Reviewed-on: https://chromium-review.googlesource.com/984916
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546753}
parent 00018286
...@@ -1922,36 +1922,38 @@ are declared in build/common.gypi. ...@@ -1922,36 +1922,38 @@ are declared in build/common.gypi.
</message> </message>
</if> </if>
<!-- Bookmark app bubble --> <!-- Bookmark app bubble -->
<if expr="chromeos"> <if expr="use_titlecase">
<message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="Title of the bubble for adding a bookmark app to the shelf."> <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="In Title Case: Title of the bubble for adding a bookmark app shortcut to the operating system.">
Add to shelf Create Shortcut?
</message> </message>
</if> <message name="IDS_CREATE_SHORTCUTS_BUTTON_LABEL" desc="In Title Case: Text for button that adds a bookmark app shortcut to the operating system.">
<if expr="is_macosx"> Create
<message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="In Title Case: Title of the bubble adding a bookmark app to the Applications Folder on Mac. Note `Applications` should match the name that appears under Favourites in Finder on macOS.">
Add to Applications
</message> </message>
</if> </if>
<if expr="not chromeos and not is_macosx"> <if expr="not use_titlecase">
<message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="Title of the bubble for adding a bookmark app to the desktop."> <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="Title of the bubble for adding a bookmark app shortcut to the operating system.">
Add to desktop Create shortcut?
</message>
<message name="IDS_CREATE_SHORTCUTS_BUTTON_LABEL" desc="Text for button that adds a bookmark app shortcut to the operating system.">
Create
</message> </message>
</if> </if>
<!-- "Install web app" confirmation bubble --> <!-- "Install web app" confirmation bubble -->
<if expr="chromeos"> <if expr="use_titlecase">
<message name="IDS_INSTALL_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="Title of the bubble for installing a web app to the shelf."> <message name="IDS_INSTALL_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="In Title Case: Title of the bubble for installing a web app to the operating system.">
Add to shelf? Install App?
</message> </message>
</if> <message name="IDS_INSTALL_PWA_BUTTON_LABEL" desc="In Title Case: Text for button that installs a web app to the operating system.">
<if expr="is_macosx"> Install
<message name="IDS_INSTALL_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="In Title Case: Title of the bubble for installing a web app to the Applications Folder on Mac. Note `Applications` should match the name that appears under Favourites in Finder on macOS.">
Add to Applications?
</message> </message>
</if> </if>
<if expr="not chromeos and not is_macosx"> <if expr="not use_titlecase">
<message name="IDS_INSTALL_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="Title of the bubble for installing a web app to the desktop."> <message name="IDS_INSTALL_TO_OS_LAUNCH_SURFACE_BUBBLE_TITLE" desc="Title of the bubble for installing a web app to the operating system.">
Add to desktop? Install app?
</message>
<message name="IDS_INSTALL_PWA_BUTTON_LABEL" desc="Text for button that installs a web app to the operating system.">
Install
</message> </message>
</if> </if>
...@@ -1979,36 +1981,26 @@ are declared in build/common.gypi. ...@@ -1979,36 +1981,26 @@ are declared in build/common.gypi.
</if> </if>
<!-- "Create application shortcuts" menu item --> <!-- "Create application shortcuts" menu item -->
<if expr="chromeos"> <if expr="use_titlecase">
<message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="Button text for adding a bookmark app to the shelf."> <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="In Title Case: Menu text for adding a bookmark app shortcut to the operating system.">
Add to shelf... Create Shortcut...
</message>
</if>
<if expr="is_macosx">
<message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="In Title Case: Button text for adding a bookmark app to the Applications Folder. Note `Applications` should match the name that appears under Favourites in Finder on macOS">
Add to Applications...
</message> </message>
</if> </if>
<if expr="not chromeos and not is_macosx"> <if expr="not use_titlecase">
<message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="Button text for adding a bookmark app to the desktop."> <message name="IDS_ADD_TO_OS_LAUNCH_SURFACE" desc="Menu text for adding a bookmark app shortcut to the operating system.">
Add to desktop... Create shortcut...
</message> </message>
</if> </if>
<!-- "Install web app" menu item --> <!-- "Install web app" menu item -->
<if expr="chromeos"> <if expr="use_titlecase">
<message name="IDS_INSTALL_TO_OS_LAUNCH_SURFACE" desc="Button text for installing a web app to the shelf."> <message name="IDS_INSTALL_TO_OS_LAUNCH_SURFACE" desc="In Title Case: Menu text for installing a web app to the operating system.">
Add <ph name="APP">$1<ex>Gmail</ex></ph> to shelf... Install <ph name="APP">$1<ex>Gmail</ex></ph>...
</message>
</if>
<if expr="is_macosx">
<message name="IDS_INSTALL_TO_OS_LAUNCH_SURFACE" desc="In Title Case: Button text for installing a web app to the Applications Folder. Note `Applications` should match the name that appears under Favourites in Finder on macOS">
Add <ph name="APP">$1<ex>Gmail</ex></ph> to Applications...
</message> </message>
</if> </if>
<if expr="not chromeos and not is_macosx"> <if expr="not use_titlecase">
<message name="IDS_INSTALL_TO_OS_LAUNCH_SURFACE" desc="Button text for installing a web app to the desktop."> <message name="IDS_INSTALL_TO_OS_LAUNCH_SURFACE" desc="Menu text for installing a web app to the operating system.">
Add <ph name="APP">$1<ex>Gmail</ex></ph> to desktop... Install <ph name="APP">$1<ex>Gmail</ex></ph>...
</message> </message>
</if> </if>
...@@ -2077,7 +2069,7 @@ are declared in build/common.gypi. ...@@ -2077,7 +2069,7 @@ are declared in build/common.gypi.
</if> </if>
<if expr="not is_macosx"> <if expr="not is_macosx">
<message name="IDS_APPLICATION_INFO_CREATE_SHORTCUTS_BUTTON_TEXT" desc="In Title Case: Text for the button that opens the dialog to create shortcuts for the app."> <message name="IDS_APPLICATION_INFO_CREATE_SHORTCUTS_BUTTON_TEXT" desc="In Title Case: Text for the button that opens the dialog to create shortcuts for the app.">
Create Shortcuts... Create Shortcuts...
</message> </message>
</if> </if>
</if> </if>
......
...@@ -692,11 +692,8 @@ IN_PROC_BROWSER_TEST_P(HostedAppPWAOnlyTest, InstallToShelfContainsAppName) { ...@@ -692,11 +692,8 @@ IN_PROC_BROWSER_TEST_P(HostedAppPWAOnlyTest, InstallToShelfContainsAppName) {
EXPECT_TRUE(app_menu_model->GetModelAndIndexForCommandId( EXPECT_TRUE(app_menu_model->GetModelAndIndexForCommandId(
IDC_CREATE_HOSTED_APP, &model, &index)); IDC_CREATE_HOSTED_APP, &model, &index));
EXPECT_EQ(app_menu_model.get(), model); EXPECT_EQ(app_menu_model.get(), model);
// Just test the beginning of the string as the end is platform dependent. EXPECT_EQ(model->GetLabelAt(index),
base::string16 expected_prefix = base::UTF8ToUTF16("Install Manifest test app\xE2\x80\xA6"));
base::UTF8ToUTF16("Add Manifest test app to ");
EXPECT_EQ(model->GetLabelAt(index).substr(0, expected_prefix.size()),
expected_prefix);
} }
// Tests that mixed content is not loaded inside PWA windows. // Tests that mixed content is not loaded inside PWA windows.
......
...@@ -129,8 +129,9 @@ bool BookmarkAppConfirmationView::Accept() { ...@@ -129,8 +129,9 @@ bool BookmarkAppConfirmationView::Accept() {
base::string16 BookmarkAppConfirmationView::GetDialogButtonLabel( base::string16 BookmarkAppConfirmationView::GetDialogButtonLabel(
ui::DialogButton button) const { ui::DialogButton button) const {
return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK ? IDS_ADD return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK
: IDS_CANCEL); ? IDS_CREATE_SHORTCUTS_BUTTON_LABEL
: IDS_CANCEL);
} }
bool BookmarkAppConfirmationView::IsDialogButtonEnabled( bool BookmarkAppConfirmationView::IsDialogButtonEnabled(
......
...@@ -82,8 +82,9 @@ bool PWAConfirmationView::Accept() { ...@@ -82,8 +82,9 @@ bool PWAConfirmationView::Accept() {
base::string16 PWAConfirmationView::GetDialogButtonLabel( base::string16 PWAConfirmationView::GetDialogButtonLabel(
ui::DialogButton button) const { ui::DialogButton button) const {
return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK ? IDS_ADD return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK
: IDS_CANCEL); ? IDS_INSTALL_PWA_BUTTON_LABEL
: IDS_CANCEL);
} }
namespace { namespace {
......
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