feat: add and optimize multilingual text resources

- add new language packs for multiple pages and components including category, cart, order, member center, distribution, etc.
- add Chinese and English translations for new features and UI text
- fix navigation service error message to use multilingual text
- update component templates to use dynamic language translation instead of hardcoded text
- adjust code indentation and formatting for consistency
This commit is contained in:
2026-06-26 13:49:26 +08:00
parent 66a579d48c
commit f7fb9f34f9
116 changed files with 1640 additions and 525 deletions

View File

@@ -62,7 +62,9 @@ export const lang = {
// WeChat Work JS-SDK
wxworkJssdk: {
notLoaded: 'WeChat Work JS-SDK not loaded',
notInitialized: 'WeChat Work JS-SDK not initialized',
openUserProfileFailed: 'Failed to open user profile',
},
// WeChat Channel
@@ -74,6 +76,63 @@ export const lang = {
playFailed: 'WeChat video playback failed!',
},
// uniapp utility functions
uniappUtils: {
// error tip
errorTip: 'Error',
// copy related
copyTextEmpty: 'Copy text cannot be empty',
copyTimeout: 'Copy operation timed out, please check relevant permissions and configuration',
copyTimeoutTitle: 'Copy operation timed out!',
copyTimeoutReason: 'Reason:',
wechatClipboardReason1: '1. WeChat Platform -> User Privacy Protection Guidelines -> "Clipboard" feature not added or review not passed;',
wechatClipboardReason2: '2. WeChat platform has restrictions on clipboard API call frequency',
copyFailed: 'Copy failed',
},
// http request utility
http: {
// base URL not configured
baseUrlNotConfigured: 'Request domain not configured',
// domain not in whitelist: {url} is the domain placeholder
domainNotInList: '{url} is not in the request domain whitelist',
// request failed: {url} is the domain placeholder
requestFailed: '{url} request failed',
},
// share utility
share: {
// default share description: {name} is the filename placeholder
defaultDesc: 'View enterprise file: {name}',
// Toast messages
shareSuccess: 'Share successful',
shareFailed: 'Share failed',
linkCopied: 'Link copied, paste to share',
copyFailed: 'Copy failed',
// WeChat Mini Program share options
sendToFriend: 'Send to friend',
shareToTimeline: 'Share to Moments',
},
// platform detection
platform: {
wechatOfficialAccount: 'WeChat Official Account',
wechatMiniProgram: 'WeChat Mini Program',
alipayMiniProgram: 'Alipay Mini Program',
baiduMiniProgram: 'Baidu Mini Program',
toutiaoMiniProgram: 'Toutiao Mini Program',
qqMiniProgram: 'QQ Mini Program',
kuaishouMiniProgram: 'Kuaishou Mini Program',
jdMiniProgram: 'JD Mini Program',
miniProgram360: '360 Mini Program',
xhsMiniProgram: 'Xiaohongshu Mini Program',
harmonyService: 'Harmony Service',
app: 'APP',
pc: 'PC',
h5: 'H5',
unknown: 'Unknown Platform',
},
// util utility functions
util: {
// upload
@@ -155,4 +214,21 @@ export const lang = {
logout: 'Log Out',
logoutTitle: 'Tip',
logoutContent: 'Are you sure you want to log out?',
// navigation utility
navigation: {
serviceUnavailable: 'Navigation service temporarily unavailable',
},
// WeChat Map JSSDK
mapWxJssdk: {
// error messages
keyFormatError: 'Invalid key format',
paramError: 'Request parameter error',
systemError: 'System error',
// error message with parameter: {param} is the parameter name
paramFormatError: 'Invalid {param} parameter format',
locationParamFormatError: 'Invalid location parameter format',
keyCannotBeEmpty: 'Key cannot be empty',
},
}