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 ...@@ -103,7 +103,7 @@ public class CardUnmaskPrompt implements DialogInterface.OnDismissListener, Text
.setTitle(title) .setTitle(title)
.setView(v) .setView(v)
.setNegativeButton(R.string.cancel, null) .setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.card_unmask_confirm_button, null) .setPositiveButton(R.string.autofill_card_unmask_confirm_button, null)
.create(); .create();
mDialog.setOnDismissListener(this); mDialog.setOnDismissListener(this);
...@@ -154,8 +154,8 @@ public class CardUnmaskPrompt implements DialogInterface.OnDismissListener, Text ...@@ -154,8 +154,8 @@ public class CardUnmaskPrompt implements DialogInterface.OnDismissListener, Text
setInputsEnabled(false); setInputsEnabled(false);
setOverlayVisibility(View.VISIBLE); setOverlayVisibility(View.VISIBLE);
mVerificationProgressBar.setVisibility(View.VISIBLE); mVerificationProgressBar.setVisibility(View.VISIBLE);
// TODO(estade): l10n mVerificationView.setText(mDialog.getContext().getResources().getString(
mVerificationView.setText("Verifying card"); R.string.autofill_card_unmask_verification_in_progress));
setInputError(null); setInputError(null);
} }
...@@ -173,7 +173,8 @@ public class CardUnmaskPrompt implements DialogInterface.OnDismissListener, Text ...@@ -173,7 +173,8 @@ public class CardUnmaskPrompt implements DialogInterface.OnDismissListener, Text
} else { } else {
mVerificationProgressBar.setVisibility(View.GONE); mVerificationProgressBar.setVisibility(View.GONE);
mDialog.findViewById(R.id.verification_success).setVisibility(View.VISIBLE); 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(); Handler h = new Handler();
h.postDelayed(new Runnable() { h.postDelayed(new Runnable() {
@Override @Override
......
...@@ -11213,9 +11213,15 @@ Chrome ran out of memory. ...@@ -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."> <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. If checked, Chrome will stash a copy of your card on this device for faster form filling.
</message> </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 Verify
</message> </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."> <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. There was a problem verifying your card. Check your information and try again.
</message> </message>
......
...@@ -76,8 +76,9 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView, ...@@ -76,8 +76,9 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
void GotVerificationResult(const base::string16& error_message, void GotVerificationResult(const base::string16& error_message,
bool allow_retry) override { bool allow_retry) override {
if (!error_message.empty()) { if (error_message.empty()) {
progress_label_->SetText(base::ASCIIToUTF16("Success!")); progress_label_->SetText(l10n_util::GetStringUTF16(
IDS_AUTOFILL_CARD_UNMASK_VERIFICATION_SUCCESS));
base::MessageLoop::current()->PostDelayedTask( base::MessageLoop::current()->PostDelayedTask(
FROM_HERE, base::Bind(&CardUnmaskPromptViews::ClosePrompt, FROM_HERE, base::Bind(&CardUnmaskPromptViews::ClosePrompt,
base::Unretained(this)), base::Unretained(this)),
...@@ -173,9 +174,8 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView, ...@@ -173,9 +174,8 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
} }
base::string16 GetDialogButtonLabel(ui::DialogButton button) const override { base::string16 GetDialogButtonLabel(ui::DialogButton button) const override {
// TODO(estade): fix this.
if (button == ui::DIALOG_BUTTON_OK) if (button == ui::DIALOG_BUTTON_OK)
return base::ASCIIToUTF16("Verify"); return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON);
return DialogDelegateView::GetDialogButtonLabel(button); return DialogDelegateView::GetDialogButtonLabel(button);
} }
...@@ -314,7 +314,8 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView, ...@@ -314,7 +314,8 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
progress_overlay_->SetVisible(false); progress_overlay_->SetVisible(false);
AddChildView(progress_overlay_); 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_); 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