Browse Source

Translation key added for domestic remit

master
Preyea Regmi 5 years ago
parent
commit
08ca3753c3
  1. 46
      app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/presenter/DomesticRemitPresenterImpl.java
  2. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/view/DomesticRemitActivity.java
  3. 14
      app/src/main/res/layout/activity_domestic_remit.xml
  4. 13
      app/src/main/res/values/strings.xml

46
app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/presenter/DomesticRemitPresenterImpl.java

@ -50,15 +50,15 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
@Override
public void getDomesticRemitRelatedInfo() {
compositeDisposable.add(
this.gateway.getDomesticRelatedData(gateway.getAuth(), gateway.getUserIDNumber())
.doOnSubscribe(disposable -> view.showProgressBar(true, getStringfromStringId(R.string.processing_request_text)))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doFinally(() -> view.showProgressBar(false, ""))
.subscribeWith(new DomesticRelatedDataObserver())
);
// mockDomesticRemitRelatedData();
// compositeDisposable.add(
// this.gateway.getDomesticRelatedData(gateway.getAuth(), gateway.getUserIDNumber())
// .doOnSubscribe(disposable -> view.showProgressBar(true, getStringfromStringId(R.string.processing_request_text)))
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .doFinally(() -> view.showProgressBar(false, ""))
// .subscribeWith(new DomesticRelatedDataObserver())
// );
mockDomesticRemitRelatedData();
}
@ -67,7 +67,7 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
domesticRemitDataValidator.setServiceCharge(serviceCharge);
String messageServiceCharge = "Service charge: " + Utils.formatCurrencyWithoutTruncatingDecimal(serviceCharge) + " " + Constants.KRW_STRING;
String messageServiceCharge = getStringfromStringId(R.string.service_charge_text)+": " + Utils.formatCurrencyWithoutTruncatingDecimal(serviceCharge) + " " + Constants.KRW_STRING;
view.updateServiceCharge(messageServiceCharge);
}
@ -199,7 +199,7 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
DomesticReicipientInfoDTO data = gateway.getMockedDomesticRecipientInfo(view.getContext());
String message = "The provided account number is associated with name \"ooo\". Do you want to continue?";
String message = getStringfromStringId(R.string.check_recipient_name_text);
String formattedMessage = message.replace("ooo", data.getRecipientName());
view.promptToConfirmRecipientName(getStringfromStringId(R.string.important_text),formattedMessage, new GenericPromptDialog.GenericDialogPromptListener() {
@ -257,7 +257,7 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
domesticRemitDataValidator.setCurrentBalance(balance);
view.showCurrentBalance("Available Balance: " + Utils.formatCurrencyWithoutTruncatingDecimal(balance) + " " + Constants.KRW_STRING);
view.showCurrentBalance(getStringfromStringId(R.string.available_balance_text)+": " + Utils.formatCurrencyWithoutTruncatingDecimal(balance) + " " + Constants.KRW_STRING);
view.showCheckBalanceButton(false);
domesticRemitDataValidator.validateCurrentBalanceWithSendingAmount();
@ -341,7 +341,9 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
this.sendAmount = commaRemovedAmount;
if (sendAmountFormatted < 10000) {
view.setErrorOnWidgetAmount("Minimum sending amount should be at least 10,000 KRW");
String errorMessage=getStringfromStringId(R.string.amount_minimum_error_text);
view.setErrorOnWidgetAmount(errorMessage.replace("ooo","10,000"));
isValidSendAmount = false;
} else {
view.setErrorOnWidgetAmount(null);
@ -356,7 +358,7 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
public void validateRecipientBank(DomesticBankDTO selectedReceiverBank) {
this.selectedRecipientBank=selectedReceiverBank;
if (selectedReceiverBank == null) {
view.setErrorOnWidgetRecipientBank("Please select a bank");
view.setErrorOnWidgetRecipientBank(getStringfromStringId(R.string.bank_empty_error));
view.showSelectedRecipientBankNameAndIcon(null, 0);
isValidRecipientBank = false;
} else {
@ -370,11 +372,11 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
public void validateRecipientBankAccNo(String bankAcNo) {
if (bankAcNo == null || bankAcNo.length() < 1) {
view.setErrorOnWidgetBankAccountNo("Bank account number cannot be empty");
view.setErrorOnWidgetBankAccountNo(getStringfromStringId(R.string.account_number_empty_error));
isValidBankAcNo = false;
this.bankAcNo = null;
} else if (bankAcNo.length() < 9) {
view.setErrorOnWidgetBankAccountNo("Bank account number length must be greater than 9 digits");
view.setErrorOnWidgetBankAccountNo(getStringfromStringId(R.string.min_length_account_error_text));
isValidBankAcNo = false;
this.bankAcNo = null;
} else {
@ -388,7 +390,7 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
public void validateRecipientFullName(String recipientFullName) {
if (recipientFullName == null || recipientFullName.length() < 1) {
view.setErrorOnWidgetFullName("Recipient name cannot be empty");
view.setErrorOnWidgetFullName(getStringfromStringId(R.string.empty_field_error_text));
isValidFullName = false;
this.recipientFullName = null;
} else {
@ -428,7 +430,7 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
//Business requirement, not checking lower bound as it will be handled by server
// else if (formattedCurrentBalance <=formattedServiceCharge || netSendingAmount > formattedCurrentBalance)
else if (netSendingAmount > formattedCurrentBalance) {
view.setErrorOnWidgetAmount("You don't have sufficient amount to do the transaction");
view.setErrorOnWidgetAmount(getStringfromStringId(R.string.insufficient_amount_error_text));
isValidSendAmount = false;
} else {
//User sending Amount is valid
@ -480,12 +482,12 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
domesticRemitDataValidator.setServiceCharge(serviceCharge);
String messageServiceCharge = "Service charge: " + Utils.formatCurrencyWithoutTruncatingDecimal(serviceCharge) + " " + Constants.KRW_STRING;
String messageServiceCharge = getStringfromStringId(R.string.service_charge_text)+": " + Utils.formatCurrencyWithoutTruncatingDecimal(serviceCharge) + " " + Constants.KRW_STRING;
view.updateServiceCharge(messageServiceCharge);
if(t.getData().getAccountList()==null||t.getData().getAccountList().size()<1)
{
String message="Please register an auto-debit account inorder to use this service.";
String message=getStringfromStringId(R.string.doesnt_have_auto_debit_text);
view.showPopUpMessage(message, CustomAlertDialog.AlertType.ALERT, alertType -> view.exitView());
}
@ -519,7 +521,7 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
if (t.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) {
DomesticReicipientInfoDTO data = t.getData();
String message = "The provided account number is associated with name \"ooo\". Do you want to continue?";
String message = getStringfromStringId(R.string.check_recipient_name_text);
String formattedMessage = message.replace("ooo", data.getRecipientName());
view.promptToConfirmRecipientName(getStringfromStringId(R.string.important_text),formattedMessage, new GenericPromptDialog.GenericDialogPromptListener() {
@ -572,7 +574,7 @@ public class DomesticRemitPresenterImpl extends BasePresenter implements Domesti
domesticRemitDataValidator.setCurrentBalance(balance);
view.showCurrentBalance("Available Balance: " + Utils.formatCurrencyWithoutTruncatingDecimal(balance) + " " + Constants.KRW_STRING);
view.showCurrentBalance(getStringfromStringId(R.string.available_balance_text)+": " + Utils.formatCurrencyWithoutTruncatingDecimal(balance) + " " + Constants.KRW_STRING);
view.showCheckBalanceButton(false);
domesticRemitDataValidator.validateCurrentBalanceWithSendingAmount();

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/domesticremit/send/view/DomesticRemitActivity.java

@ -557,7 +557,7 @@ public class DomesticRemitActivity extends BaseActivity implements DomesticRemit
presenter.onSenderAccountSelected(account);
senderAccountListingDialog.dismiss();
});
senderAccountListingDialog.setHintAndTitle(getString(R.string.search_account_text), getString(R.string.select_account_text), getString(R.string.no_account_found_text));
senderAccountListingDialog.setHintAndTitle(getString(R.string.search_account_text), getString(R.string.select_auto_debit_account_text), getString(R.string.no_account_found_text));
senderAccountListingDialog.disableSearch(false);
if (!senderAccountListingDialog.isAdded())
senderAccountListingDialog.show(getSupportFragmentManager(), "AccountSelector");

14
app/src/main/res/layout/activity_domestic_remit.xml

@ -45,7 +45,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Select account"
android:hint="@string/select_auto_debit_account_text"
android:visibility="visible"
app:edFormCursorVisible="false"
app:edFormFocusable="false" />
@ -95,7 +95,7 @@
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:background="@drawable/ic_rounded_country_listing_gray"
android:text="Check Balance"
android:text="@string/account_balance_button_text"
android:textColor="@color/colorPrimaryDark"
android:textSize="17sp"
android:visibility="gone"
@ -118,7 +118,7 @@
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:gravity="right|center_vertical"
android:text="Service Charge "
android:text="@string/service_fee_text"
android:textColor="@color/colorPrimaryDark"
android:textSize="17sp"
android:visibility="invisible"
@ -143,7 +143,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:visibility="visible"
android:hint="Enter Sending Amount (KRW)" />
android:hint="@string/enter_send_amount_text" />
<LinearLayout
@ -186,7 +186,7 @@
android:visibility="visible"
app:edFormCursorVisible="false"
app:edFormFocusable="false"
android:hint="@string/select_bank_text" />
android:hint="@string/select_korea_bank" />
<ImageView
android:layout_width="wrap_content"
@ -218,7 +218,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:visibility="visible"
android:hint="@string/account_text" />
android:hint="@string/account_number_text" />
<com.gmeremit.online.gmeremittance_native.customwidgets.GMEFormInputField
android:id="@+id/recipientFullNameFormInputField"
@ -253,7 +253,7 @@
android:layout_marginBottom="30dp"
android:background="@drawable/ic_rounded_background_red_coloured"
android:enabled="true"
android:text="Verify Bank"
android:text="@string/verify_bank_text"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="16sp" />

13
app/src/main/res/values/strings.xml

@ -190,7 +190,7 @@
<string name="transaction_detail_text">Transaction Details</string>
<string name="paying_amount_text">Paying Amount</string>
<string name="exchange_rate_text">Exchange Rate</string>
<string name="service_charge_text">Service Chage</string>
<string name="service_charge_text">Service Charge</string>
<string name="payout_agent_text">Payout Agent/Bank</string>
<string name="i_have_read_to_text">I have read and agreed to</string>
<string name="gme_user_aggreement_text">Gme Remittance User Agreement</string>
@ -633,6 +633,17 @@
<string name="recent_recipients_text">Recent Recipients</string>
<string name="domestic_text">Domestic</string>
<string name="international_text">International</string>
<string name="select_auto_debit_account_text">Select Your Auto-Debit Account</string>
<string name="enter_send_amount_text">Enter Send Amount (KRW)</string>
<string name="select_korea_bank">Select Korea Bank</string>
<string name="enter_account_text">Enter Account Number</string>
<string name="verify_bank_text">Verify Bank</string>
<string name="account_balance_button_text">View Account Balance</string>
<string name="check_recipient_name_text">The provided account number is associated with name \"ooo\". Do you want to continue?</string>
<string name="doesnt_have_auto_debit_text">Please register an auto-debit account inorder to use this service.</string>
<string name="insufficient_amount_error_text">You don\'t have sufficient amount to do the transaction</string>
<string name="min_length_account_error_text">Account number length cannot be less than 9 digits</string>
<string name="amount_minimum_error_text">Minimum sending amount should be at least ooo KRW</string>
</resources>
Loading…
Cancel
Save