0

coral: Add localization for user feedback UI

Bug=b:374116829

Change-Id: I6f0de91c8541105388d808e105a5eb2c7d5ee623
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5955767
Commit-Queue: Connie Xu <conniekxu@chromium.org>
Reviewed-by: Xiaodan Zhu <zxdan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372748}
This commit is contained in:
conniekxu
2024-10-23 16:10:02 +00:00
committed by Chromium LUCI CQ
parent 7b0751a750
commit 337cb5d31a
5 changed files with 22 additions and 7 deletions

@ -8812,6 +8812,15 @@ To shut down the device, press and hold the power button on the device again.
<message name="IDS_ASH_BIRCH_SEND_FEEDBACK" desc="Context menu item that sends feedback about suggestions in informed restore/overview UI">
Send feedback
</message>
<message name="IDS_ASH_BIRCH_CORAL_USER_FEEDBACK_DESCRIPTION" desc="The description for the user feedback UI">
This is experimental AI feature and won't always get it right.
</message>
<message name="IDS_ASH_BIRCH_CORAL_THUMB_UP_ACCESSIBLE_NAME" desc="The accessible name for the thumb up button which is in the user feedback UI">
Thumbs up would submit the feedback that you like this suggestion
</message>
<message name="IDS_ASH_BIRCH_CORAL_THUMB_DOWN_ACCESSIBLE_NAME" desc="The accessible name for the thumb down button which is in the user feedback UI">
Thumbs down would submit the feedback that you dislike this suggestion
</message>
<message name="IDS_ASH_BIRCH_CORAL_SELECTOR_TAB_SUBTITLE" translateable="false" desc="In the birch coral button selector UI, the subtitle for the tab section.">
Tabs
</message>

@ -0,0 +1 @@
f8b50f6daaaa17bf2a7901d9cfcb3da9254dd8f2

@ -0,0 +1 @@
8521f9623603df153d263e1251abbe23f5975eaf

@ -0,0 +1 @@
2e33d4b3415dd5a6e010afb7aa21ecfd83e5c09f

@ -288,9 +288,9 @@ END_METADATA
// | +-----------------------+ +----++-+--+ |
// | | | | || | |
// | +-----------------------+ +----++----+ |
// +--^--------------------------^-------^-----+
// ^ | | |
// | `Label` | 'IconButton'(thumb down)
// +--^--------------------------^-----^-------+
// ^ | | |
// | `Label` | 'IconButton'(thumb down)
// | 'IconButton'(thumb up)
// |
// `UserFeedbackView`
@ -313,8 +313,8 @@ class UserFeedbackView : public views::BoxLayoutView {
views::HighlightBorder::Type::kHighlightBorderNoShadow));
auto* feedback_label = AddChildView(std::make_unique<views::Label>());
feedback_label->SetText(
u"This is experimental AI feature and won't always get it right.");
feedback_label->SetText(l10n_util::GetStringUTF16(
IDS_ASH_BIRCH_CORAL_USER_FEEDBACK_DESCRIPTION));
feedback_label->SetEnabledColorId(cros_tokens::kCrosSysOnSurfaceVariant);
feedback_label->SetMultiLine(true);
feedback_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
@ -329,12 +329,15 @@ class UserFeedbackView : public views::BoxLayoutView {
thumb_buttons_container->AddChildView(std::make_unique<IconButton>(
base::BindOnce(&UserFeedbackView::OnThumbUpButtonPressed,
base::Unretained(this)),
IconButton::Type::kMediumFloating, &kThumbUpIcon, u"test",
IconButton::Type::kMediumFloating, &kThumbUpIcon,
l10n_util::GetStringUTF16(IDS_ASH_BIRCH_CORAL_THUMB_UP_ACCESSIBLE_NAME),
/*is_togglable=*/false, /*has_border=*/false));
thumb_buttons_container->AddChildView(std::make_unique<IconButton>(
base::BindOnce(&UserFeedbackView::OnThumbDownButtonPressed,
base::Unretained(this)),
IconButton::Type::kMediumFloating, &kThumbDownIcon, u"test",
IconButton::Type::kMediumFloating, &kThumbDownIcon,
l10n_util::GetStringUTF16(
IDS_ASH_BIRCH_CORAL_THUMB_DOWN_ACCESSIBLE_NAME),
/*is_togglable=*/false, /*has_border=*/false));
}