Skip to content

Commit

Permalink
Merge pull request #4 from PayU-EMEA/translate
Browse files Browse the repository at this point in the history
Add new translations
  • Loading branch information
regdos authored Mar 7, 2024
2 parents 568a5d3 + 47d07cf commit 780a50c
Show file tree
Hide file tree
Showing 23 changed files with 431 additions and 18 deletions.
8 changes: 6 additions & 2 deletions app/src/main/res/values/payu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="TypographyDashes">
<!-- Replace placeholder with either production or sandbox -->
<string name="payu_environment">sandbox</string>
<!-- Supported values are: auto, polish, english, german, czech or hungarian -->
<string name="payu_language">auto</string>
<!--
Supported values are:
auto, bulgarian, croatian, czech, english, french, german, greek, hungarian, lithuanian,
polish, romanian, russian, slovak, slovenian, spanish, ukrainian
-->
<string name="payu_language">ukrainian</string>
<bool name="payu_save_and_use_card">true</bool>
<bool name="payu_add_card_option">true</bool>
<bool name="payu_pbl_option">true</bool>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public enum Locale {
CZECH("cs"), GERMAN("de"), HUNGARIAN("hu"),
UKRAINIAN("ua") , SLOVAK("sk"), SPANISH ("es"),
FRENCH("fr"), LITHUANIAN("lt"), ROMANIAN("ro"),
SLOVENIAN("sl");
SLOVENIAN("sl"), BULGARIAN("bg"), GREEK("el"),
CROATIAN("hr"), ITALIAN("it"), RUSSIAN("ru");
private final String mLanguageCode;

Locale(String languageCode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
import static com.google.common.base.Optional.fromNullable;

import com.payu.android.front.sdk.payment_library_core.payment.configuration.Locale;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Bulgarian;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Croatian;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Czech;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.English;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.French;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.German;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Greek;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Hungarian;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Italian;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Lithuanian;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Polish;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Romanian;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Russian;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Slovak;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Slovenian;
import com.payu.android.front.sdk.payment_library_core.translation.dictionary.Spanish;
Expand Down Expand Up @@ -69,8 +74,13 @@ private static Translation getTranslationOrEnglish(Locale locale) {
Translation lithuanianTranslation = new Lithuanian();
Translation romanianTranslation = new Romanian();
Translation slovenianTranslation = new Slovenian();
Translation bulgarianTranslation = new Bulgarian();
Translation greekTranslation = new Greek();
Translation croatianTranslation = new Croatian();
Translation italianTranslation = new Italian();
Translation russianTranslation = new Russian();

Map<Locale, Translation> translations = new HashMap();
Map<Locale, Translation> translations = new HashMap<>();
translations.put(polishTranslation.getLanguage(), polishTranslation);
translations.put(englishTranslation.getLanguage(), englishTranslation);
translations.put(czechTranslation.getLanguage(), czechTranslation);
Expand All @@ -83,6 +93,11 @@ private static Translation getTranslationOrEnglish(Locale locale) {
translations.put(lithuanianTranslation.getLanguage(), lithuanianTranslation);
translations.put(romanianTranslation.getLanguage(), romanianTranslation);
translations.put(slovenianTranslation.getLanguage(), slovenianTranslation);
translations.put(bulgarianTranslation.getLanguage(), bulgarianTranslation);
translations.put(greekTranslation.getLanguage(), greekTranslation);
translations.put(croatianTranslation.getLanguage(), croatianTranslation);
translations.put(italianTranslation.getLanguage(), italianTranslation);
translations.put(russianTranslation.getLanguage(), russianTranslation);

return fromNullable(translations.get(locale)).or(englishTranslation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public enum TranslationKey {
SELECT_PAYMENT_METHOD, CANCEL, PLEASE_WAIT, OK, DIALOG_CANCEL_PAYMENT_MESSAGE, BANK_TRANSFER, REMOVE_METHOD_DIALOG_TITLE,
REMOVE_METHOD_DIALOG_CONTENT, REMOVE, INFORMATIONS, PUBLISHER, PAYU_COMPANY_NAME, APPLICATION_VERSION, SUPPORT_PAYMENT_INFORMATION,
COMPLIANCE_URL, DIALOG_CANCEL_PAYMENT_TITLE, DIALOG_CANCEL_PAYMENT_POSITIVE,
DIALOG_CANCEL_PAYMENT_NEGATIVE, WEB_PAYMENT, CANNOT_SHOW_COMPLIANCE_TEXT, PBL_TITLE, PAYMENT_METHOD_BANK_TRANSFER_DESCRIPTION,
DIALOG_CANCEL_PAYMENT_NEGATIVE, CANNOT_SHOW_COMPLIANCE_TEXT, PBL_TITLE, PAYMENT_METHOD_BANK_TRANSFER_DESCRIPTION,
PAYMENT_METHOD_CARD_DESCRIPTION, EXPIRATION_DATE_HINT_TEXT, INVALID_CVV_ERROR, BLIK_AMBIGUITY_SELECTION, BLIK_HINT,
BLIK_BANK_INFORMATION_SAVE_PAYMENT, BLIK_PAYMENT_NAME, BLIK_NOT_DEFINED_PAYMENT_DESCRIPTION, BLIK_INPUT_NEW_CODE, BLIK_DEFINED_PAYMENT_DESCRIPTION,
SCAN_CARD, SCAN_FAILED, SCAN_CANCELED, BLIK_AMBIGUITY_DESCRIPTION, SECURE_CHECKOUT, SOFT_ACCEPT_DIALOG_TITLE,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package com.payu.android.front.sdk.payment_library_core.translation.dictionary;


import com.payu.android.front.sdk.payment_library_core.payment.configuration.Locale;
import com.payu.android.front.sdk.payment_library_core.translation.TranslationKey;

public class Bulgarian extends StringMapTranslation {

public Bulgarian() {
super();
add(TranslationKey.OK, "OK");
add(TranslationKey.CARD_VALIDATION_EMPTY, "Номерът на картата не трябва да е празен");
add(TranslationKey.CARD_VALIDATION_NUMBER_INCORRECT, "Номерът на картата е грешен");
add(TranslationKey.INVALID_CVV_ERROR, "Моля, въведете валиден код");
add(TranslationKey.CVV_CODE, "CVV2/CVC2 код");
add(TranslationKey.EXPIRATION_DATE_HINT_TEXT, "ММ/ГГ");
add(TranslationKey.CARD_EXPIRATION_DATE_IS_INVALID, "Моля, въведете валидна дата");
add(TranslationKey.CARD_EXPIRATION_DATE, "Дата на изтичане на срока");
add(TranslationKey.CARD_NAME, "Име на картата");
add(TranslationKey.CARD_NUMBER, "Номер на картата");
add(TranslationKey.SAVE_AND_USE, "Запазване и използване");
add(TranslationKey.USE, "Използване");
add(TranslationKey.ENTER_CVV2, "Посочете CVV2/CVC2 код за Вашата карта");
add(TranslationKey.NEW_CARD, "Добавяне на карта");
add(TranslationKey.CREDIT_CARD, "Кредитна карта");
add(TranslationKey.CANCEL, "Отказ");
add(TranslationKey.PLEASE_WAIT, "Моля, изчакайте...");
add(TranslationKey.DIALOG_CANCEL_PAYMENT_TITLE, "Затворете и се върнете обратно");
add(TranslationKey.DIALOG_CANCEL_PAYMENT_POSITIVE, "Да, върнете се обратно");
add(TranslationKey.DIALOG_CANCEL_PAYMENT_NEGATIVE, "Не, останете на страницата за плащане");
add(TranslationKey.DIALOG_CANCEL_PAYMENT_MESSAGE, "Плащането Ви ще бъде отменено. Продължете?");
add(TranslationKey.BANK_TRANSFER, "Банков превод");
add(TranslationKey.REMOVE_METHOD_DIALOG_TITLE, "Изтриване на метод на плащане");
add(TranslationKey.REMOVE_METHOD_DIALOG_CONTENT, "Сигурни ли сте, че искате да премахнете избрания метод на плащане?");
add(TranslationKey.REMOVE, "Премахване");
add(TranslationKey.INFORMATIONS, "Относно");
add(TranslationKey.PUBLISHER, "Издател");
add(TranslationKey.PAYU_COMPANY_NAME, "PayU S.A.");
add(TranslationKey.APPLICATION_VERSION, "Версия на приложението");
add(TranslationKey.SELECT_PAYMENT_METHOD, "Изберете метод на плащане");
add(TranslationKey.SUPPORT_PAYMENT_INFORMATION, "Приемам <a href=\"#\">условията за плащане на PayU</a>");
add(TranslationKey.COMPLIANCE_URL, "https://docs.google.com/viewer?url=https://static.payu.com/sites/terms/files/payu_terms_of_service_single_transaction_pl_en.pdf");
add(TranslationKey.PBL_TITLE, "Банков превод");
add(TranslationKey.CANNOT_SHOW_COMPLIANCE_TEXT, "В устройството няма приложение, което да поддържа това");
add(TranslationKey.PAYMENT_METHOD_CARD_DESCRIPTION, "дебит или кредит");
add(TranslationKey.PAYMENT_METHOD_BANK_TRANSFER_DESCRIPTION, "Банков превод");
add(TranslationKey.BLIK_AMBIGUITY_SELECTION, "Изберете как да платите");
add(TranslationKey.BLIK_HINT, "Въведете BLIK код");
add(TranslationKey.BLIK_BANK_INFORMATION_SAVE_PAYMENT, "Одобрете и запазете плащането на BLIK в приложението на Вашата банка");
add(TranslationKey.BLIK_PAYMENT_NAME, "BLIK");
add(TranslationKey.BLIK_NOT_DEFINED_PAYMENT_DESCRIPTION, "използвайте код от приложението на Вашата банка");
add(TranslationKey.BLIK_INPUT_NEW_CODE, "Въведете нов BLIK код");
add(TranslationKey.BLIK_DEFINED_PAYMENT_DESCRIPTION, "плащане с едно докосване");
add(TranslationKey.BLIK_AMBIGUITY_DESCRIPTION, "запазено плащане на BLIK");
add(TranslationKey.SCAN_CARD, "Сканиране на карта");
add(TranslationKey.SCAN_FAILED, "Сканирането на картата е неуспешно, въведете данните на картата ръчно");
add(TranslationKey.SCAN_CANCELED, "Сканирането на картата е отменено");
add(TranslationKey.SECURE_CHECKOUT, "СИГУРНО ПЛАЩАНЕ");
add(TranslationKey.SOFT_ACCEPT_DIALOG_TITLE, "Проверка на плащането...");
add(TranslationKey.OFFER_INSTALLMENTS_TITLE, "Транзакцията е одобрена");
add(TranslationKey.OFFER_INSTALLMENTS_HEADER, "Разсрочено плащане");
add(TranslationKey.OFFER_INSTALLMENTS_SUBTITLE, "Получателят ще получи цялата сума на поръчката.");
add(TranslationKey.OFFER_INSTALLMENTS_BODY, "Можете да разсрочите това плащане на вноски с Mastercard.");
add(TranslationKey.OFFER_INSTALLMENTS_BUTTON_ACCEPT, "Разсрочено на вноски");
add(TranslationKey.OFFER_INSTALLMENTS_BUTTON_NEGATIVE, "Не, благодаря");
add(TranslationKey.CHOOSE_INSTALLMENTS_SUBTITLE, "Можете да плащате на вноски с Mastercard. Изберете броя на вноските, за да потвърдите.");
add(TranslationKey.CHOOSE_INSTALLMENTS_BUTTON_NEGATIVE, "Не, благодаря");
add(TranslationKey.CHOOSE_INSTALLMENTS_LIST_SUBTITLE_PLURAL, "вноски");
add(TranslationKey.CHOOSE_INSTALLMENTS_LIST_SUBTITLE_SINGULAR, "вноска");
add(TranslationKey.CHOOSE_INSTALLMENTS_LIST_SUBTITLE_MANY, "вноски");
add(TranslationKey.CHOOSE_INSTALLMENTS_LIST_TOTAL_INSTALLMENTS, "общо");
add(TranslationKey.CHOOSE_INSTALLMENTS_LIST_1ST_INSTALLMENT, "Първа вноска");
}

@Override
public Locale getLanguage() {
return Locale.BULGARIAN;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package com.payu.android.front.sdk.payment_library_core.translation.dictionary;


import com.payu.android.front.sdk.payment_library_core.payment.configuration.Locale;
import com.payu.android.front.sdk.payment_library_core.translation.TranslationKey;

public class Croatian extends StringMapTranslation {

public Croatian() {
super();
add(TranslationKey.OK, "U redu");
add(TranslationKey.CARD_VALIDATION_EMPTY, "Broj kartice ne smije biti prazan");
add(TranslationKey.CARD_VALIDATION_NUMBER_INCORRECT, "Broj kartice nije točan");
add(TranslationKey.INVALID_CVV_ERROR, "Unesite valjani kod");
add(TranslationKey.CVV_CODE, "CVV2/CVC2 kod");
add(TranslationKey.EXPIRATION_DATE_HINT_TEXT, "MM/GG");
add(TranslationKey.CARD_EXPIRATION_DATE_IS_INVALID, "Unesite valjani datum");
add(TranslationKey.CARD_EXPIRATION_DATE, "Datum isteka roka trajanja");
add(TranslationKey.CARD_NAME, "Naziv kartice");
add(TranslationKey.CARD_NUMBER, "Broj kartice");
add(TranslationKey.SAVE_AND_USE, "Spremi i koristi");
add(TranslationKey.USE, "Koristiti");
add(TranslationKey.ENTER_CVV2, "Navedite CVV2/CVC2 kod za svoju karticu");
add(TranslationKey.NEW_CARD, "Dodaj karticu");
add(TranslationKey.CREDIT_CARD, "Kreditna kartica");
add(TranslationKey.CANCEL, "Otkazati");
add(TranslationKey.PLEASE_WAIT, "Pričekajte...");
add(TranslationKey.DIALOG_CANCEL_PAYMENT_TITLE, "Zatvori i vrati se");
add(TranslationKey.DIALOG_CANCEL_PAYMENT_POSITIVE, "Da, vrati se");
add(TranslationKey.DIALOG_CANCEL_PAYMENT_NEGATIVE, "Ne, ostani na jednoj stranici za plaćanje");
add(TranslationKey.DIALOG_CANCEL_PAYMENT_MESSAGE, "Vaše plaćanje bit će poništeno. Nastaviti?");
add(TranslationKey.BANK_TRANSFER, "Bankovni transfer");
add(TranslationKey.REMOVE_METHOD_DIALOG_TITLE, "Brisanje načina plaćanja");
add(TranslationKey.REMOVE_METHOD_DIALOG_CONTENT, "Jeste li sigurni da želite ukloniti odabrani način plaćanja?");
add(TranslationKey.REMOVE, "Ukloniti");
add(TranslationKey.INFORMATIONS, "Otprilike");
add(TranslationKey.PUBLISHER, "Izdavatelj");
add(TranslationKey.PAYU_COMPANY_NAME, "PayU S.A.");
add(TranslationKey.APPLICATION_VERSION, "Verzija aplikacije");
add(TranslationKey.SELECT_PAYMENT_METHOD, "Odaberi način plaćanja");
add(TranslationKey.SUPPORT_PAYMENT_INFORMATION, "Prihvaćam <a href=\"#\">PayU uvjete plaćanja</a>");
add(TranslationKey.COMPLIANCE_URL, "https://docs.google.com/viewer?url=https://static.payu.com/sites/terms/files/payu_terms_of_service_single_transaction_pl_en.pdf");
add(TranslationKey.PBL_TITLE, "Bankovni transfer");
add(TranslationKey.CANNOT_SHOW_COMPLIANCE_TEXT, "Na uređaju ne postoji aplikacija koja to podržava");
add(TranslationKey.PAYMENT_METHOD_CARD_DESCRIPTION, "debitno ili kreditno");
add(TranslationKey.PAYMENT_METHOD_BANK_TRANSFER_DESCRIPTION, "Bankovni transfer");
add(TranslationKey.BLIK_AMBIGUITY_SELECTION, "Odaberi način plaćanja");
add(TranslationKey.BLIK_HINT, "Unesite BLIK kod");
add(TranslationKey.BLIK_BANK_INFORMATION_SAVE_PAYMENT, "Autorizirajte i pohranite BLIK plaćanje u svojoj bankovnoj aplikaciji");
add(TranslationKey.BLIK_PAYMENT_NAME, "BLIK");
add(TranslationKey.BLIK_NOT_DEFINED_PAYMENT_DESCRIPTION, "upotrijebi kod iz aplikacije svoje banke");
add(TranslationKey.BLIK_INPUT_NEW_CODE, "Unesite novi BLIK kod");
add(TranslationKey.BLIK_DEFINED_PAYMENT_DESCRIPTION, "plaćanje jednim dodirom");
add(TranslationKey.BLIK_AMBIGUITY_DESCRIPTION, "spremljeno BLIK plaćanje");
add(TranslationKey.SCAN_CARD, "Skeniranje kartice");
add(TranslationKey.SCAN_FAILED, "Ne mogu skenirati karticu,Äì unesite podatke o kartici ručno");
add(TranslationKey.SCAN_CANCELED, "Skeniranje kartice otkazano");
add(TranslationKey.SECURE_CHECKOUT, "SIGURNA NAPLATA");
add(TranslationKey.SOFT_ACCEPT_DIALOG_TITLE, "Provjera plaćanja...");
add(TranslationKey.OFFER_INSTALLMENTS_TITLE, "Transakcija odobrena");
add(TranslationKey.OFFER_INSTALLMENTS_HEADER, "Plaćanje na rate");
add(TranslationKey.OFFER_INSTALLMENTS_SUBTITLE, "Primatelj će dobiti ukupni iznos narudžbe.");
add(TranslationKey.OFFER_INSTALLMENTS_BODY, "Ovu uplatu možete podijeliti u rate s Mastercard karticom.");
add(TranslationKey.OFFER_INSTALLMENTS_BUTTON_ACCEPT, "Podijeljeno na rate");
add(TranslationKey.OFFER_INSTALLMENTS_BUTTON_NEGATIVE, "Ne hvala");
add(TranslationKey.CHOOSE_INSTALLMENTS_SUBTITLE, "Mastercardom možete platiti na rate. Odaberite broj rata za potvrdu.");
add(TranslationKey.CHOOSE_INSTALLMENTS_BUTTON_NEGATIVE, "Ne hvala");
add(TranslationKey.CHOOSE_INSTALLMENTS_LIST_SUBTITLE_PLURAL, "rate");
add(TranslationKey.CHOOSE_INSTALLMENTS_LIST_SUBTITLE_SINGULAR, "rata");
add(TranslationKey.CHOOSE_INSTALLMENTS_LIST_SUBTITLE_MANY, "rate");
add(TranslationKey.CHOOSE_INSTALLMENTS_LIST_TOTAL_INSTALLMENTS, "ukupno");
add(TranslationKey.CHOOSE_INSTALLMENTS_LIST_1ST_INSTALLMENT, "1. rata");
}

@Override
public Locale getLanguage() {
return Locale.CROATIAN;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public Czech() {
add(TranslationKey.SUPPORT_PAYMENT_INFORMATION, "Souhlasím s <a href=\"#\">Platebnimi obchodními podmínkami PayU</a>");
add(TranslationKey.COMPLIANCE_URL,
"https://docs.google.com/viewer?url=https://static.payu.com/sites/terms/files/payu_terms_of_service_single_transaction_cs.pdf");
add(TranslationKey.WEB_PAYMENT, " ");
add(TranslationKey.PBL_TITLE, "Bankovní převod");
add(TranslationKey.CANNOT_SHOW_COMPLIANCE_TEXT, "Chybí mobilní aplikace");
add(TranslationKey.PAYMENT_METHOD_CARD_DESCRIPTION, "Debetní nebo kreditní");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public English() {
add(TranslationKey.SELECT_PAYMENT_METHOD, "Select payment method");
add(TranslationKey.SUPPORT_PAYMENT_INFORMATION, "I accept <a href=\"#\">PayU Payment Terms</a>");
add(TranslationKey.COMPLIANCE_URL, "https://docs.google.com/viewer?url=https://static.payu.com/sites/terms/files/payu_terms_of_service_single_transaction_pl_en.pdf");
add(TranslationKey.WEB_PAYMENT, " ");
add(TranslationKey.PBL_TITLE, "Bank transfer");
add(TranslationKey.CANNOT_SHOW_COMPLIANCE_TEXT, "On the device there is no app to support this");
add(TranslationKey.PAYMENT_METHOD_CARD_DESCRIPTION, "debit or credit");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public French() {
add(TranslationKey.APPLICATION_VERSION, "Version de l'application");
add(TranslationKey.SUPPORT_PAYMENT_INFORMATION, "J'accepte les <a href=\"#\">conditions de paiement de PayU</a>");
add(TranslationKey.COMPLIANCE_URL, "https://docs.google.com/viewer?url=https://static.payu.com/sites/terms/files/payu_terms_of_service_single_transaction_pl_en.pdf");
add(TranslationKey.WEB_PAYMENT, " ");
add(TranslationKey.PBL_TITLE, "Virement bancaire");
add(TranslationKey.CANNOT_SHOW_COMPLIANCE_TEXT, "Nous sommes désolés, mais aucune application sur l'appareil ne prend en charge cette action.");
add(TranslationKey.PAYMENT_METHOD_CARD_DESCRIPTION, "débit ou crédit");
Expand Down
Loading

0 comments on commit 780a50c

Please sign in to comment.