fix(i18n): 补齐九语翻译并修复国际化检查
补齐历史缺译并统一整句插值。九语覆盖 100%,静态检查及 713 项单测通过。
This commit is contained in:
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { Trans } from 'react-i18next';
|
||||
import React, { useState } from 'react';
|
||||
import { Form, Button, Typography, Space, Divider } from '@/components/ui';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
@@ -99,15 +100,19 @@ const SettingsPaymentAlipay = ({ options, refresh }) => {
|
||||
<>
|
||||
<Title heading={5}>{t('支付宝配置')}</Title>
|
||||
<Text type='tertiary'>
|
||||
{t('配置支付宝电脑网站支付、手机网站支付和当面付扫码支付。请前往')}{' '}
|
||||
<a
|
||||
href='https://open.alipay.com'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
{t('支付宝开放平台')}
|
||||
</a>{' '}
|
||||
{t('获取相关配置信息。')}
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='配置支付宝电脑网站支付、手机网站支付和当面付扫码支付。请前往 <part0>支付宝开放平台</part0> 获取相关配置信息。'
|
||||
components={{
|
||||
part0: (
|
||||
<a
|
||||
href='https://open.alipay.com'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</Text>
|
||||
|
||||
<Divider margin='12px' />
|
||||
|
||||
@@ -264,7 +264,7 @@ export default function SettingsPaymentGatewayCreem(props) {
|
||||
<Text>
|
||||
{t('Creem 介绍')}
|
||||
<a href='https://creem.io' target='_blank' rel='noreferrer'>
|
||||
Creem Official Site
|
||||
{t('Creem 官网')}
|
||||
</a>
|
||||
<br />
|
||||
</Text>
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Trans } from 'react-i18next';
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
@@ -373,7 +374,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
|
||||
showSuccess(
|
||||
t(
|
||||
operation === 'inspect'
|
||||
? t('批量查询完成:成功 {{succeeded}} 笔,失败 {{failed}} 笔')
|
||||
? '批量查询完成:成功 {{succeeded}} 笔,失败 {{failed}} 笔'
|
||||
: '批量对账完成:成功 {{succeeded}} 笔,失败 {{failed}} 笔',
|
||||
{ succeeded: data.succeeded || 0, failed: data.failed || 0 },
|
||||
),
|
||||
@@ -442,7 +443,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
|
||||
showSuccess(
|
||||
t(
|
||||
batchExpire.force
|
||||
? t('批量强制过期完成:成功 {{succeeded}} 笔,失败 {{failed}} 笔')
|
||||
? '批量强制过期完成:成功 {{succeeded}} 笔,失败 {{failed}} 笔'
|
||||
: '批量过期完成:成功 {{succeeded}} 笔,失败 {{failed}} 笔',
|
||||
{ succeeded: data.succeeded || 0, failed: data.failed || 0 },
|
||||
),
|
||||
@@ -708,14 +709,20 @@ export default function SettingsPaymentGatewayPayPal(props) {
|
||||
</Col>
|
||||
<Col xs={24} md={8}>
|
||||
<Text type='tertiary'>
|
||||
{t('手续费策略版本')}:{feePolicy?.version || '-'}
|
||||
<br />
|
||||
{t('最后更新')}:
|
||||
{feePolicy?.updated_at
|
||||
? new Date(feePolicy.updated_at * 1000).toLocaleString()
|
||||
: '-'}
|
||||
<br />
|
||||
{t('最后更新人')}:{feePolicy?.updated_by || '-'}
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='手续费策略版本:{{value}}<part0/>最后更新:{{value2}}<part1/>最后更新人:{{value3}}'
|
||||
values={{
|
||||
value: feePolicy?.version || '-',
|
||||
value2: feePolicy?.updated_at
|
||||
? new Date(
|
||||
feePolicy.updated_at * 1000,
|
||||
).toLocaleString()
|
||||
: '-',
|
||||
value3: feePolicy?.updated_by || '-',
|
||||
}}
|
||||
components={{ part0: <br />, part1: <br /> }}
|
||||
/>
|
||||
</Text>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -752,9 +759,7 @@ export default function SettingsPaymentGatewayPayPal(props) {
|
||||
operations
|
||||
? t(
|
||||
operations.can_change_config
|
||||
? t(
|
||||
'配置切换预检:{{n}} 笔 PayPal pending 订单;可以切换环境或应用配置',
|
||||
)
|
||||
? '配置切换预检:{{n}} 笔 PayPal pending 订单;可以切换环境或应用配置'
|
||||
: '配置切换预检:{{n}} 笔 PayPal pending 订单;请先隐藏新订单并完成历史订单排空',
|
||||
{ n: operations.pending_count || 0 },
|
||||
)
|
||||
@@ -893,10 +898,12 @@ export default function SettingsPaymentGatewayPayPal(props) {
|
||||
</Col>
|
||||
<Col xs={24} md={8}>
|
||||
<Text type='tertiary'>
|
||||
{t('结算币种')}:USD
|
||||
<br />
|
||||
{t('换算汇率')}:USDExchangeRate ={' '}
|
||||
{props.options?.USDExchangeRate || '-'}
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='结算币种:USD<part0/>换算汇率:USDExchangeRate = {{value}}'
|
||||
values={{ value: props.options?.USDExchangeRate || '-' }}
|
||||
components={{ part0: <br /> }}
|
||||
/>
|
||||
</Text>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Trans } from 'react-i18next';
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import {
|
||||
Banner,
|
||||
@@ -167,24 +168,27 @@ export default function SettingsPaymentGateway(props) {
|
||||
>
|
||||
<Form.Section text={t('Stripe 设置')}>
|
||||
<Text>
|
||||
{t('Stripe 密钥、Webhook 等设置请')}
|
||||
<a
|
||||
href='https://dashboard.stripe.com/developers'
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
{t('点击此处')}
|
||||
</a>
|
||||
{t('进行设置,最好先在')}
|
||||
<a
|
||||
href='https://dashboard.stripe.com/test/developers'
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
{t('测试环境')}
|
||||
</a>
|
||||
{t('进行测试。')}
|
||||
<br />
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='Stripe 密钥、Webhook 等设置请<part0>点击此处</part0>进行设置,最好先在<part1>测试环境</part1>进行测试。<part2/>'
|
||||
components={{
|
||||
part0: (
|
||||
<a
|
||||
href='https://dashboard.stripe.com/developers'
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
/>
|
||||
),
|
||||
part1: (
|
||||
<a
|
||||
href='https://dashboard.stripe.com/test/developers'
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
/>
|
||||
),
|
||||
part2: <br />,
|
||||
}}
|
||||
/>
|
||||
</Text>
|
||||
<Banner
|
||||
type='info'
|
||||
|
||||
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { Trans } from 'react-i18next';
|
||||
import React, { useState } from 'react';
|
||||
import { Form, Button, Typography, Space, Divider } from '@/components/ui';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
@@ -125,15 +126,19 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
<>
|
||||
<Title heading={5}>{t('微信支付配置')}</Title>
|
||||
<Text type='tertiary'>
|
||||
{t('配置微信支付 Native(扫码)和 H5 支付方式。请前往')}{' '}
|
||||
<a
|
||||
href='https://pay.weixin.qq.com'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
{t('微信支付商户平台')}
|
||||
</a>{' '}
|
||||
{t('获取相关配置信息。')}
|
||||
<Trans
|
||||
t={t}
|
||||
i18nKey='配置微信支付 Native(扫码)和 H5 支付方式。请前往 <part0>微信支付商户平台</part0> 获取相关配置信息。'
|
||||
components={{
|
||||
part0: (
|
||||
<a
|
||||
href='https://pay.weixin.qq.com'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</Text>
|
||||
|
||||
<Divider margin='12px' />
|
||||
|
||||
Reference in New Issue
Block a user