scanner: Finalise and mark copy text strings as translateable.
Bug: b:375967525 Change-Id: If46b467b6db277e679f06a0564a0e29f8bab8d7e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6229168 Reviewed-by: Ahmed Fakhry <afakhry@chromium.org> Commit-Queue: Michelle Chen <michellegc@google.com> Cr-Commit-Position: refs/heads/main@{#1415878}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
29dc1db4d8
commit
34cde45e19
@ -6838,6 +6838,12 @@ Here are some things you can try to get started.
|
||||
<message name="IDS_ASH_SCREEN_CAPTURE_EDUCATION_SETTINGS_NUDGE_LABEL" desc="The label of the Screen Capture Education settings nudge (Arm 3) for using the quick settings menu.">
|
||||
Use the screen capture tool in quick settings to take screenshots
|
||||
</message>
|
||||
<message name="IDS_ASH_SCREEN_CAPTURE_COPY_TEXT_BUTTON_LABEL" desc="The label on a button that can be clicked to copy text from the contents of a screenshot into the user's clipboard.">
|
||||
Copy text
|
||||
</message>
|
||||
<message name="IDS_ASH_SCREEN_CAPTURE_TEXT_COPIED_TOAST" desc="The message shown on a toast to indicate text was copied to the user's clipboard from the contents of a screenshot.">
|
||||
Text copied to Clipboard
|
||||
</message>
|
||||
|
||||
<!-- Scanner -->
|
||||
<!-- TODO: crbug.com/375967525 - Finalize these strings and mark them as translateable -->
|
||||
|
@ -0,0 +1 @@
|
||||
2f50e0f53be491bf869e42eda05348fe4e04ff53
|
@ -0,0 +1 @@
|
||||
df2669fca3b96e4b785eb98bf98fe759a3114231
|
@ -369,10 +369,9 @@ void ShowVideoRecordingStoppedByHdcpNotification() {
|
||||
|
||||
// Shows a toast informing the user that text has been copied to clipboard.
|
||||
void ShowTextCopiedToast() {
|
||||
// TODO(crbug.com/375967525): Finalize and translate the toast string.
|
||||
ToastManager::Get()->Show(ToastData(kCaptureModeTextCopiedToastId,
|
||||
ToastCatalogName::kCaptureModeTextCopied,
|
||||
u"Text copied to clipboard"));
|
||||
ToastManager::Get()->Show(ToastData(
|
||||
kCaptureModeTextCopiedToastId, ToastCatalogName::kCaptureModeTextCopied,
|
||||
l10n_util::GetStringUTF16(IDS_ASH_SCREEN_CAPTURE_TEXT_COPIED_TOAST)));
|
||||
}
|
||||
|
||||
// Copies the bitmap representation of the given |image| to the clipboard.
|
||||
@ -2034,12 +2033,12 @@ void CaptureModeController::AddCopyTextAndSmartActionsButtons(
|
||||
std::string detected_text) {
|
||||
CHECK(!detected_text.empty());
|
||||
|
||||
// TODO(crbug.com/375967525): Finalize and translate the copy text label.
|
||||
capture_mode_util::AddActionButton(
|
||||
base::BindOnce(&CaptureModeController::OnCopyTextButtonClicked,
|
||||
weak_ptr_factory_.GetWeakPtr(),
|
||||
base::UTF8ToUTF16(detected_text)),
|
||||
u"Copy text", &vector_icons::kContentCopyIcon,
|
||||
l10n_util::GetStringUTF16(IDS_ASH_SCREEN_CAPTURE_COPY_TEXT_BUTTON_LABEL),
|
||||
&vector_icons::kContentCopyIcon,
|
||||
ActionButtonRank{ActionButtonType::kCopyText, /*weight=*/0},
|
||||
ActionButtonViewID::kCopyTextButton);
|
||||
capture_mode_session_->AddSmartActionsButton();
|
||||
|
Reference in New Issue
Block a user