Refine NFC payment wording for "Set default" and "Update" scenarios.

Fixes: 149270345
Test: manual and check if new string is applied
Change-Id: I4d7591882489d3892020f8fa2f963f7c90ec79e4
This commit is contained in:
Robert Luo
2020-03-30 11:39:23 +08:00
parent 61b66a28d9
commit 2f4ebf9475
2 changed files with 21 additions and 7 deletions

View File

@@ -7035,7 +7035,7 @@
<!-- If open app supports TapPay, use that app instead of the default --> <!-- If open app supports TapPay, use that app instead of the default -->
<string name="nfc_payment_favor_open">Except when another payment app is open</string> <string name="nfc_payment_favor_open">Except when another payment app is open</string>
<!-- Header for a dialog asking the user which payment app to use --> <!-- Header for a dialog asking the user which payment app to use -->
<string name="nfc_payment_pay_with">At a Tap &amp; pay terminal, pay with:</string> <string name="nfc_payment_pay_with">At a contactless terminal, pay with:</string>
<!-- Header for text explaning how to pay at a payment terminal in a store --> <!-- Header for text explaning how to pay at a payment terminal in a store -->
<string name="nfc_how_it_works_title">Paying at the terminal</string> <string name="nfc_how_it_works_title">Paying at the terminal</string>
<!-- Content for text explaning how to pay at a payment terminal in a store --> <!-- Content for text explaning how to pay at a payment terminal in a store -->
@@ -7046,9 +7046,21 @@
<string name="nfc_more_title">More...</string> <string name="nfc_more_title">More...</string>
<!-- Label for the dialog that is shown when the user is asked to set a <!-- Label for the dialog that is shown when the user is asked to set a
preferred payment application --> preferred payment application -->
<string name="nfc_payment_set_default_label">Set as your preference?</string> <string name="nfc_payment_set_default_label">Set default payment app</string>
<string name="nfc_payment_set_default">Always use <xliff:g id="app">%1$s</xliff:g> when you Tap &amp; pay?</string> <!-- Label for the dialog that is shown when the user is asked to update a
<string name="nfc_payment_set_default_instead_of">Always use <xliff:g id="app">%1$s</xliff:g> instead of <xliff:g id="app">%2$s</xliff:g> when you Tap &amp; pay?</string> preferred payment application [CHAR LIMIT=50] -->
<string name="nfc_payment_update_default_label">Update default payment app</string>
<string name="nfc_payment_set_default">At a contactless terminal, pay with
<xliff:g id="app">%1$s</xliff:g>
</string>
<string name="nfc_payment_set_default_instead_of">At a contactless terminal, pay with <xliff:g
id="app">%1$s</xliff:g>.\n\nThis replaces <xliff:g id="app">%2$s</xliff:g> as your default
payment app.
</string>
<!-- Label of the Set default button of the Set default payment app dialog [CHAR LIMIT=40] -->
<string name="nfc_payment_btn_text_set_deault">Set default</string>
<!-- Label of the Update button of the Update default payment app dialog [CHAR LIMIT=40] -->
<string name="nfc_payment_btn_text_update">Update</string>
<!-- Restrictions settings --><skip/> <!-- Restrictions settings --><skip/>
<!-- Restriction settings title [CHAR LIMIT=35] --> <!-- Restriction settings title [CHAR LIMIT=35] -->

View File

@@ -111,21 +111,23 @@ public final class PaymentDefaultDialog extends AlertActivity implements
mNewDefault = component; mNewDefault = component;
// Compose dialog; get // Compose dialog; get
final AlertController.AlertParams p = mAlertParams; final AlertController.AlertParams p = mAlertParams;
p.mTitle = getString(R.string.nfc_payment_set_default_label);
if (defaultPaymentApp == null) { if (defaultPaymentApp == null) {
p.mTitle = getString(R.string.nfc_payment_set_default_label);
String formatString = getString(R.string.nfc_payment_set_default); String formatString = getString(R.string.nfc_payment_set_default);
String msg = String.format(formatString, String msg = String.format(formatString,
sanitizePaymentAppCaption(requestedPaymentApp.label.toString())); sanitizePaymentAppCaption(requestedPaymentApp.label.toString()));
p.mMessage = msg; p.mMessage = msg;
p.mPositiveButtonText = getString(R.string.nfc_payment_btn_text_set_deault);
} else { } else {
p.mTitle = getString(R.string.nfc_payment_update_default_label);
String formatString = getString(R.string.nfc_payment_set_default_instead_of); String formatString = getString(R.string.nfc_payment_set_default_instead_of);
String msg = String.format(formatString, String msg = String.format(formatString,
sanitizePaymentAppCaption(requestedPaymentApp.label.toString()), sanitizePaymentAppCaption(requestedPaymentApp.label.toString()),
sanitizePaymentAppCaption(defaultPaymentApp.label.toString())); sanitizePaymentAppCaption(defaultPaymentApp.label.toString()));
p.mMessage = msg; p.mMessage = msg;
p.mPositiveButtonText = getString(R.string.nfc_payment_btn_text_update);
} }
p.mPositiveButtonText = getString(R.string.yes); p.mNegativeButtonText = getString(R.string.cancel);
p.mNegativeButtonText = getString(R.string.no);
p.mPositiveButtonListener = this; p.mPositiveButtonListener = this;
p.mNegativeButtonListener = this; p.mNegativeButtonListener = this;
setupAlert(); setupAlert();