0

Add Strings for apps collections

This cl adds the final strings for apps collections to be localized.

Screenshots for the strings:
https://screenshot.googleplex.com/9gPwe59RbaLQfZY.png
https://screenshot.googleplex.com/3rwoJwhYgqyuHL7.png
https://screenshot.googleplex.com/5FepcMdQn5Rby5p.png

Bug: b:326240643
Change-Id: I078b5a40092bea502cd97fdde50ddbe1c64d5aab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5402901
Commit-Queue: Ana Salazar <anasalazar@chromium.org>
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1279361}
This commit is contained in:
Ana Salazar
2024-03-28 00:27:45 +00:00
committed by Chromium LUCI CQ
parent d066d015ac
commit b69f721279
17 changed files with 87 additions and 15 deletions

@ -8,9 +8,11 @@
#include <vector>
#include "ash/public/cpp/app_list/app_list_types.h"
#include "ash/strings/grit/ash_strings.h"
#include "base/notreached.h"
#include "base/strings/string_util.h"
#include "extensions/common/constants.h"
#include "ui/base/l10n/l10n_util.h"
namespace ash {
@ -23,17 +25,23 @@ std::vector<ash::AppCollection> GetAppCollections() {
std::u16string GetAppCollectionName(ash::AppCollection collection) {
switch (collection) {
case ash::AppCollection::kEssentials:
return u"Essentials";
return l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_ESSENTIALS_NAME);
case ash::AppCollection::kProductivity:
return u"Productivity";
return l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_PRODUCTIVITY_NAME);
case ash::AppCollection::kCreativity:
return u"Creativity";
return l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_CREATIVITY_NAME);
case ash::AppCollection::kEntertainment:
return u"Entertainment";
return l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_ENTERTAINMENT_NAME);
case ash::AppCollection::kUtilities:
return u"Utilities";
return l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_UTILITIES_NAME);
case ash::AppCollection::kUnknown:
return u"Downloaded by you";
return l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_YOUR_APPS_NAME);
case ash::AppCollection::kOem:
NOTREACHED();
return u"";

@ -196,15 +196,18 @@ void AppListToastContainerView::CreateTutorialNudgeView() {
return;
}
AppListToastView::Builder toast_view_builder(u"Tutorial view is on");
AppListToastView::Builder toast_view_builder(
l10n_util::GetStringUTF16(IDS_ASH_LAUNCHER_APPS_COLLECTIONS_NUDGE_TITLE));
toast_view_builder
.SetButton(
u"Dismiss view",
l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_NUDGE_DISMISS_BUTTON),
base::BindRepeating(&AppListToastContainerView::FadeOutToastView,
base::Unretained(this)))
.SetStyleForTabletMode(tablet_mode_)
.SetSubtitle(u"Apps are grouped by category")
.SetSubtitle(l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_NUDGE_SUBTITLE))
.SetIconBackground(true);
toast_view_ = AddChildView(toast_view_builder.Build());

@ -9,6 +9,7 @@
#include "ash/public/cpp/ash_typography.h"
#include "ash/public/cpp/view_shadow.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/style/ash_color_id.h"
#include "ash/style/ash_color_provider.h"
#include "ash/style/dark_light_mode_controller_impl.h"
@ -16,6 +17,7 @@
#include "ash/style/typography.h"
#include "base/functional/bind.h"
#include "base/functional/callback_forward.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/chromeos/styles/cros_tokens_color_mappings.h"
#include "ui/color/color_id.h"
@ -68,7 +70,9 @@ AppsCollectionsDismissDialog::AppsCollectionsDismissDialog(
views::HighlightBorder::Type::kHighlightBorderOnShadow));
// Add dialog title.
title_ = AddChildView(std::make_unique<views::Label>(u"Exit Tutorial View?"));
title_ =
AddChildView(std::make_unique<views::Label>(l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_DISMISS_DIALOG_TITLE)));
TypographyProvider::Get()->StyleLabel(TypographyToken::kCrosTitle1, *title_);
title_->SetEnabledColorId(cros_tokens::kCrosSysOnSurface);
title_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
@ -78,9 +82,9 @@ AppsCollectionsDismissDialog::AppsCollectionsDismissDialog(
title_->layer()->SetFillsBoundsOpaquely(false);
// Add dialog body.
auto* body = AddChildView(
std::make_unique<views::Label>(u"You can start customizing your apps "
u"view once you exit Tutorial View."));
auto* body =
AddChildView(std::make_unique<views::Label>(l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_DISMISS_DIALOG_SUBTITLE)));
body->SetProperty(views::kMarginsKey,
gfx::Insets::TLBR(kMarginBetweenTitleAndBody, 0,
kMarginBetweenBodyAndButtons, 0));
@ -118,11 +122,15 @@ AppsCollectionsDismissDialog::AppsCollectionsDismissDialog(
cancel_button_ = button_row->AddChildView(std::make_unique<ash::PillButton>(
views::Button::PressedCallback(
base::BindRepeating(run_callback, base::Unretained(this), false)),
u"Cancel", PillButton::Type::kDefaultWithoutIcon, nullptr));
l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_DISMISS_DIALOG_CANCEL),
PillButton::Type::kDefaultWithoutIcon, nullptr));
accept_button_ = button_row->AddChildView(std::make_unique<ash::PillButton>(
views::Button::PressedCallback(
base::BindRepeating(run_callback, base::Unretained(this), true)),
u"Exit", PillButton::Type::kPrimaryWithoutIcon, nullptr));
l10n_util::GetStringUTF16(
IDS_ASH_LAUNCHER_APPS_COLLECTIONS_DISMISS_DIALOG_EXIT),
PillButton::Type::kPrimaryWithoutIcon, nullptr));
}
AppsCollectionsDismissDialog::~AppsCollectionsDismissDialog() {}

