Commit f02e69d7 authored by Melissa Zhang's avatar Melissa Zhang Committed by Commit Bot

[Sharesheet] Add translation for strings.

Bug: 1130409
Change-Id: Iaa4c0c624dd238d1fe26c42f6dfe606fe5c20fdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421987Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Commit-Queue: Melissa Zhang <melzhang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809637}
parent aa496d1d
......@@ -5,4 +5,13 @@
<message name="IDS_SHARESHEET_TITLE_LABEL" desc="The label to be shown as the title of the sharesheet bubble when a user clicks on the share button.">
Share
</message>
<message name="IDS_SHARESHEET_APPS_LIST_LABEL" desc="The label to be shown before the list of apps.">
Apps list
</message>
<message name="IDS_SHARESHEET_MORE_APPS_LABEL" desc="The label for the button at the bottom of the sharesheet which clicks into the expanded sharesheet.">
More apps
</message>
<message name="IDS_SHARESHEET_FEWER_APPS_LABEL" desc="The label for the button at the bottom of the sharesheet which clicks into the default sharesheet.">
Fewer apps
</message>
</grit-part>
32501db09db820361f32e8debbde95b81810da7b
\ No newline at end of file
9eea332d3d39da4a1e5887e755bcf47a09127eb6
\ No newline at end of file
cb42423ee0b152a7460364e832abf984524d26bb
\ No newline at end of file
......@@ -189,10 +189,9 @@ std::unique_ptr<views::View> SharesheetBubbleView::MakeScrollableTargetView() {
kExpandViewPadding);
expanded_layout->StartRow(views::GridLayout::kFixedSize, COLUMN_SET_ID_TITLE,
kExpandViewTitleLabelHeight);
// TODO(crbug.com/1130409) Add translation for this string.
auto* app_list_label =
expanded_layout->AddView(std::make_unique<views::Label>(
base::UTF8ToUTF16(base::StringPiece("Apps list"))));
l10n_util::GetStringUTF16(IDS_SHARESHEET_APPS_LIST_LABEL)));
app_list_label->SetFontList(gfx::FontList(kExpandViewTitleFont));
app_list_label->SetLineHeight(kExpandViewTitleLabelHeight);
app_list_label->SetEnabledColor(kShareTargetTitleColor);
......
......@@ -5,7 +5,9 @@
#include "chrome/browser/ui/views/sharesheet/sharesheet_expand_button.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/grit/generated_resources.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/layout/box_layout.h"
......@@ -45,14 +47,13 @@ SharesheetExpandButton::SharesheetExpandButton(views::ButtonListener* listener)
void SharesheetExpandButton::SetDefaultView() {
icon_->SetImage(
gfx::CreateVectorIcon(kCaretDownIcon, kCaretIconSize, kLabelColor));
// TODO(crbug.com/1130409) Add translation for this and below strings.
label_->SetText(base::UTF8ToUTF16(base::StringPiece("More apps")));
label_->SetText(l10n_util::GetStringUTF16(IDS_SHARESHEET_MORE_APPS_LABEL));
}
void SharesheetExpandButton::SetExpandedView() {
icon_->SetImage(
gfx::CreateVectorIcon(kCaretUpIcon, kCaretIconSize, kLabelColor));
label_->SetText(base::UTF8ToUTF16(base::StringPiece("Fewer apps")));
label_->SetText(l10n_util::GetStringUTF16(IDS_SHARESHEET_FEWER_APPS_LABEL));
}
gfx::Size SharesheetExpandButton::CalculatePreferredSize() const {
......
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