From 382e1c1eca0560863be5a489d78ec8f9fef5e0a7 Mon Sep 17 00:00:00 2001 From: sakksham7 <130480324+sakksham7@users.noreply.github.com> Date: Tue, 30 Jul 2024 12:39:58 +0530 Subject: [PATCH 1/2] fix: pix confirm call and added locale support (#528) --- src/CardTheme.res | 1 + src/Components/PixPaymentInput.res | 60 +++++++++---- src/LocaleStrings/ArabicLocale.res | 11 +++ src/LocaleStrings/CatalanLocale.res | 11 +++ src/LocaleStrings/ChineseLocale.res | 105 ++++++++++++++++++++++ src/LocaleStrings/DeutschLocale.res | 11 +++ src/LocaleStrings/DutchLocale.res | 11 +++ src/LocaleStrings/EnglishGBLocale.res | 11 +++ src/LocaleStrings/EnglishLocale.res | 11 +++ src/LocaleStrings/FrenchBelgiumLocale.res | 11 +++ src/LocaleStrings/FrenchLocale.res | 11 +++ src/LocaleStrings/HebrewLocale.res | 11 +++ src/LocaleStrings/ItalianLocale.res | 11 +++ src/LocaleStrings/JapaneseLocale.res | 11 +++ src/LocaleStrings/LocaleStringHelper.res | 1 + src/LocaleStrings/LocaleStringTypes.res | 14 ++- src/LocaleStrings/PolishLocale.res | 11 +++ src/LocaleStrings/PortugueseLocale.res | 11 +++ src/LocaleStrings/RussianLocale.res | 11 +++ src/LocaleStrings/SpanishLocale.res | 11 +++ src/LocaleStrings/SwedishLocale.res | 11 +++ 21 files changed, 337 insertions(+), 20 deletions(-) create mode 100644 src/LocaleStrings/ChineseLocale.res diff --git a/src/CardTheme.res b/src/CardTheme.res index fb2f8a97b..d5701682d 100644 --- a/src/CardTheme.res +++ b/src/CardTheme.res @@ -88,6 +88,7 @@ let getLocaleObject = async string => { | FR_BE => Js.import(FrenchBelgiumLocale.localeStrings) | ES => Js.import(SpanishLocale.localeStrings) | CA => Js.import(CatalanLocale.localeStrings) + | ZH => Js.import(ChineseLocale.localeStrings) | PT => Js.import(PortugueseLocale.localeStrings) | IT => Js.import(ItalianLocale.localeStrings) | PL => Js.import(PolishLocale.localeStrings) diff --git a/src/Components/PixPaymentInput.res b/src/Components/PixPaymentInput.res index 192fdaf9e..27aab2774 100644 --- a/src/Components/PixPaymentInput.res +++ b/src/Components/PixPaymentInput.res @@ -3,6 +3,7 @@ let make = (~label="") => { open RecoilAtoms open Utils + let {localeString} = Recoil.useRecoilValueFromAtom(configAtom) let (pixCNPJ, setPixCNPJ) = Recoil.useRecoilState(userPixCNPJ) let (pixCPF, setPixCPF) = Recoil.useRecoilState(userPixCPF) let (pixKey, setPixKey) = Recoil.useRecoilState(userPixKey) @@ -35,14 +36,32 @@ let make = (~label="") => { }) } - let onBlurPixCNPJ = _ => { - if pixCNPJ.value->String.length === 14 && pixCNPJ.isValid->Option.getOr(false) { + let onBlurPixKey = _ => { + if pixKey.value->String.length > 0 { + setPixKey(prev => { + ...prev, + isValid: Some(true), + errorString: "", + }) + } else { + setPixKey(prev => { + ...prev, + isValid: None, + errorString: "", + }) + } + } + + let onBlurPixCNPJ = ev => { + let pixCNPJNumber = ReactEvent.Focus.target(ev)["value"] + + if %re("/^\d*$/")->RegExp.test(pixCNPJNumber) && pixCNPJNumber->String.length === 14 { setPixCNPJ(prev => { ...prev, isValid: Some(true), errorString: "", }) - } else if pixCNPJ.value->String.length === 0 { + } else if pixCNPJNumber->String.length == 0 { setPixCNPJ(prev => { ...prev, isValid: None, @@ -52,19 +71,21 @@ let make = (~label="") => { setPixCNPJ(prev => { ...prev, isValid: Some(false), - errorString: "Invalid Pix CNPJ", + errorString: localeString.pixCNPJInvalidText, }) } } - let onBlurPixCPF = _ => { - if pixCPF.value->String.length === 11 && pixCPF.isValid->Option.getOr(false) { + let onBlurPixCPF = ev => { + let pixCPFNumber = ReactEvent.Focus.target(ev)["value"] + + if %re("/^\d*$/")->RegExp.test(pixCPFNumber) && pixCPFNumber->String.length === 11 { setPixCPF(prev => { ...prev, isValid: Some(true), errorString: "", }) - } else if pixCPF.value->String.length === 0 { + } else if pixCPFNumber->String.length == 0 { setPixCPF(prev => { ...prev, isValid: None, @@ -74,7 +95,7 @@ let make = (~label="") => { setPixCPF(prev => { ...prev, isValid: Some(false), - errorString: "Invalid Pix CPF", + errorString: localeString.pixCPFInvalidText, }) } } @@ -90,7 +111,7 @@ let make = (~label="") => { setPixCNPJ(prev => { ...prev, isValid: Some(false), - errorString: "Invalid Pix CPNJ", + errorString: localeString.pixCNPJInvalidText, }) } None @@ -107,7 +128,7 @@ let make = (~label="") => { setPixCPF(prev => { ...prev, isValid: Some(false), - errorString: "Invalid Pix CPF", + errorString: localeString.pixCPFInvalidText, }) } @@ -121,19 +142,19 @@ let make = (~label="") => { if pixKey.value == "" { setPixKey(prev => { ...prev, - errorString: "Pix key cannot be empty", + errorString: localeString.pixKeyEmptyText, }) } if pixCNPJ.value == "" { setPixCNPJ(prev => { ...prev, - errorString: "Pix CNPJ cannot be empty", + errorString: localeString.pixCNPJEmptyText, }) } if pixCPF.value == "" { setPixCPF(prev => { ...prev, - errorString: "Pix CPF cannot be empty", + errorString: localeString.pixCPFEmptyText, }) } } @@ -144,20 +165,21 @@ let make = (~label="") => { <> { type_="pixCPF" name="pixCPF" inputRef=pixCPFRef - placeholder="Enter Pix CPF" + placeholder={localeString.pixCPFPlaceholder} maxLength=11 /> { type_="pixCNPJ" name="pixCNPJ" inputRef=pixCNPJRef - placeholder="Enter Pix CNPJ" + placeholder={localeString.pixCNPJPlaceholder} maxLength=14 /> diff --git a/src/LocaleStrings/ArabicLocale.res b/src/LocaleStrings/ArabicLocale.res index 7d76d48b2..012e3503e 100644 --- a/src/LocaleStrings/ArabicLocale.res +++ b/src/LocaleStrings/ArabicLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `تاريخ الميلاد مطلوب`, dateOfBirthInvalidText: `يجب أن يكون العمر أكبر من أو يساوي 18 عامًا`, dateOfBirthPlaceholderText: `أدخل تاريخ الميلاد`, + pixCNPJInvalidText: `CNPJ الخاص بـ Pix غير صحيح`, + pixCNPJEmptyText: `لا يمكن أن يكون CNPJ الخاص بـ Pix فارغًا`, + pixCNPJLabel: `CNPJ الخاص بـ Pix`, + pixCNPJPlaceholder: `أدخل CNPJ الخاص بـ Pix`, + pixCPFInvalidText: `CPF الخاص بـ Pix غير صحيح`, + pixCPFEmptyText: `لا يمكن أن يكون CPF الخاص بـ Pix فارغًا`, + pixCPFLabel: `CPF الخاص بـ Pix`, + pixCPFPlaceholder: `أدخل CPF الخاص بـ Pix`, + pixKeyEmptyText: `مفتاح Pix لا يمكن أن يكون فارغًا`, + pixKeyPlaceholder: `أدخل مفتاح Pix`, + pixKeyLabel: `مفتاح Pix`, } diff --git a/src/LocaleStrings/CatalanLocale.res b/src/LocaleStrings/CatalanLocale.res index 413718595..bf90633c9 100644 --- a/src/LocaleStrings/CatalanLocale.res +++ b/src/LocaleStrings/CatalanLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `Es requereix la data de naixement`, dateOfBirthInvalidText: `L'edat ha de ser igual o superior a 18 anys`, dateOfBirthPlaceholderText: `Introdueix la data de naixement`, + pixCNPJInvalidText: `CNPJ Pix no vàlid`, + pixCNPJEmptyText: `El CNPJ Pix no pot estar buit`, + pixCNPJLabel: `CNPJ Pix`, + pixCNPJPlaceholder: `Introdueix el CNPJ Pix`, + pixCPFInvalidText: `CPF Pix no vàlid`, + pixCPFEmptyText: `El CPF Pix no pot estar buit`, + pixCPFLabel: `CPF Pix`, + pixCPFPlaceholder: `Introdueix el CPF Pix`, + pixKeyEmptyText: `La clau Pix no pot estar buida`, + pixKeyPlaceholder: `Introdueix la clau Pix`, + pixKeyLabel: `Clau Pix`, } diff --git a/src/LocaleStrings/ChineseLocale.res b/src/LocaleStrings/ChineseLocale.res new file mode 100644 index 000000000..fa4b9baca --- /dev/null +++ b/src/LocaleStrings/ChineseLocale.res @@ -0,0 +1,105 @@ +let localeStrings: LocaleStringTypes.localeStrings = { + locale: `zh`, + localeDirection: `ltr`, + cardNumberLabel: `卡号`, + inValidCardErrorText: `卡号无效。`, + inCompleteCVCErrorText: `您的卡片安全码不完整。`, + inCompleteExpiryErrorText: `您的卡片到期日期不完整。`, + pastExpiryErrorText: `您的卡片到期年份已过期。`, + poweredBy: `由 Hyperswitch 提供技术支持`, + validThruText: `有效期`, + sortCodeText: `排序代码`, + cvcTextLabel: `CVC`, + line1Label: `地址行 1`, + line1Placeholder: `街道地址`, + line1EmptyText: `地址行 1 不能为空`, + line2Label: `地址行 2`, + line2Placeholder: `公寓、单元号等(可选)`, + line2EmptyText: `地址行 2 不能为空`, + cityLabel: `城市`, + cityEmptyText: `城市不能为空`, + postalCodeLabel: `邮政编码`, + postalCodeEmptyText: `邮政编码不能为空`, + postalCodeInvalidText: `无效的邮政编码`, + stateLabel: `省/州`, + stateEmptyText: `省/州不能为空`, + accountNumberText: `账户号码`, + emailLabel: `电子邮箱`, + emailEmptyText: `电子邮箱不能为空`, + emailInvalidText: `无效的电子邮箱地址`, + fullNameLabel: `全名`, + fullNamePlaceholder: `名字和姓氏`, + countryLabel: `国家`, + currencyLabel: `货币`, + bankLabel: `选择银行`, + redirectText: `提交订单后,您将被重定向到安全的页面完成购买。`, + bankDetailsText: `提交这些信息后,您将获得银行账户信息以进行付款。请确保记录下来。`, + orPayUsing: `或使用`, + addNewCard: `添加信用卡/借记卡`, + useExisitingSavedCards: `使用保存的信用卡/借记卡`, + saveCardDetails: `保存卡片信息`, + addBankAccount: `添加银行账户`, + achBankDebitTerms: _ => + `您的 ACH 扣款授权将立即设置,但我们会确认金额并在未来的付款前通知您。`, + sepaDebitTerms: str => + `通过提供您的付款信息并确认此付款,您授权(A)${str} 和 Hyperswitch,我们的支付服务提供商和/或 PPRO,其本地服务提供商,向您的银行发送指示从您的账户中扣款,以及(B)您的银行根据这些指示从您的账户中扣款。作为您的权利的一部分,您有权根据与银行的协议的条款和条件要求银行退款。退款必须在账户扣款之日起的 8 周内申请。您的权利在银行可以获得的声明中有解释。您同意在未来的扣款前最多提前 2 天接收通知。`, + becsDebitTerms: `通过提供您的银行账户详细信息并确认此付款,您同意此直接借记请求和直接借记请求服务协议,并授权 Hyperswitch Payments Australia Pty Ltd ACN 160 180 343 直接借记用户 ID 号码 507156(“Hyperswitch”)通过批量电子清算系统(BECS)从您的账户中扣款,代表 Hyperswitch Payment Widget(“商户”)处理任何商户单独通知您的金额。您确认您是上述账户的账户持有人或授权签署人。`, + cardTerms: str => + `通过提供您的卡片信息,您允许 ${str} 根据其条款向您的卡片收费。`, + payNowButton: `立即支付`, + cardNumberEmptyText: `卡号不能为空`, + cardExpiryDateEmptyText: `卡片到期日期不能为空`, + cvcNumberEmptyText: `CVC 号码不能为空`, + enterFieldsText: `请输入所有字段`, + enterValidDetailsText: `请输入有效的详细信息`, + selectPaymentMethodText: `请选择付款方式然后重试`, + card: `卡片`, + surchargeMsgAmount: (currency, str) => <> + {React.string(`此交易将收取${Utils.nbsp}`)} + {React.string(`${currency} ${str}`)} + {React.string({`${Utils.nbsp}的附加费用`})} + , + surchargeMsgAmountForCard: (currency, str) => <> + {React.string(`此交易将收取最高${Utils.nbsp}`)} + {React.string(`${currency} ${str}`)} + {React.string(`${Utils.nbsp}的附加费用`)} + , + surchargeMsgAmountForOneClickWallets: `适用额外费用`, + billingNameLabel: `适用额外费用`, + billingNamePlaceholder: `名字和姓氏`, + cardHolderName: `持卡人姓名`, + on: `在`, + \"and": `和`, + nameEmptyText: str => `请提供您的 ${str}`, + completeNameEmptyText: str => `请提供您的完整 ${str}`, + billingDetailsText: `账单详情`, + socialSecurityNumberLabel: `社会安全号码`, + saveWalletDetails: `选择后将保存钱包信息`, + morePaymentMethods: `更多支付方式`, + useExistingPaymentMethods: `使用保存的支付方式`, + cardNickname: `卡片昵称`, + nicknamePlaceholder: `卡片昵称(可选)`, + cardExpiredText: `此卡已过期`, + cardHeader: `卡片信息`, + cardBrandConfiguredErrorText: str => `${str} 目前不支持。`, + currencyNetwork: `货币网络`, + expiryPlaceholder: `MM / YY`, + dateOfBirth: `出生日期`, + vpaIdLabel: `VPA ID`, + vpaIdEmptyText: `VPA ID 不能为空`, + vpaIdInvalidText: `无效的 VPA ID 地址`, + dateofBirthRequiredText: `出生日期是必填项`, + dateOfBirthInvalidText: `年龄应大于或等于 18 岁`, + dateOfBirthPlaceholderText: `输入出生日期`, + pixCNPJInvalidText: `无效的 Pix CNPJ`, + pixCNPJEmptyText: `Pix CNPJ 不能为空`, + pixCNPJLabel: `Pix CNPJ`, + pixCNPJPlaceholder: `输入 Pix CNPJ`, + pixCPFInvalidText: `无效的 Pix CPF`, + pixCPFEmptyText: `Pix CPF 不能为空`, + pixCPFLabel: `Pix CPF`, + pixCPFPlaceholder: `输入 Pix CPF`, + pixKeyEmptyText: `Pix 密钥不能为空`, + pixKeyPlaceholder: `输入 Pix 密钥`, + pixKeyLabel: `Pix 密钥`, +} diff --git a/src/LocaleStrings/DeutschLocale.res b/src/LocaleStrings/DeutschLocale.res index ea64e3395..4c6db5856 100644 --- a/src/LocaleStrings/DeutschLocale.res +++ b/src/LocaleStrings/DeutschLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `Geburtsdatum ist erforderlich`, dateOfBirthInvalidText: `Das Alter sollte 18 Jahre oder älter sein`, dateOfBirthPlaceholderText: `Geben Sie das Geburtsdatum ein`, + pixCNPJInvalidText: `Ungültiger Pix CNPJ`, + pixCNPJEmptyText: `Pix CNPJ darf nicht leer sein`, + pixCNPJLabel: `Pix CNPJ`, + pixCNPJPlaceholder: `Geben Sie Pix CNPJ ein`, + pixCPFInvalidText: `Ungültiger Pix CPF`, + pixCPFEmptyText: `Pix CPF darf nicht leer sein`, + pixCPFLabel: `Pix CPF`, + pixCPFPlaceholder: `Geben Sie Pix CPF ein`, + pixKeyEmptyText: `Pix-Schlüssel darf nicht leer sein`, + pixKeyPlaceholder: `Geben Sie den Pix-Schlüssel ein`, + pixKeyLabel: `Pix-Schlüssel`, } diff --git a/src/LocaleStrings/DutchLocale.res b/src/LocaleStrings/DutchLocale.res index d9c0d2e3d..11b5c1c32 100644 --- a/src/LocaleStrings/DutchLocale.res +++ b/src/LocaleStrings/DutchLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `Geboortedatum is vereist`, dateOfBirthInvalidText: `De leeftijd moet groter of gelijk zijn aan 18 jaar`, dateOfBirthPlaceholderText: `Voer geboortedatum in`, + pixCNPJInvalidText: `Ongeldige Pix CNPJ`, + pixCNPJEmptyText: `Pix CNPJ mag niet leeg zijn`, + pixCNPJLabel: `Pix CNPJ`, + pixCNPJPlaceholder: `Voer Pix CNPJ in`, + pixCPFInvalidText: `Ongeldige Pix CPF`, + pixCPFEmptyText: `Pix CPF mag niet leeg zijn`, + pixCPFLabel: `Pix CPF`, + pixCPFPlaceholder: `Voer Pix CPF in`, + pixKeyEmptyText: `Pix-sleutel mag niet leeg zijn`, + pixKeyPlaceholder: `Voer Pix-sleutel in`, + pixKeyLabel: `Pix-sleutel`, } diff --git a/src/LocaleStrings/EnglishGBLocale.res b/src/LocaleStrings/EnglishGBLocale.res index 8f9b4afd5..a01db3161 100644 --- a/src/LocaleStrings/EnglishGBLocale.res +++ b/src/LocaleStrings/EnglishGBLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `Date of birth is required`, dateOfBirthInvalidText: `Age should be greater than or equal to 18 years`, dateOfBirthPlaceholderText: `Enter Date of Birth`, + pixCNPJInvalidText: `Invalid Pix CNPJ`, + pixCNPJEmptyText: `Pix CNPJ cannot be empty`, + pixCNPJLabel: `Pix CNPJ`, + pixCNPJPlaceholder: `Enter Pix CNPJ`, + pixCPFInvalidText: `Invalid Pix CPF`, + pixCPFEmptyText: `Pix CPF cannot be empty`, + pixCPFLabel: `Pix CPF`, + pixCPFPlaceholder: `Enter Pix CPF`, + pixKeyEmptyText: `Pix key cannot be empty`, + pixKeyPlaceholder: `Enter Pix key`, + pixKeyLabel: `Pix key`, } diff --git a/src/LocaleStrings/EnglishLocale.res b/src/LocaleStrings/EnglishLocale.res index 5175f0db4..e09c6b6b8 100644 --- a/src/LocaleStrings/EnglishLocale.res +++ b/src/LocaleStrings/EnglishLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `Date of birth is required`, dateOfBirthInvalidText: `Age should be greater than or equal to 18 years`, dateOfBirthPlaceholderText: `Enter Date of Birth`, + pixCNPJInvalidText: `Invalid Pix CNPJ`, + pixCNPJEmptyText: `Pix CNPJ cannot be empty`, + pixCNPJLabel: `Pix CNPJ`, + pixCNPJPlaceholder: `Enter Pix CNPJ`, + pixCPFInvalidText: `Invalid Pix CPF`, + pixCPFEmptyText: `Pix CPF cannot be empty`, + pixCPFLabel: `Pix CPF`, + pixCPFPlaceholder: `Enter Pix CPF`, + pixKeyEmptyText: `Pix key cannot be empty`, + pixKeyPlaceholder: `Enter Pix key`, + pixKeyLabel: `Pix key`, } diff --git a/src/LocaleStrings/FrenchBelgiumLocale.res b/src/LocaleStrings/FrenchBelgiumLocale.res index 235f555ae..90049a967 100644 --- a/src/LocaleStrings/FrenchBelgiumLocale.res +++ b/src/LocaleStrings/FrenchBelgiumLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `La date de naissance est requise`, dateOfBirthInvalidText: `L'âge doit être supérieur ou égal à 18 ans`, dateOfBirthPlaceholderText: `Entrez la date de naissance`, + pixCNPJInvalidText: `CNPJ Pix invalide`, + pixCNPJEmptyText: `Le CNPJ Pix ne peut pas être vide`, + pixCNPJLabel: `CNPJ Pix`, + pixCNPJPlaceholder: `Entrez le CNPJ Pix`, + pixCPFInvalidText: `CPF Pix invalide`, + pixCPFEmptyText: `Le CPF Pix ne peut pas être vide`, + pixCPFLabel: `CPF Pix`, + pixCPFPlaceholder: `Entrez le CPF Pix`, + pixKeyEmptyText: `La clé Pix ne peut pas être vide`, + pixKeyPlaceholder: `Entrez la clé Pix`, + pixKeyLabel: `Clé Pix`, } diff --git a/src/LocaleStrings/FrenchLocale.res b/src/LocaleStrings/FrenchLocale.res index ab914daa6..564e62a0e 100644 --- a/src/LocaleStrings/FrenchLocale.res +++ b/src/LocaleStrings/FrenchLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `La date de naissance est requise`, dateOfBirthInvalidText: `L'âge doit être supérieur ou égal à 18 ans`, dateOfBirthPlaceholderText: `Entrez la date de naissance`, + pixCNPJInvalidText: `CNPJ Pix invalide`, + pixCNPJEmptyText: `Le CNPJ Pix ne peut pas être vide`, + pixCNPJLabel: `CNPJ Pix`, + pixCNPJPlaceholder: `Entrez le CNPJ Pix`, + pixCPFInvalidText: `CPF Pix invalide`, + pixCPFEmptyText: `Le CPF Pix ne peut pas être vide`, + pixCPFLabel: `CPF Pix`, + pixCPFPlaceholder: `Entrez le CPF Pix`, + pixKeyEmptyText: `La clé Pix ne peut pas être vide`, + pixKeyPlaceholder: `Entrez la clé Pix`, + pixKeyLabel: `Clé Pix`, } diff --git a/src/LocaleStrings/HebrewLocale.res b/src/LocaleStrings/HebrewLocale.res index ceb94bf9c..1ee7f1508 100644 --- a/src/LocaleStrings/HebrewLocale.res +++ b/src/LocaleStrings/HebrewLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `תאריך לידה נדרש`, dateOfBirthInvalidText: `הגיל צריך להיות גדול או שווה ל-18 שנים`, dateOfBirthPlaceholderText: `הכנס תאריך לידה`, + pixCNPJInvalidText: `CNPJ של Pix לא תקין`, + pixCNPJEmptyText: `CNPJ של Pix לא יכול להיות ריק`, + pixCNPJLabel: `CNPJ של Pix`, + pixCNPJPlaceholder: `הכנס CNPJ של Pix`, + pixCPFInvalidText: `CPF של Pix לא תקין`, + pixCPFEmptyText: `CPF של Pix לא יכול להיות ריק`, + pixCPFLabel: `CPF של Pix`, + pixCPFPlaceholder: `הכנס CPF של Pix`, + pixKeyEmptyText: `מפתח Pix לא יכול להיות ריק`, + pixKeyPlaceholder: `הכנס מפתח Pix`, + pixKeyLabel: `מפתח Pix`, } diff --git a/src/LocaleStrings/ItalianLocale.res b/src/LocaleStrings/ItalianLocale.res index 01855ae3f..d39bf388d 100644 --- a/src/LocaleStrings/ItalianLocale.res +++ b/src/LocaleStrings/ItalianLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `La data di nascita è obbligatoria`, dateOfBirthInvalidText: `L'età deve essere maggiore o uguale a 18 anni`, dateOfBirthPlaceholderText: `Inserisci la data di nascita`, + pixCNPJInvalidText: `CNPJ Pix non valido`, + pixCNPJEmptyText: `Il CNPJ Pix non può essere vuoto`, + pixCNPJLabel: `CNPJ Pix`, + pixCNPJPlaceholder: `Inserisci il CNPJ Pix`, + pixCPFInvalidText: `CPF Pix non valido`, + pixCPFEmptyText: `Il CPF Pix non può essere vuoto`, + pixCPFLabel: `CPF Pix`, + pixCPFPlaceholder: `Inserisci il CPF Pix`, + pixKeyEmptyText: `La chiave Pix non può essere vuota`, + pixKeyPlaceholder: `Inserisci la chiave Pix`, + pixKeyLabel: `Chiave Pix`, } diff --git a/src/LocaleStrings/JapaneseLocale.res b/src/LocaleStrings/JapaneseLocale.res index 08f4802dc..d8ff5c902 100644 --- a/src/LocaleStrings/JapaneseLocale.res +++ b/src/LocaleStrings/JapaneseLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `生年月日が必要です`, dateOfBirthInvalidText: `年齢は18歳以上である必要があります`, dateOfBirthPlaceholderText: `生年月日を入力してください`, + pixCNPJInvalidText: `無効なPix CNPJ`, + pixCNPJEmptyText: `Pix CNPJは空にできません`, + pixCNPJLabel: `Pix CNPJ`, + pixCNPJPlaceholder: `Pix CNPJを入力`, + pixCPFInvalidText: `無効なPix CPF`, + pixCPFEmptyText: `Pix CPFは空にできません`, + pixCPFLabel: `Pix CPF`, + pixCPFPlaceholder: `Pix CPFを入力`, + pixKeyEmptyText: `Pixキーは空にできません`, + pixKeyPlaceholder: `Pixキーを入力`, + pixKeyLabel: `Pixキー`, } diff --git a/src/LocaleStrings/LocaleStringHelper.res b/src/LocaleStrings/LocaleStringHelper.res index b4dedc381..7b63c2058 100644 --- a/src/LocaleStrings/LocaleStringHelper.res +++ b/src/LocaleStrings/LocaleStringHelper.res @@ -16,6 +16,7 @@ let mapLocalStringToTypeLocale = val => { | "nl" => NL | "sv" => SV | "ru" => RU + | "zh" => ZH | "en" | _ => EN diff --git a/src/LocaleStrings/LocaleStringTypes.res b/src/LocaleStrings/LocaleStringTypes.res index 36c8d69cc..03a3d0120 100644 --- a/src/LocaleStrings/LocaleStringTypes.res +++ b/src/LocaleStrings/LocaleStringTypes.res @@ -1,4 +1,5 @@ -type locale = EN | HE | FR | EN_GB | AR | JA | DE | FR_BE | ES | CA | PT | IT | PL | NL | SV | RU +type locale = + EN | HE | FR | EN_GB | AR | JA | DE | FR_BE | ES | CA | PT | IT | PL | NL | SV | RU | ZH type localeStrings = { locale: string, @@ -82,4 +83,15 @@ type localeStrings = { dateofBirthRequiredText: string, dateOfBirthInvalidText: string, dateOfBirthPlaceholderText: string, + pixCNPJInvalidText: string, + pixCNPJEmptyText: string, + pixCNPJLabel: string, + pixCNPJPlaceholder: string, + pixCPFInvalidText: string, + pixCPFEmptyText: string, + pixCPFLabel: string, + pixCPFPlaceholder: string, + pixKeyEmptyText: string, + pixKeyLabel: string, + pixKeyPlaceholder: string, } diff --git a/src/LocaleStrings/PolishLocale.res b/src/LocaleStrings/PolishLocale.res index d2f14403c..7b927b6e4 100644 --- a/src/LocaleStrings/PolishLocale.res +++ b/src/LocaleStrings/PolishLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `Data urodzenia jest wymagana`, dateOfBirthInvalidText: `Wiek powinien być większy lub równy 18 lat`, dateOfBirthPlaceholderText: `Wprowadź datę urodzenia`, + pixCNPJInvalidText: `Nieprawidłowy CNPJ Pix`, + pixCNPJEmptyText: `CNPJ Pix nie może być pusty`, + pixCNPJLabel: `CNPJ Pix`, + pixCNPJPlaceholder: `Wprowadź CNPJ Pix`, + pixCPFInvalidText: `Nieprawidłowy CPF Pix`, + pixCPFEmptyText: `CPF Pix nie może być pusty`, + pixCPFLabel: `CPF Pix`, + pixCPFPlaceholder: `Wprowadź CPF Pix`, + pixKeyEmptyText: `Klucz Pix nie może być pusty`, + pixKeyPlaceholder: `Wprowadź klucz Pix`, + pixKeyLabel: `Klucz Pix`, } diff --git a/src/LocaleStrings/PortugueseLocale.res b/src/LocaleStrings/PortugueseLocale.res index 308f2558b..6af6fa953 100644 --- a/src/LocaleStrings/PortugueseLocale.res +++ b/src/LocaleStrings/PortugueseLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `Data de nascimento é obrigatória`, dateOfBirthInvalidText: `A idade deve ser maior ou igual a 18 anos`, dateOfBirthPlaceholderText: `Insira a data de nascimento`, + pixCNPJInvalidText: `CNPJ Pix inválido`, + pixCNPJEmptyText: `CNPJ Pix não pode estar vazio`, + pixCNPJLabel: `CNPJ Pix`, + pixCNPJPlaceholder: `Digite o CNPJ Pix`, + pixCPFInvalidText: `CPF Pix inválido`, + pixCPFEmptyText: `CPF Pix não pode estar vazio`, + pixCPFLabel: `CPF Pix`, + pixCPFPlaceholder: `Digite o CPF Pix`, + pixKeyEmptyText: `A chave Pix não pode estar vazia`, + pixKeyPlaceholder: `Digite a chave Pix`, + pixKeyLabel: `Chave Pix`, } diff --git a/src/LocaleStrings/RussianLocale.res b/src/LocaleStrings/RussianLocale.res index d5dff2cdf..d4b7147cf 100644 --- a/src/LocaleStrings/RussianLocale.res +++ b/src/LocaleStrings/RussianLocale.res @@ -95,4 +95,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `Дата рождения обязательна`, dateOfBirthInvalidText: `Возраст должен быть не меньше 18 лет`, dateOfBirthPlaceholderText: `Введите дату рождения`, + pixCNPJInvalidText: `Неверный Pix CNPJ`, + pixCNPJEmptyText: `Pix CNPJ не может быть пустым`, + pixCNPJLabel: `Pix CNPJ`, + pixCNPJPlaceholder: `Введите Pix CNPJ`, + pixCPFInvalidText: `Неверный Pix CPF`, + pixCPFEmptyText: `Pix CPF не может быть пустым`, + pixCPFLabel: `Pix CPF`, + pixCPFPlaceholder: `Введите Pix CPF`, + pixKeyEmptyText: `Ключ Pix не может быть пустым`, + pixKeyPlaceholder: `Введите ключ Pix`, + pixKeyLabel: `Ключ Pix`, } diff --git a/src/LocaleStrings/SpanishLocale.res b/src/LocaleStrings/SpanishLocale.res index 0e0a08b31..47f327d9e 100644 --- a/src/LocaleStrings/SpanishLocale.res +++ b/src/LocaleStrings/SpanishLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `Se requiere la fecha de nacimiento`, dateOfBirthInvalidText: `La edad debe ser mayor o igual a 18 años`, dateOfBirthPlaceholderText: `Introduzca la fecha de nacimiento`, + pixCNPJInvalidText: `CNPJ Pix inválido`, + pixCNPJEmptyText: `El CNPJ Pix no puede estar vacío`, + pixCNPJLabel: `CNPJ Pix`, + pixCNPJPlaceholder: `Introduce el CNPJ Pix`, + pixCPFInvalidText: `CPF Pix inválido`, + pixCPFEmptyText: `El CPF Pix no puede estar vacío`, + pixCPFLabel: `CPF Pix`, + pixCPFPlaceholder: `Introduce el CPF Pix`, + pixKeyEmptyText: `La clave Pix no puede estar vacía`, + pixKeyPlaceholder: `Introduce la clave Pix`, + pixKeyLabel: `Clave Pix`, } diff --git a/src/LocaleStrings/SwedishLocale.res b/src/LocaleStrings/SwedishLocale.res index c60d5c402..9f173a3d9 100644 --- a/src/LocaleStrings/SwedishLocale.res +++ b/src/LocaleStrings/SwedishLocale.res @@ -91,4 +91,15 @@ let localeStrings: LocaleStringTypes.localeStrings = { dateofBirthRequiredText: `Födelsedatum krävs`, dateOfBirthInvalidText: `Åldern bör vara större än eller lika med 18 år`, dateOfBirthPlaceholderText: `Ange födelsedatum`, + pixCNPJInvalidText: `Ogiltig Pix CNPJ`, + pixCNPJEmptyText: `Pix CNPJ kan inte vara tomt`, + pixCNPJLabel: `Pix CNPJ`, + pixCNPJPlaceholder: `Ange Pix CNPJ`, + pixCPFInvalidText: `Ogiltig Pix CPF`, + pixCPFEmptyText: `Pix CPF kan inte vara tomt`, + pixCPFLabel: `Pix CPF`, + pixCPFPlaceholder: `Ange Pix CPF`, + pixKeyEmptyText: `Pix-nyckel kan inte vara tom`, + pixKeyPlaceholder: `Ange Pix-nyckel`, + pixKeyLabel: `Pix-nyckel`, } From 0c61aa7eb49b24b429b5a2dc4841f00b4231eb74 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 30 Jul 2024 07:11:21 +0000 Subject: [PATCH 2/2] chore(release): 0.78.1 [skip ci] ## [0.78.1](https://github.com/juspay/hyperswitch-web/compare/v0.78.0...v0.78.1) (2024-07-30) ### Bug Fixes * pix confirm call and added locale support ([#528](https://github.com/juspay/hyperswitch-web/issues/528)) ([382e1c1](https://github.com/juspay/hyperswitch-web/commit/382e1c1eca0560863be5a489d78ec8f9fef5e0a7)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ae5dd63c..c0da8a908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.78.1](https://github.com/juspay/hyperswitch-web/compare/v0.78.0...v0.78.1) (2024-07-30) + + +### Bug Fixes + +* pix confirm call and added locale support ([#528](https://github.com/juspay/hyperswitch-web/issues/528)) ([382e1c1](https://github.com/juspay/hyperswitch-web/commit/382e1c1eca0560863be5a489d78ec8f9fef5e0a7)) + # [0.78.0](https://github.com/juspay/hyperswitch-web/compare/v0.77.4...v0.78.0) (2024-07-26) diff --git a/package-lock.json b/package-lock.json index 685479413..4a1fa2d33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.78.0", + "version": "0.78.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.78.0", + "version": "0.78.1", "hasInstallScript": true, "dependencies": { "@aws-sdk/client-cloudfront": "^3.414.0", diff --git a/package.json b/package.json index 503804ec6..40b60ca4f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.78.0", + "version": "0.78.1", "main": "index.js", "private": true, "dependencies": {