0

tote tour: Finalize strings

Adds the l10n for the Holding Space wallpaper nudge and replaces the
temporary strings with them.

Bug: b:283169365
Change-Id: I2114b87b2d4f7e29a75629908d1424bfe0946363
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5170294
Reviewed-by: David Black <dmblack@google.com>
Commit-Queue: Angus McLean <angusmclean@google.com>
Cr-Commit-Position: refs/heads/main@{#1244264}
This commit is contained in:
Angus L. M. McLean IV
2024-01-08 21:15:41 +00:00
committed by Chromium LUCI CQ
parent ffa9418b01
commit 4027f2639a
4 changed files with 21 additions and 6 deletions

@ -1629,6 +1629,14 @@ Style notes:
Scanning
</message>
<!-- Holding Space Wallpaper Nudge -->
<message name="IDS_ASH_HOLDING_SPACE_WALLPAPER_NUDGE_DROP_DISABLED_TEXT" desc="Text shown on a nudge anchored to the holding space tray in the shelf to inform new users where files should be dropped for quick access in lieu of the desktop.">
Keep important files in <ph name="HOLDING_SPACE_TITLE">$1</ph> instead of on the desktop. Just drag files to <ph name="HOLDING_SPACE_TITLE">$1</ph>.
</message>
<message name="IDS_ASH_HOLDING_SPACE_WALLPAPER_NUDGE_DROP_ENABLED_TEXT" desc="Text shown on a nudge anchored to the holding space tray in the shelf to inform new users where to find files dropped on the desktop.">
Drop files on the desktop to add them to <ph name="HOLDING_SPACE_TITLE">$1</ph>. You can't add files to desktop.
</message>
<!-- Video Conference Speaking On Mute Nudge -->
<message name="IDS_VIDEO_CONFERENCE_SPEAKING_ON_MUTE_OPT_IN_TITLE" desc="The title of the nudge shown to a user asking them to opt-in to the speaking on mute feature.">
Turn on mute nudge?

@ -0,0 +1 @@
9fe825ab4d0cb385ac2381fcc3ab3ba695c0bf57

@ -0,0 +1 @@
22fa5321174fca30de2c4686f52b695b985499ec

@ -23,6 +23,7 @@
#include "ash/root_window_controller.h"
#include "ash/shelf/shelf.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/holding_space/holding_space_tray.h"
#include "ash/system/status_area_widget.h"
#include "ash/user_education/holding_space_wallpaper_nudge/holding_space_wallpaper_nudge_prefs.h"
@ -42,6 +43,7 @@
#include "ui/base/clipboard/custom_data_helper.h"
#include "ui/base/dragdrop/drop_target_event.h"
#include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/chromeos/styles/cros_tokens_color_mappings.h"
#include "ui/color/color_provider.h"
#include "ui/compositor/layer.h"
@ -86,13 +88,16 @@ const ui::ClipboardFormatType& FilesAppFormatType() {
return ui::ClipboardFormatType::WebCustomDataType();
}
// TODO(http://b/283169365): Finalize strings.
std::u16string GetBubbleBodyText() {
return features::IsHoldingSpaceWallpaperNudgeDropToPinEnabled()
? u"[i18n] Drop files on the desktop to add them to Tote. You "
u"can't add files to desktop."
: u"[i18n] Keep important files in Tote instead of on the "
u"desktop. Just drag files to Tote.";
auto string_id =
features::IsHoldingSpaceWallpaperNudgeDropToPinEnabled()
? IDS_ASH_HOLDING_SPACE_WALLPAPER_NUDGE_DROP_ENABLED_TEXT
: IDS_ASH_HOLDING_SPACE_WALLPAPER_NUDGE_DROP_DISABLED_TEXT;
return l10n_util::GetStringFUTF16(
string_id,
features::IsHoldingSpaceRefreshEnabled()
? l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_TITLE_REFRESH)
: l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_TITLE));
}
aura::Window* GetRootWindowForDisplayId(int64_t display_id) {