@ -6674,6 +6674,46 @@ Here are some things you can try to get started.
<message name="IDS_AUTH_FACTOR_LABEL_SIGNED_IN" desc="Label on user's login screen when a Chromebook is successfully logged in.">
Signing in...
</message>
<!-- Launcher: Apps Collections -->
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_ESSENTIALS_NAME" desc="Label for the 'Essentials' collection in the Launcher Apps Collections Tutorial View, which shows a subset of default apps that were categorized as belonging to the Essential apps.">
Essentials
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_PRODUCTIVITY_NAME" desc="Label for the 'Productivity' collection in the Launcher Apps Collections Tutorial View, which shows a subset of default apps that were categorized as belonging to the Productivity apps.">
Productivity
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_CREATIVITY_NAME" desc="Label for the 'Creativity' collection in the Launcher Apps Collections Tutorial View, which shows a subset of default apps that were categorized as belonging to the Creativity apps.">
Creativity
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_ENTERTAINMENT_NAME" desc="Label for the 'Entertainment' collection in the Launcher Apps Collections Tutorial View, which shows a subset of default apps that were categorized as belonging to the Entertainment apps section.">
Entertainment
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_UTILITIES_NAME" desc="Label for the 'Utilities' collection in the Launcher Apps Collections Tutorial View, which shows a subset of default apps that were categorized as belonging to the Utilities apps section.">
Utilities
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_YOUR_APPS_NAME" desc="Label for the 'Your apps' collection in the Launcher Apps Collections Tutorial View, which shows a subset of apps that were downloaded by the user.">
Your apps
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_NUDGE_TITLE" desc="Text for the Apps Collections Tutorial View nudge that is shown on top of the Apps Collections in the Launcher. The tutorial view displays apps categorized in different subsets.">
Get to know your built-in apps
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_NUDGE_SUBTITLE" desc="Subtext for the Apps Collections Tutorial View nudge that is shown on top of the Apps Collections in the Launcher. The tutorial view displays apps categorized in different subsets.">
Apps are organized by category temporarily
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_NUDGE_DISMISS_BUTTON" desc="Label for the Apps Collections Tutorial View nudge button that show on top of the Apps Collections in the Launcher. The tutorial view displays apps categorized in different subsets. Clicking the button will return users to the default launcher with apps displayed in a grid.">
Exit
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_DISMISS_DIALOG_TITLE" desc="Text for the Apps Collections Tutorial View dismiss dialog that shows over the Apps Collections in the Launcher when the user attempts to sort their apps. The dialog serves as confirmation to exit the Apps Collections Tutorial View">
Exit view?
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_DISMISS_DIALOG_SUBTITLE" desc="Subtext for the Apps Collections Tutorial View dismiss dialog that shows over the Apps Collections in the Launcher when the user attempts to sort their apps. The dialog serves as confirmation to exit the Apps Collections Tutorial View">
You can start customizing your app layout once you exit this view.
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_DISMISS_DIALOG_CANCEL" desc="The label for the cancel button on the Apps Collections Tutorial View dismiss dialog that shows over the Apps Collections in the Launcher when the user attempts to sort their apps. The dialog asks for confirmation to exit the Apps Collections Tutorial View and pressing the cancel buton will close the dialog and keep the Tutorial View">
Cancel
</message>
<message name="IDS_ASH_LAUNCHER_APPS_COLLECTIONS_DISMISS_DIALOG_EXIT" desc="The label for the exit button on the Apps Collections Tutorial View dismiss dialog that shows over the Apps Collections in the Launcher when the user attempts to sort their apps. The dialog serves as confirmation to exit the Apps Collections Tutorial View and pressing the exit buton will close the dialog and exit the Tutorial View">
Exit
</message>
<!-- Launcher: Continue Section -->
<message name="IDS_ASH_LAUNCHER_CONTINUE_SECTION_LABEL" desc="Label for the continue section of the launcher, which shows recent files and apps that the user can continue using. [CHAR_LIMIT=70]">

@ -0,0 +1 @@
daf9577d4f649db27c8a01b88957b8ef386193a3

@ -0,0 +1 @@
c2ac2472db1b139926bd722370d0852716a1b66d

@ -0,0 +1 @@
c2ac2472db1b139926bd722370d0852716a1b66d

@ -0,0 +1 @@
c2ac2472db1b139926bd722370d0852716a1b66d

@ -0,0 +1 @@
c2ac2472db1b139926bd722370d0852716a1b66d

@ -0,0 +1 @@
daf9577d4f649db27c8a01b88957b8ef386193a3

@ -0,0 +1 @@
da077f99c469720534473902956fd13a47a5e933

@ -0,0 +1 @@
da077f99c469720534473902956fd13a47a5e933

@ -0,0 +1 @@
da077f99c469720534473902956fd13a47a5e933

@ -0,0 +1 @@
da077f99c469720534473902956fd13a47a5e933

@ -0,0 +1 @@
c92844e812f24864b35a92bbaf8981d595992ffa

@ -0,0 +1 @@
daf9577d4f649db27c8a01b88957b8ef386193a3

@ -0,0 +1 @@
da077f99c469720534473902956fd13a47a5e933