mirror of
https://github.com/valitydev/checkout.git
synced 2024-11-06 02:25:18 +00:00
INT-1300: Add UZ locale. Layout changes. (#336)
This commit is contained in:
parent
64771b8508
commit
b78217f1b0
99
src/assets/locale/uz.json
Normal file
99
src/assets/locale/uz.json
Normal file
@ -0,0 +1,99 @@
|
||||
{
|
||||
"info.back": "Орқага",
|
||||
"info.details": "Тафсилотлар",
|
||||
"info.modal.no.available.payment.method": "Мавжуд тўлов усуллари йўқ",
|
||||
"form.header.payment.methods.label": "Тўлов усулини танланг",
|
||||
"form.header.netbanking.label": "Банкни танланг",
|
||||
"form.header.pay.card.label": "Банк картаси билан тўлаш",
|
||||
"form.header.final.success.label": "Муваффақиятли тўлов",
|
||||
"form.header.final.invoice.paid.label": "Тўланган",
|
||||
"form.header.final.invoice.paid.already.label": "Аллақачон тўланган",
|
||||
"form.header.final.invoice.cancelled.label": "Инвойс бекор қилинган",
|
||||
"form.header.final.invoice.fulfilled.label": "Инвойс тўлиқ тўланган",
|
||||
"form.header.final.error.label": "Хато",
|
||||
"form.header.final.started.label": "Жараёнда",
|
||||
"form.header.final.failed.label": "Тўланмади",
|
||||
"form.header.final.refunded.label": "Қайтарилган",
|
||||
"form.header.final.pending.label": "Жараёнда",
|
||||
"form.header.final.pending.description": "",
|
||||
"form.header.final.cancelled.label": "Бекор қилинган",
|
||||
"form.final.failed.cancelled.text": "Тўлов бекор қилинди",
|
||||
"form.final.started.pay.text": "Тўлов жараёнда",
|
||||
"form.final.need.help": "Муаммони қандай ҳал қилиш мумкин?",
|
||||
"form.input.phone.placeholder": "Телефон",
|
||||
"form.input.card.placeholder": "Карта рақами",
|
||||
"form.input.expiry.placeholder": "ОЙ / ЙЙ",
|
||||
"form.input.secure.placeholder": "CVV",
|
||||
"form.input.cardholder.placeholder": "Карта эгасининг исми",
|
||||
"form.input.email.placeholder": "Электрон почта",
|
||||
"form.input.amount.placeholder": "Тўлов суммаси",
|
||||
"form.button.back.to.website": "Сайтга қайтиш",
|
||||
"form.button.reload": "Қайта юклаш",
|
||||
"form.button.next.label": "Кейинги",
|
||||
"form.button.pay.again.label": "Қайтадан уриниб кўринг",
|
||||
"form.button.pay.label": "Тўлаш",
|
||||
"form.button.copy.label": "Нусхалаш",
|
||||
"form.button.copied.label": "Нусхаланди!",
|
||||
"form.payment.method.name.card.label": "Банк картаси",
|
||||
"form.payment.method.name.others.label": "Бошқа тўлов усуллари",
|
||||
"form.serviceProvidersGrid.search": "Қидирув",
|
||||
"form.qr.code": "Тўлаш учун банкнинг мобил иловаси ёки телефоннинг камера орқали QR-кодни сканерланг",
|
||||
"form.p2p.error": "Бошқа суммани киритинг ёки кейинроқ уриниб кўринг.",
|
||||
"form.p2p.destination.info": "Қуйидаги реквизитлардан фойдаланиб ўтказишни амалга оширинг:",
|
||||
"form.p2p.destination.bank.card.pan": "Карта рақами:",
|
||||
"form.p2p.destination.bank.name": "Банк:",
|
||||
"form.p2p.destination.bank.recipient": "Олувчи:",
|
||||
"form.p2p.destination.spb.phone": "Телефон рақами:",
|
||||
"form.p2p.destination.bank.account.account": "Ҳисоб рақами:",
|
||||
"form.p2p.destination.bank.account.bic": "БИК:",
|
||||
"form.p2p.destination.bank.account.purpose": "Тўлов мақсади:",
|
||||
"form.p2p.complete.info": "Ўтказишни амалга оширгач, пастдаги тугмани босинг. Тўловни қабул қилиш 5 дақиқагача вақт олади.",
|
||||
"form.p2p.complete.button": "Ўтказиш бажарилди",
|
||||
"form.p2p.complete.loading": "Илтимос, кутинг",
|
||||
"form.p2p.destination.amount": "Сумма:",
|
||||
"form.p2p.destination.randomizeAmountDescription": "Биз сизнинг маблағингизни тезроқ ҳисобга олиш учун депозит миқдорини ўзгартирдик.",
|
||||
"form.p2p.alert.li": [
|
||||
"Сўровда кўрсатилган аниқ суммани ўтказинг.",
|
||||
"Бутун суммани бир ўтказишда амалга оширинг.",
|
||||
"Ўтказишни 15 дақиқа ичида амалга оширинг.",
|
||||
"Ўтказишни амалга оширгач \"Ўтказиш бажарилди\" тугмасини босинг."
|
||||
],
|
||||
"form.p2p.alert.p": "Акс ҳолда тўловингиз қабул қилинмайди.",
|
||||
"form.p2p.gateway.selector.heading": "Усул ёки банкни танланг",
|
||||
"form.p2p.default.pane.label": "Ҳар қандай банк",
|
||||
"form.p2p.next.button": "Кейинги",
|
||||
"form.p2p.destinations.heading": "Тўлов",
|
||||
"form.p2p.copied": "Нусхаланди!",
|
||||
"InvalidPaymentTool": "Нотўғри тўлов воситаси",
|
||||
"AccountLimitsExceeded": "Ҳисоб лимити ошиб кетди",
|
||||
"InsufficientFunds": "Етарли маблағ йўқ",
|
||||
"PreauthorizationFailed": "Олдиндан рухсат беришда хато",
|
||||
"RejectedByIssuer": "Эмитент томонидан рад этилди",
|
||||
"PaymentRejected": "Тўлов рад этилди",
|
||||
"p2p.gateways": {
|
||||
"сбер": "sberbank",
|
||||
"sber": "sberbank",
|
||||
"сбербанк": "sberbank",
|
||||
"сбр": "sberbank",
|
||||
"sbr": "sberbank",
|
||||
"tinkoff": "Тинькофф",
|
||||
"raiffeisen": "Райффайзен",
|
||||
"sbp": "СБП",
|
||||
"kapital": "Kapital",
|
||||
"abb": "ABB"
|
||||
},
|
||||
"metadata.addons": {
|
||||
"pinikle": {
|
||||
"label": "Ваучер йўқми?",
|
||||
"link": "Сотиб олиш"
|
||||
}
|
||||
},
|
||||
"loaderMessages": [
|
||||
"Юкланмоқда... Илтимос, саҳифани ёпманг.",
|
||||
"Ҳали ҳам бу устида ишлаяпмиз... Бу кўп вақтни олмайди.",
|
||||
"Илтимос, кутинг! Сўровингизни қайта ишлаяпмиз...",
|
||||
"Илтимос, кутинг... Сўровингиз қайта ишланмоқда.",
|
||||
"Илтимос, кутинг... Биз деярли тугатдик!",
|
||||
"Деярли тайёр... Кутганингиз учун раҳмат!"
|
||||
]
|
||||
}
|
@ -24,7 +24,7 @@ export function ErrorAlert({ title, description, isReloading }: ErrorAlertProps)
|
||||
</AlertTitle>
|
||||
<AlertDescription maxWidth="lg">{description}</AlertDescription>
|
||||
{isReloading && (
|
||||
<Button colorScheme="gray" onClick={() => location.reload()}>
|
||||
<Button borderRadius="xl" colorScheme="gray" onClick={() => location.reload()}>
|
||||
Reload
|
||||
</Button>
|
||||
)}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { isNil } from './isNil';
|
||||
|
||||
const locales = ['ru', 'en', 'ja', 'pt', 'bn', 'ko', 'tr', 'az', 'ar', 'tj'];
|
||||
const locales = ['ru', 'en', 'ja', 'pt', 'bn', 'ko', 'tr', 'az', 'ar', 'tj', 'uz'];
|
||||
|
||||
export const detectLocale = (locale: string | null): string => {
|
||||
let result;
|
||||
|
@ -52,10 +52,10 @@ export function Destinations({ destinations }: DestinationsProps) {
|
||||
<Text fontSize="sm" textAlign="center">
|
||||
{l['form.p2p.complete.info']}
|
||||
</Text>
|
||||
<VStack align="stretch" spacing={5}>
|
||||
<VStack align="stretch" spacing={4}>
|
||||
<LightMode>
|
||||
<Button
|
||||
borderRadius="lg"
|
||||
borderRadius="xl"
|
||||
colorScheme="brand"
|
||||
isLoading={status === 'LOADING' || status === 'SUCCESS'}
|
||||
loadingText={l['form.p2p.complete.loading']}
|
||||
|
@ -25,7 +25,7 @@ export function GatewaySelector({ gateways, onSelect }: GatewaySelectorProps) {
|
||||
<GatewayPanes gateways={gateways} onSelect={setGateway} />
|
||||
<Spacer />
|
||||
<Button
|
||||
borderRadius="lg"
|
||||
borderRadius="xl"
|
||||
colorScheme="brand"
|
||||
isDisabled={isNil(gateway)}
|
||||
size="lg"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Flex, Menu, MenuButton, MenuItem, MenuList, Text } from '@chakra-ui/react';
|
||||
import { Button, DarkMode, Flex, Menu, MenuButton, MenuItem, MenuList, Text } from '@chakra-ui/react';
|
||||
import { useState } from 'react';
|
||||
import { HiChevronDown } from 'react-icons/hi';
|
||||
import { HiChevronDown, HiGlobeAlt } from 'react-icons/hi';
|
||||
|
||||
const localeInfo = {
|
||||
ar: {
|
||||
@ -53,6 +53,11 @@ const localeInfo = {
|
||||
short: 'Тҷ',
|
||||
long: 'Тоҷикӣ',
|
||||
},
|
||||
uz: {
|
||||
flag: '🇺🇿',
|
||||
short: 'Uz',
|
||||
long: 'Oʻzbekcha',
|
||||
},
|
||||
};
|
||||
|
||||
export type LocaleSelectorProps = {
|
||||
@ -65,18 +70,20 @@ export function LocaleSelector({ initLocaleCode, onLocaleChange }: LocaleSelecto
|
||||
|
||||
return (
|
||||
<Menu>
|
||||
<MenuButton color="white">
|
||||
<Flex alignItems="center" gap="1">
|
||||
<Text as="span" fontSize="md">
|
||||
{localeInfo[activeLocaleCode]?.flag}
|
||||
</Text>
|
||||
<Text color="white" fontSize="md" fontWeight="bold">
|
||||
{localeInfo[activeLocaleCode]?.short || activeLocaleCode}
|
||||
</Text>
|
||||
<HiChevronDown />
|
||||
</Flex>
|
||||
</MenuButton>
|
||||
<MenuList>
|
||||
<DarkMode>
|
||||
<MenuButton
|
||||
as={Button}
|
||||
borderRadius="xl"
|
||||
leftIcon={<HiGlobeAlt />}
|
||||
rightIcon={<HiChevronDown />}
|
||||
size="lg"
|
||||
variant="ghost"
|
||||
>
|
||||
{localeInfo[activeLocaleCode]?.short || activeLocaleCode}
|
||||
</MenuButton>
|
||||
</DarkMode>
|
||||
|
||||
<MenuList borderRadius="xl">
|
||||
{Object.entries(localeInfo).map(([code, { flag, long }]) => (
|
||||
<MenuItem
|
||||
key={code}
|
||||
|
@ -68,7 +68,7 @@ export function CardForm() {
|
||||
{requireCardHolder && <CardHolderFormControl formState={formState} register={register} />}
|
||||
<Spacer />
|
||||
<LightMode>
|
||||
<Button borderRadius="lg" colorScheme="brand" size="lg" type="submit" variant="solid">
|
||||
<Button borderRadius="xl" colorScheme="brand" size="lg" type="submit" variant="solid">
|
||||
{l['form.button.pay.label']} {viewAmount}
|
||||
</Button>
|
||||
</LightMode>
|
||||
|
@ -74,7 +74,7 @@ export function MetadataForm({ provider }: MetadataFormProps) {
|
||||
{!isNil(addon) && <Addon addon={addon} />}
|
||||
<Spacer />
|
||||
<LightMode>
|
||||
<Button borderRadius="lg" colorScheme="brand" size="lg" type="submit" variant="solid">
|
||||
<Button borderRadius="xl" colorScheme="brand" size="lg" type="submit" variant="solid">
|
||||
{l['form.button.pay.label']} {viewAmount}
|
||||
</Button>
|
||||
</LightMode>
|
||||
|
@ -33,7 +33,7 @@ export function PaymentProcessFailedView() {
|
||||
}, [conditions]);
|
||||
|
||||
return (
|
||||
<VStack align="stretch" minH="sm" spacing={6}>
|
||||
<VStack align="stretch" minH="sm" spacing={5}>
|
||||
<Spacer />
|
||||
<Flex justifyContent="center">
|
||||
<WarningIcon boxSize="28" color="red.500" />
|
||||
@ -52,7 +52,7 @@ export function PaymentProcessFailedView() {
|
||||
<VStack align="stretch" spacing={6}>
|
||||
<LightMode>
|
||||
<Button
|
||||
borderRadius="lg"
|
||||
borderRadius="xl"
|
||||
colorScheme="brand"
|
||||
size="lg"
|
||||
variant="solid"
|
||||
|
@ -49,7 +49,7 @@ export function PaymentResultView() {
|
||||
}, [onComplete, lastCondition]);
|
||||
|
||||
return (
|
||||
<VStack align="stretch" minH="sm" spacing={6}>
|
||||
<VStack align="stretch" minH="sm" spacing={5}>
|
||||
<Spacer />
|
||||
<Flex justifyContent="center">
|
||||
<ResultIcon color={color} iconName={iconName} />
|
||||
@ -68,7 +68,7 @@ export function PaymentResultView() {
|
||||
<VStack align="stretch" spacing={6}>
|
||||
{hasActions && isExternalIdEmpty(conditions) && (
|
||||
<LightMode>
|
||||
<Button borderRadius="lg" colorScheme="brand" size="lg" variant="solid" onClick={retry}>
|
||||
<Button borderRadius="xl" colorScheme="brand" size="lg" variant="solid" onClick={retry}>
|
||||
{l['form.button.pay.again.label']}
|
||||
</Button>
|
||||
</LightMode>
|
||||
|
@ -54,7 +54,7 @@ export function QrCodeView() {
|
||||
<>
|
||||
<Input defaultValue={interaction.qrCode} id="qr-code-input" readOnly={true}></Input>
|
||||
<LightMode>
|
||||
<Button borderRadius="lg" colorScheme="brand" size="lg" onClick={onCopy}>
|
||||
<Button borderRadius="xl" colorScheme="brand" size="lg" onClick={onCopy}>
|
||||
{l['form.button.copy.label']}
|
||||
</Button>
|
||||
</LightMode>
|
||||
@ -70,7 +70,7 @@ export function QrCodeView() {
|
||||
<Divider />
|
||||
<LightMode>
|
||||
<Button
|
||||
borderRadius="lg"
|
||||
borderRadius="xl"
|
||||
colorScheme="brand"
|
||||
size="lg"
|
||||
variant="link"
|
||||
|
@ -37,17 +37,19 @@ export function ViewContainer() {
|
||||
<Flex
|
||||
alignItems="stretch"
|
||||
backgroundColor={mainContainerBg}
|
||||
borderRadius="2xl"
|
||||
borderRadius="3xl"
|
||||
boxShadow="lg"
|
||||
direction={['column', 'column', 'row']}
|
||||
gap={4}
|
||||
p={[4, 4, 6]}
|
||||
p={4}
|
||||
>
|
||||
<InfoContainer viewAmount={viewAmount}></InfoContainer>
|
||||
<ViewModelContext.Provider value={{ viewModel, viewAmount, goTo, forward, backward }}>
|
||||
<Box
|
||||
backgroundColor={viewContainerBg}
|
||||
borderRadius="xl"
|
||||
p={[4, 4, 6]}
|
||||
borderRadius="2xl"
|
||||
boxShadow="base"
|
||||
p={4}
|
||||
position="relative"
|
||||
width={['full', 'full', '420px']}
|
||||
>
|
||||
@ -63,7 +65,7 @@ export function ViewContainer() {
|
||||
</Box>
|
||||
</ViewModelContext.Provider>
|
||||
</Flex>
|
||||
<Box paddingLeft="5" paddingRight="5" paddingTop="3">
|
||||
<Box pt="2" px="4">
|
||||
<LocaleSelector initLocaleCode={localeCode} onLocaleChange={changeLocale} />
|
||||
</Box>
|
||||
</>
|
||||
|
Loading…
Reference in New Issue
Block a user