Commit 0d995e6a authored by estade's avatar estade Committed by Commit bot

Autofill - more translated strings in card unmasking prompt

BUG=none

Review URL: https://codereview.chromium.org/983413005

Cr-Commit-Position: refs/heads/master@{#319782}
parent 608e59f9
......@@ -103,7 +103,7 @@ public class CardUnmaskPrompt implements DialogInterface.OnDismissListener, Text
.setTitle(title)
.setView(v)
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.card_unmask_confirm_button, null)
.setPositiveButton(R.string.autofill_card_unmask_confirm_button, null)
.create();
mDialog.setOnDismissListener(this);
......@@ -154,8 +154,8 @@ public class CardUnmaskPrompt implements DialogInterface.OnDismissListener, Text
setInputsEnabled(false);
setOverlayVisibility(View.VISIBLE);
mVerificationProgressBar.setVisibility(View.VISIBLE);
// TODO(estade): l10n
mVerificationView.setText("Verifying card");
mVerificationView.setText(mDialog.getContext().getResources().getString(
R.string.autofill_card_unmask_verification_in_progress));
setInputError(null);
}
......@@ -173,7 +173,8 @@ public class CardUnmaskPrompt implements DialogInterface.OnDismissListener, Text
} else {
mVerificationProgressBar.setVisibility(View.GONE);
mDialog.findViewById(R.id.verification_success).setVisibility(View.VISIBLE);
mVerificationView.setText("Your card is verified");
mVerificationView.setText(mDialog.getContext().getResources().getString(
R.string.autofill_card_unmask_verification_success));
Handler h = new Handler();
h.postDelayed(new Runnable() {
@Override
......
......@@ -11213,9 +11213,15 @@ Chrome ran out of memory.
<message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP" desc="Text that provides further explanation for checkbox in card unmasking dialog that allows user to store a Wallet card on their local device.">
If checked, Chrome will stash a copy of your card on this device for faster form filling.
</message>
<message name="IDS_CARD_UNMASK_CONFIRM_BUTTON" desc="Text for button that confirms the credit card CVC entry dialog." formatter_data="android_java">
<message name="IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON" desc="Text for button that confirms the credit card CVC entry dialog." formatter_data="android_java">
Verify
</message>
<message name="IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_IN_PROGRESS" desc="Message displayed while credit card is being verified." formatter_data="android_java">
Verifying card
</message>
<message name="IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_SUCCESS" desc="Message displayed after successful verification of credit card CVC." formatter_data="android_java">
Your card is verified
</message>
<message name="IDS_AUTOFILL_CARD_UNMASK_PROMPT_ERROR_TRY_AGAIN" desc="Error message that encourages the user to try to re-enter their credit card CVC after a previous failed attempt.">
There was a problem verifying your card. Check your information and try again.
</message>
......
......@@ -76,8 +76,9 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
void GotVerificationResult(const base::string16& error_message,
bool allow_retry) override {
if (!error_message.empty()) {
progress_label_->SetText(base::ASCIIToUTF16("Success!"));
if (error_message.empty()) {
progress_label_->SetText(l10n_util::GetStringUTF16(
IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_SUCCESS));
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE, base::Bind(&CardUnmaskPromptViews::ClosePrompt,
base::Unretained(this)),
......@@ -173,9 +174,8 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
}
base::string16 GetDialogButtonLabel(ui::DialogButton button) const override {
// TODO(estade): fix this.
if (button == ui::DIALOG_BUTTON_OK)
return base::ASCIIToUTF16("Verify");
return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON);
return DialogDelegateView::GetDialogButtonLabel(button);
}
......@@ -314,7 +314,8 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
progress_overlay_->SetVisible(false);
AddChildView(progress_overlay_);
progress_label_ = new views::Label(base::ASCIIToUTF16("Verifying..."));
progress_label_ = new views::Label(l10n_util::GetStringUTF16(
IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_IN_PROGRESS));
progress_overlay_->AddChildView(progress_label_);
}
......
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