bug(custom): add Arabic

This commit is contained in:
zhangjing1
2025-11-25 10:47:31 +08:00
parent b8122b0da8
commit 01eebe363e
6 changed files with 6869 additions and 4352 deletions

View File

@@ -94,7 +94,7 @@ const config = {
path.resolve(__dirname, './../src/lang/consts.js')
],
globalPath: path.resolve(__dirname, './../src/subpages/i18n/lang'),
targetLangList: ['en', 'zh-tw'], // 目标语言
targetLangList: ['en', 'zh-tw','ar'], // 目标语言
originLang: 'zh-cn', // 源语言
translator: process.env.APP_I18N_APP_KEY
? new YoudaoTranslator({
@@ -158,7 +158,7 @@ const config = {
path.resolve(__dirname, './../src/lang/consts.js')
],
globalPath: path.resolve(__dirname, './../src/subpages/i18n/lang'),
targetLangList: ['en', 'zh-tw'], // 目标语言
targetLangList: ['en', 'zh-tw','ar'], // 目标语言
originLang: 'zh-cn', // 源语言
translator: process.env.APP_I18N_APP_KEY
? new YoudaoTranslator({

View File

@@ -4,8 +4,9 @@
*/
const i18n = {
zhcn: '简体中文',
en: 'English'
// zhtw: '繁體中文'
en: 'English',
// zhtw: '繁體中文',
ar: 'العربية'
}
export default i18n

View File

@@ -84,7 +84,11 @@ class Lang {
'zhtw':
globalThis && globalThis.lang && globalThis.lang.zhtw
? globalThis.lang.zhtw
: globalThis._getJSONKey('zh-tw', langJSON)
: globalThis._getJSONKey('zh-tw', langJSON),
'ar':
globalThis && globalThis.lang && globalThis.lang.ar
? globalThis.lang.ar
: globalThis._getJSONKey('ar', langJSON),
}
globalThis.langMap = langMap
// 存储语言是否存在

View File

@@ -74,7 +74,11 @@ const langMap = {
'zhcn':
globalThis && globalThis.lang && globalThis.lang.zhcn
? globalThis.lang.zhcn
: globalThis._getJSONKey('zh-cn', langJSON)
: globalThis._getJSONKey('zh-cn', langJSON),
'ar':
globalThis && globalThis.lang && globalThis.lang.ar
? globalThis.lang.ar
: globalThis._getJSONKey('ar', langJSON),
}
globalThis.langMap = langMap
// 存储语言是否存在

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
import React, { useEffect, useRef } from 'react'
import React, { useEffect, useRef} from 'react'
import { useSelector } from 'react-redux'
import { useImmer } from 'use-immer'
import Taro, { useDidShow, useRouter } from '@tarojs/taro'
@@ -117,10 +117,6 @@ function TradeDetail(props) {
}
}, [openingTime])
const totalFreightFee = useMemo(() => {
const { freightFee, freightPointFee } = info || {}
return Number(freightFee || 0 + freightPointFee || 0)?.toFixed(2)
}, [info?.freightFee, info?.freightPointFee])
const fetch = async () => {
const { order_id } = await parameter()