Skip to content

Commit

Permalink
enum naming changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AmniX committed Nov 12, 2024
1 parent 3ccda29 commit fcb7f28
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.komoju.mobile.sdk.i18n

object EnglishStrings : I18nStrings {
override fun get(key: I18nStringKey): String = when (key) {
I18nStringKey.cadrholder_name_cannot_be_empty -> "The entered cardholder name cannot be empty"
I18nStringKey.cardholder_name_cannot_be_empty -> "The entered cardholder name cannot be empty"
I18nStringKey.the_entered_cardholder_name_is_not_valid -> "The entered cardholder name is not valid"
I18nStringKey.the_entered_card_number_is_not_valid -> "The entered card number is not valid"
I18nStringKey.the_entered_expiry_date_is_not_valid -> "The entered expiry date is not valid"
Expand Down Expand Up @@ -44,9 +44,9 @@ object EnglishStrings : I18nStrings {
I18nStringKey.daily_yamazaki -> "Daily Yamazaki"
I18nStringKey.family_mart -> "Family Mart"
I18nStringKey.lawson -> "Lawson"
I18nStringKey.ministop -> "MiniStop"
I18nStringKey.seicomart -> "SeicoMart"
I18nStringKey._7_eleven -> "7-Eleven"
I18nStringKey.mini_stop -> "MiniStop"
I18nStringKey.seico_mart -> "SeicoMart"
I18nStringKey.seven_eleven -> "7-Eleven"
I18nStringKey.full_name_on_receipt -> "Full name on receipt"
I18nStringKey.name_shown_on_receipt -> "Name (shown on receipt)"
I18nStringKey.email -> "Email"
Expand All @@ -66,11 +66,11 @@ object EnglishStrings : I18nStrings {
I18nStringKey.you_will_be_redirected_to_rakuten -> "You will be redirected to Rakuten to complete the payment"
I18nStringKey.you_will_be_redirected_to_line_pay -> "You will be redirected to Line Pay to complete the payment"
I18nStringKey.continue_to_alipay -> "Continue to Alipay"
I18nStringKey.continue_to_aupay -> "Continue to AuPay"
I18nStringKey.continue_to_merpay -> "Continue to MerPay"
I18nStringKey.continue_to_au_pay -> "Continue to AuPay"
I18nStringKey.continue_to_mer_pay -> "Continue to MerPay"
I18nStringKey.continue_to_paypay -> "Continue to PayPay"
I18nStringKey.continue_to_rakuten -> "Continue to Rakuten"
I18nStringKey.continue_to_linepay -> "Continue to LinePay"
I18nStringKey.continue_to_line_pay -> "Continue to LinePay"
I18nStringKey.continue_to_paidy -> "Continue to Paidy"
I18nStringKey.webview_open_info -> "Note a web window will be opened.After purchase you will be redirected back."
I18nStringKey.full_name -> "Full Name"
Expand All @@ -81,28 +81,28 @@ object EnglishStrings : I18nStrings {
I18nStringKey.first_name -> "First Name"
I18nStringKey.last_name_phonetic -> "Last Name (Phonetic)"
I18nStringKey.first_name_phonetic -> "First Name (Phonetic)"
I18nStringKey.webmoney_information -> "WebMoney Information"
I18nStringKey.web_money_information -> "WebMoney Information"
I18nStringKey.prepaid_number -> "Prepaid number"
I18nStringKey.payment_success -> "Payment Success"
I18nStringKey.thank_you_for_your_order -> "Thank you for your order"
I18nStringKey.bitcash_information -> "BitCash Information"
I18nStringKey.bit_cash_information -> "BitCash Information"
I18nStringKey.hiragana_id -> "Hiragana id"
I18nStringKey.bank_transfer -> "Bank Transfer"
I18nStringKey.bitcash -> "BitCash"
I18nStringKey.bit_cash -> "BitCash"
I18nStringKey.credit_card -> "Credit card"
I18nStringKey.konbini -> "Konbini"
I18nStringKey.netcash -> "NetCash"
I18nStringKey.aupay -> "au Pay"
I18nStringKey.net_cash -> "NetCash"
I18nStringKey.au_pay -> "au Pay"
I18nStringKey.alipay -> "AliPay"
I18nStringKey.merpay -> "Mer Pay"
I18nStringKey.mer_pay -> "Mer Pay"
I18nStringKey.paypay -> "PayPay"
I18nStringKey.rakuten_pay -> "Rakuten Pay"
I18nStringKey.line_pay -> "Line Pay"
I18nStringKey.unknown -> "Unknown"
I18nStringKey.other -> "Other"
I18nStringKey.paidy -> "Paidy"
I18nStringKey.payeasy -> "PayEasy"
I18nStringKey.webmoney -> "WebMoney"
I18nStringKey.pay_easy -> "PayEasy"
I18nStringKey.web_money -> "WebMoney"
I18nStringKey.total_payment -> "Total Payment"
I18nStringKey.the_entered_name_cannot_be_empty -> "The entered name cannot be empty"
I18nStringKey.the_entered_email_is_not_valid -> "The entered email is not valid"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.komoju.mobile.sdk.i18n

@Suppress("EnumEntryName")
enum class I18nStringKey {
cadrholder_name_cannot_be_empty,
cardholder_name_cannot_be_empty,
the_entered_cardholder_name_is_not_valid,
the_entered_card_number_is_not_valid,
the_entered_expiry_date_is_not_valid,
Expand Down Expand Up @@ -37,9 +38,9 @@ enum class I18nStringKey {
daily_yamazaki,
family_mart,
lawson,
ministop,
seicomart,
_7_eleven,
mini_stop,
seico_mart,
seven_eleven,
full_name_on_receipt,
name_shown_on_receipt,
email,
Expand All @@ -59,11 +60,11 @@ enum class I18nStringKey {
you_will_be_redirected_to_rakuten,
you_will_be_redirected_to_line_pay,
continue_to_alipay,
continue_to_aupay,
continue_to_merpay,
continue_to_au_pay,
continue_to_mer_pay,
continue_to_paypay,
continue_to_rakuten,
continue_to_linepay,
continue_to_line_pay,
continue_to_paidy,
webview_open_info,
full_name,
Expand All @@ -74,28 +75,28 @@ enum class I18nStringKey {
first_name,
last_name_phonetic,
first_name_phonetic,
webmoney_information,
web_money_information,
prepaid_number,
payment_success,
thank_you_for_your_order,
bitcash_information,
bit_cash_information,
hiragana_id,
bank_transfer,
bitcash,
bit_cash,
credit_card,
konbini,
netcash,
aupay,
net_cash,
au_pay,
alipay,
merpay,
mer_pay,
paypay,
rakuten_pay,
line_pay,
unknown,
other,
paidy,
payeasy,
webmoney,
pay_easy,
web_money,
total_payment,
the_entered_name_cannot_be_empty,
the_entered_email_is_not_valid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.komoju.mobile.sdk.i18n

object JapaneseStrings : I18nStrings {
override fun get(key: I18nStringKey): String = when (key) {
I18nStringKey.cadrholder_name_cannot_be_empty -> "入力したカード所有者名は空欄にできません"
I18nStringKey.cardholder_name_cannot_be_empty -> "入力したカード所有者名は空欄にできません"
I18nStringKey.the_entered_cardholder_name_is_not_valid -> "入力したカード所有者名は無効です"
I18nStringKey.the_entered_card_number_is_not_valid -> "入力したカード番号は無効です"
I18nStringKey.the_entered_expiry_date_is_not_valid -> "入力した有効期限は無効です"
Expand Down Expand Up @@ -38,9 +38,9 @@ object JapaneseStrings : I18nStrings {
I18nStringKey.daily_yamazaki -> "デイリーヤマザキ"
I18nStringKey.family_mart -> "ファミリーマート"
I18nStringKey.lawson -> "ローソン"
I18nStringKey.ministop -> "ミニストップ"
I18nStringKey.seicomart -> "セイコーマート"
I18nStringKey._7_eleven -> "セブンイレブン"
I18nStringKey.mini_stop -> "ミニストップ"
I18nStringKey.seico_mart -> "セイコーマート"
I18nStringKey.seven_eleven -> "セブンイレブン"
I18nStringKey.full_name_on_receipt -> "レシートのフルネーム"
I18nStringKey.name_shown_on_receipt -> "名前(カードに記載)領収書)"
I18nStringKey.email -> "メール"
Expand All @@ -60,11 +60,11 @@ object JapaneseStrings : I18nStrings {
I18nStringKey.you_will_be_redirected_to_rakuten -> "支払いを完了するには、Rakuten にリダイレクトされますお支払い"
I18nStringKey.you_will_be_redirected_to_line_pay -> "お支払いを完了するには、Line Pay にリダイレクトされます"
I18nStringKey.continue_to_alipay -> "Alipay に進みます"
I18nStringKey.continue_to_aupay -> "AuPay に進みます"
I18nStringKey.continue_to_merpay -> "MerPay に進みます"
I18nStringKey.continue_to_au_pay -> "AuPay に進みます"
I18nStringKey.continue_to_mer_pay -> "MerPay に進みます"
I18nStringKey.continue_to_paypay -> "PayPay に進みます"
I18nStringKey.continue_to_rakuten -> "Rakuten に進みます"
I18nStringKey.continue_to_linepay -> "LinePay に進みます"
I18nStringKey.continue_to_line_pay -> "LinePay に進みます"
I18nStringKey.continue_to_paidy -> "Paidy に進みます"
I18nStringKey.webview_open_info -> "注: Web ウィンドウが開きます。購入後、元のウィンドウに戻ります。"
I18nStringKey.full_name -> "氏名"
Expand All @@ -75,28 +75,28 @@ object JapaneseStrings : I18nStrings {
I18nStringKey.first_name -> ""
I18nStringKey.last_name_phonetic -> "姓(フリガナ)"
I18nStringKey.first_name_phonetic -> "名(フリガナ)"
I18nStringKey.webmoney_information -> "WebMoney情報"
I18nStringKey.web_money_information -> "WebMoney情報"
I18nStringKey.prepaid_number -> "プリペイド番号"
I18nStringKey.payment_success -> "お支払い完了"
I18nStringKey.thank_you_for_your_order -> "ご注文ありがとうございます"
I18nStringKey.bitcash_information -> "BitCash情報"
I18nStringKey.bit_cash_information -> "BitCash情報"
I18nStringKey.hiragana_id -> "ひらがなID"
I18nStringKey.bank_transfer -> "銀行振込"
I18nStringKey.bitcash -> "BitCash"
I18nStringKey.bit_cash -> "BitCash"
I18nStringKey.credit_card -> "カード"
I18nStringKey.konbini -> "コンビニ"
I18nStringKey.netcash -> "NetCash"
I18nStringKey.aupay -> "au Pay"
I18nStringKey.net_cash -> "NetCash"
I18nStringKey.au_pay -> "au Pay"
I18nStringKey.alipay -> "AliPay"
I18nStringKey.merpay -> "メルペイ"
I18nStringKey.mer_pay -> "メルペイ"
I18nStringKey.paypay -> "PayPay"
I18nStringKey.rakuten_pay -> "楽天ペイ"
I18nStringKey.line_pay -> "Line Pay"
I18nStringKey.unknown -> "不明"
I18nStringKey.other -> "その他"
I18nStringKey.paidy -> "Paidy"
I18nStringKey.payeasy -> "PayEasy"
I18nStringKey.webmoney -> "WebMoney"
I18nStringKey.pay_easy -> "PayEasy"
I18nStringKey.web_money -> "WebMoney"
I18nStringKey.total_payment -> "合計支払額"
I18nStringKey.the_entered_name_cannot_be_empty -> "入力した名前は空欄にできません"
I18nStringKey.the_entered_email_is_not_valid -> "入力したメールアドレスは無効です"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ internal class KomojuPaymentScreenModel(private val config: KomojuMobileSDKConfi

private fun CreditCardDisplayData.validate(): Boolean {
val fullNameOnCardError = when {
fullNameOnCard.isBlank() -> I18nStringKey.cadrholder_name_cannot_be_empty
fullNameOnCard.isBlank() -> I18nStringKey.cardholder_name_cannot_be_empty
fullNameOnCard.all { char -> char.isValidCardHolderNameChar() } -> null
else -> I18nStringKey.the_entered_cardholder_name_is_not_valid
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal fun BitCashForm(
Column {
TextField(
value = bitCashDisplayData.bitCashId,
title = i18nStringResource(I18nStringKey.bitcash_information),
title = i18nStringResource(I18nStringKey.bit_cash_information),
placeholder = i18nStringResource(I18nStringKey.hiragana_id),
onValueChange = {
onBitCashDisplayDataChange(bitCashDisplayData.copy(bitCashId = it))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ private val KonbiniBrand.displayText
is KonbiniBrand.DailyYamazaki -> i18nStringResource(I18nStringKey.daily_yamazaki)
is KonbiniBrand.FamilyMart -> i18nStringResource(I18nStringKey.family_mart)
is KonbiniBrand.Lawson -> i18nStringResource(I18nStringKey.lawson)
is KonbiniBrand.MiniStop -> i18nStringResource(I18nStringKey.ministop)
is KonbiniBrand.SeicoMart -> i18nStringResource(I18nStringKey.seicomart)
is KonbiniBrand.SevenEleven -> i18nStringResource(I18nStringKey._7_eleven)
is KonbiniBrand.MiniStop -> i18nStringResource(I18nStringKey.mini_stop)
is KonbiniBrand.SeicoMart -> i18nStringResource(I18nStringKey.seico_mart)
is KonbiniBrand.SevenEleven -> i18nStringResource(I18nStringKey.seven_eleven)
}

private val KonbiniBrand.displayIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ internal fun OffSitePayForm(paymentMethod: PaymentMethod.OffSitePayment, onPayBu
val paymentButtonKey = remember(paymentMethod) {
when (paymentMethod.type) {
OffSitePaymentType.ALI_PAY -> I18nStringKey.continue_to_alipay
OffSitePaymentType.AU_PAY -> I18nStringKey.continue_to_aupay
OffSitePaymentType.MER_PAY -> I18nStringKey.continue_to_merpay
OffSitePaymentType.AU_PAY -> I18nStringKey.continue_to_au_pay
OffSitePaymentType.MER_PAY -> I18nStringKey.continue_to_mer_pay
OffSitePaymentType.PAY_PAY -> I18nStringKey.continue_to_paypay
OffSitePaymentType.RAKUTEN_PAY -> I18nStringKey.continue_to_rakuten
OffSitePaymentType.LINE_PAY -> I18nStringKey.continue_to_linepay
OffSitePaymentType.LINE_PAY -> I18nStringKey.continue_to_line_pay
else -> null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,23 @@ private val PaymentMethod.displayName
@Composable
get() = when (this) {
is PaymentMethod.BankTransfer -> i18nStringResource(I18nStringKey.bank_transfer)
is PaymentMethod.BitCash -> i18nStringResource(I18nStringKey.bitcash)
is PaymentMethod.BitCash -> i18nStringResource(I18nStringKey.bit_cash)
is PaymentMethod.CreditCard -> i18nStringResource(I18nStringKey.credit_card)
is PaymentMethod.Konbini -> i18nStringResource(I18nStringKey.konbini)
is PaymentMethod.NetCash -> i18nStringResource(I18nStringKey.netcash)
is PaymentMethod.NetCash -> i18nStringResource(I18nStringKey.net_cash)
is PaymentMethod.OffSitePayment -> when (type) {
OffSitePaymentType.AU_PAY -> i18nStringResource(I18nStringKey.aupay)
OffSitePaymentType.AU_PAY -> i18nStringResource(I18nStringKey.au_pay)
OffSitePaymentType.ALI_PAY -> i18nStringResource(I18nStringKey.alipay)
OffSitePaymentType.MER_PAY -> i18nStringResource(I18nStringKey.merpay)
OffSitePaymentType.MER_PAY -> i18nStringResource(I18nStringKey.mer_pay)
OffSitePaymentType.PAY_PAY -> i18nStringResource(I18nStringKey.paypay)
OffSitePaymentType.RAKUTEN_PAY -> i18nStringResource(I18nStringKey.rakuten_pay)
OffSitePaymentType.LINE_PAY -> i18nStringResource(I18nStringKey.line_pay)
OffSitePaymentType.UNKNOWN -> i18nStringResource(I18nStringKey.unknown)
}
is PaymentMethod.Other -> i18nStringResource(I18nStringKey.other)
is PaymentMethod.Paidy -> i18nStringResource(I18nStringKey.paidy)
is PaymentMethod.PayEasy -> i18nStringResource(I18nStringKey.payeasy)
is PaymentMethod.WebMoney -> i18nStringResource(I18nStringKey.webmoney)
is PaymentMethod.PayEasy -> i18nStringResource(I18nStringKey.pay_easy)
is PaymentMethod.WebMoney -> i18nStringResource(I18nStringKey.web_money)
}

private val PaymentMethod.displayIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal fun WebMoneyForm(
Column {
TextField(
value = webMoneyDisplayData.prepaidNumber,
title = i18nStringResource(I18nStringKey.webmoney_information),
title = i18nStringResource(I18nStringKey.web_money_information),
placeholder = i18nStringResource(I18nStringKey.prepaid_number),
onValueChange = {
onWebMoneyDisplayDataChange(webMoneyDisplayData.copy(prepaidNumber = it))
Expand Down

0 comments on commit fcb7f28

Please sign in to comment.