diff --git a/src/components/LanguageSwitcher.vue b/src/components/LanguageSwitcher.vue index 1f82822a..33fd2ce0 100644 --- a/src/components/LanguageSwitcher.vue +++ b/src/components/LanguageSwitcher.vue @@ -5,7 +5,7 @@ import { TranslateIcon } from 'tdesign-icons-vue-next'; -import { langList } from '@/locales'; +import { languageList } from '@/locales'; import { useLocale } from '@/locales/useLocale'; const { changeLocale } = useLocale(); diff --git a/src/components/common-table/index.vue b/src/components/common-table/index.vue index c9f57538..e1479358 100644 --- a/src/components/common-table/index.vue +++ b/src/components/common-table/index.vue @@ -114,7 +114,7 @@ { if (deleteIdx.value > -1) { const { name } = data.value[deleteIdx.value]; - return `删除后,${name}的所有合同信息将被清空,且无法恢复`; + return t('pages.listBase.deleteTip', { name }); } return ''; }); @@ -256,7 +256,7 @@ const onConfirmDelete = () => { data.value.splice(deleteIdx.value, 1); pagination.value.total = data.value.length; confirmVisible.value = false; - MessagePlugin.success('删除成功'); + MessagePlugin.success(t('components.deleteSuccess')); resetIdx(); }; diff --git a/src/layouts/components/Breadcrumb.vue b/src/layouts/components/Breadcrumb.vue index 33f4419a..b509e2a4 100644 --- a/src/layouts/components/Breadcrumb.vue +++ b/src/layouts/components/Breadcrumb.vue @@ -9,11 +9,17 @@ import { computed } from 'vue'; import { useRoute } from 'vue-router'; +import type { LocalizedTitle } from '@/locales'; import { useLocale } from '@/locales/useLocale'; const { locale } = useLocale(); const route = useRoute(); +const renderTitle = (title?: LocalizedTitle, fallback?: string) => { + if (!title) return fallback || ''; + return title[locale.value as keyof LocalizedTitle] || fallback || ''; +}; + const crumbs = computed(() => { const pathArray = route.path.split('/'); pathArray.shift(); @@ -24,14 +30,7 @@ const crumbs = computed(() => { if (meta?.hiddenBreadcrumb || Object.values(route.params).includes(path)) { return breadcrumbArray; } - let title = path; - if (meta?.title) { - if (typeof meta.title === 'string') { - title = meta.title; - } else { - title = meta.title[locale.value]; - } - } + const title = renderTitle(meta?.title as LocalizedTitle, path); breadcrumbArray.push({ path, to: breadcrumbArray[idx - 1] ? `${breadcrumbArray[idx - 1].to}/${path}` : `/${path}`, diff --git a/src/layouts/components/LayoutContent.vue b/src/layouts/components/LayoutContent.vue index 9d7e10d9..a485d401 100644 --- a/src/layouts/components/LayoutContent.vue +++ b/src/layouts/components/LayoutContent.vue @@ -75,6 +75,7 @@ import { computed, nextTick, ref } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { prefix } from '@/config/global'; +import type { LocalizedTitle } from '@/locales'; import { t } from '@/locales'; import { useLocale } from '@/locales/useLocale'; import { useSettingStore, useTabsRouterStore } from '@/store'; @@ -108,9 +109,9 @@ const handleRemove = (options: TTabRemoveOptions) => { if ((options.value as string) === route.path) router.push({ path: nextRouter.path, query: nextRouter.query }); }; -const renderTitle = (title: string | Record) => { - if (typeof title === 'string') return title; - return title[locale.value]; +const renderTitle = (title?: LocalizedTitle) => { + if (!title) return ''; + return title[locale.value as keyof LocalizedTitle] || ''; }; const handleRefresh = (route: TRouterInfo, routeIdx: number) => { tabsRouterStore.toggleTabRouterAlive(routeIdx); diff --git a/src/layouts/components/MenuContent.vue b/src/layouts/components/MenuContent.vue index 2bb2a08b..aec66a37 100644 --- a/src/layouts/components/MenuContent.vue +++ b/src/layouts/components/MenuContent.vue @@ -28,6 +28,7 @@ import type { PropType } from 'vue'; import { computed } from 'vue'; +import type { LocalizedTitle } from '@/locales'; import { useLocale } from '@/locales/useLocale'; import { getActive } from '@/router'; import type { MenuRoute } from '@/types/interface'; @@ -44,6 +45,7 @@ const { navData } = defineProps({ const active = computed(() => getActive()); const { locale } = useLocale(); + const list = computed(() => { return getMenuList(navData); }); @@ -54,12 +56,12 @@ const menuIcon = (item: ListItemType) => { return RenderIcon; }; -const renderMenuTitle = (title: string | Record) => { - if (typeof title === 'string') return title; - return title[locale.value]; +const renderMenuTitle = (title?: LocalizedTitle) => { + if (!title) return ''; + return title[locale.value as keyof LocalizedTitle] || ''; }; -const getMenuList = (list: MenuRoute[], basePath?: string): ListItemType[] => { +function getMenuList(list: MenuRoute[], basePath?: string): MenuRoute[] { if (!list || list.length === 0) { return []; } @@ -73,15 +75,15 @@ const getMenuList = (list: MenuRoute[], basePath?: string): ListItemType[] => { return { path, - title: item.meta?.title, + title: item.meta?.title as LocalizedTitle | undefined, icon: item.meta?.icon, children: getMenuList(item.children, path), meta: item.meta, redirect: item.redirect, - }; + } as MenuRoute; }) .filter((item) => item.meta && item.meta.hidden !== true); -}; +} const getHref = (item: MenuRoute) => { const { frameSrc, frameBlank } = item.meta; diff --git a/src/layouts/components/Search.vue b/src/layouts/components/Search.vue index fa3c4591..11a7b9bd 100644 --- a/src/layouts/components/Search.vue +++ b/src/layouts/components/Search.vue @@ -27,7 +27,7 @@ v-model="searchData" class="header-search" :class="[{ 'width-zero': !isSearchFocus }]" - placeholder="输入要搜索内容" + :placeholder="t('layout.search.placeholder')" :autofocus="isSearchFocus" @blur="changeSearchFocus(false)" > diff --git a/src/layouts/components/SideNav.vue b/src/layouts/components/SideNav.vue index 40a0af70..2ed73887 100644 --- a/src/layouts/components/SideNav.vue +++ b/src/layouts/components/SideNav.vue @@ -16,7 +16,7 @@
@@ -32,6 +32,7 @@ import { useRouter } from 'vue-router'; import AssetLogoFull from '@/assets/assets-logo-full.svg?component'; import AssetLogo from '@/assets/assets-t-logo.svg?component'; import { prefix } from '@/config/global'; +import { t } from '@/locales'; import { getActive } from '@/router'; import { useSettingStore } from '@/store'; import type { MenuRoute, ModeType } from '@/types/interface'; diff --git a/src/layouts/index.vue b/src/layouts/index.vue index 7590fd63..e844159f 100644 --- a/src/layouts/index.vue +++ b/src/layouts/index.vue @@ -55,7 +55,8 @@ const appendNewRoute = () => { meta: { title }, name, } = route; - tabsRouterStore.appendTabRouterList({ path, query, title: title as string, name, isAlive: true, meta: route.meta }); + const titleObj = typeof title === 'string' ? { zh_CN: title, en_US: title } : title; + tabsRouterStore.appendTabRouterList({ path, query, title: titleObj, name, isAlive: true, meta: route.meta }); }; onMounted(() => { diff --git a/src/layouts/setting.vue b/src/layouts/setting.vue index 93279ac8..049eeb26 100644 --- a/src/layouts/setting.vue +++ b/src/layouts/setting.vue @@ -124,11 +124,11 @@ const settingStore = useSettingStore(); const LAYOUT_OPTION = ['side', 'top', 'mix']; -const MODE_OPTIONS = [ +const MODE_OPTIONS = computed(() => [ { type: 'light', text: t('layout.setting.theme.options.light') }, { type: 'dark', text: t('layout.setting.theme.options.dark') }, { type: 'auto', text: t('layout.setting.theme.options.auto') }, -]; +]); const initStyleConfig = () => { const styleConfig = STYLE_CONFIG; @@ -181,11 +181,11 @@ const handleCopy = () => { copy() .then(() => { MessagePlugin.closeAll(); - MessagePlugin.success('复制成功'); + MessagePlugin.success(t('components.copySuccess')); }) .catch(() => { MessagePlugin.closeAll(); - MessagePlugin.error('复制失败'); + MessagePlugin.error(t('components.copyFail')); }); }; const getModeIcon = (mode: string) => { diff --git a/src/locales/index.ts b/src/locales/index.ts index 80389beb..14024c33 100644 --- a/src/locales/index.ts +++ b/src/locales/index.ts @@ -1,67 +1,60 @@ -import { useLocalStorage, usePreferredLanguages } from '@vueuse/core'; import type { DropdownOption } from 'tdesign-vue-next'; +import en_US from 'tdesign-vue-next/es/locale/en_US'; +import zh_CN from 'tdesign-vue-next/es/locale/zh_CN'; import { computed } from 'vue'; import type { I18nOptions } from 'vue-i18n'; import { createI18n } from 'vue-i18n'; -// 导入语言文件 -const langModules = import.meta.glob('./lang/*/index.ts', { eager: true }); - -const langModuleMap = new Map(); +export const localeConfigKey = 'tdesign-starter-locale'; -export const langCode: Array = []; +// 定义支持的语言列表,添加新语言时只需在此处添加 +export const supportedLocales = ['zh_CN', 'en_US'] as const; +export type SupportedLocale = (typeof supportedLocales)[number]; -export const localeConfigKey = 'tdesign-starter-locale'; +// 多语言标题类型,用于路由 meta.title 等场景 +export type LocalizedTitle = Record; -// 获取浏览器默认语言环境 -const languages = usePreferredLanguages(); +const tdesignLocaleMap: Record = { zh_CN, en_US }; -// 生成语言模块列表 -const generateLangModuleMap = () => { - const fullPaths = Object.keys(langModules); - fullPaths.forEach((fullPath) => { - const k = fullPath.replace('./lang', ''); - const startIndex = 1; - const lastIndex = k.lastIndexOf('/'); - const code = k.substring(startIndex, lastIndex); - langCode.push(code); - langModuleMap.set(code, langModules[fullPath]); - }); -}; +const langModules = import.meta.glob<{ default: Record }>('./lang/*.json', { eager: true }); -// 导出 Message -const importMessages = computed(() => { - generateLangModuleMap(); +const langCode: SupportedLocale[] = []; +const messages: I18nOptions['messages'] = {}; +const langList: DropdownOption[] = []; - const message: I18nOptions['messages'] = {}; - langModuleMap.forEach((value: any, key) => { - message[key] = value.default; - }); - return message; +Object.entries(langModules).forEach(([path, module]) => { + const code = path.match(/\.\/lang\/([^.]+)\.json$/)?.[1] as SupportedLocale | undefined; + if (!code || !supportedLocales.includes(code)) return; + langCode.push(code); + messages[code] = { ...module.default, componentsLocale: tdesignLocaleMap[code] }; + langList.push({ content: module.default.lang as string, value: code }); }); +export { langCode }; + +// 获取初始语言:优先本地存储,其次浏览器偏好,最后默认中文 +const getInitialLocale = (): SupportedLocale => { + const stored = localStorage.getItem(localeConfigKey); + if (stored && supportedLocales.includes(stored as SupportedLocale)) { + return stored as SupportedLocale; + } + const preferred = navigator.languages?.[0]?.replace(/-/g, '_'); + if (preferred && supportedLocales.includes(preferred as SupportedLocale)) { + return preferred as SupportedLocale; + } + return 'zh_CN'; +}; + +const initialLocale = getInitialLocale(); + export const i18n = createI18n({ legacy: false, - locale: useLocalStorage(localeConfigKey, 'zh_CN').value || languages.value[0] || 'zh_CN', + locale: initialLocale, fallbackLocale: 'zh_CN', - messages: importMessages.value, + messages, globalInjection: true, }); -export const langList = computed(() => { - if (langModuleMap.size === 0) generateLangModuleMap(); - - const list: DropdownOption[] = []; - langModuleMap.forEach((value: any, key) => { - list.push({ - content: value.default.lang, - value: key, - }); - }); - - return list; -}); - +export const languageList = computed(() => langList); export const { t } = i18n.global; - export default i18n; diff --git a/src/locales/lang/en_US.json b/src/locales/lang/en_US.json new file mode 100644 index 00000000..da56c7d8 --- /dev/null +++ b/src/locales/lang/en_US.json @@ -0,0 +1,752 @@ +{ + "lang": "English", + "common": { + "appName": "TDesign Starter", + "copyright": "Copyright @ 2021-2025 Tencent. All Rights Reserved", + "conjunction": "and", + "admin": "admin" + }, + "components": { + "isSetup": { + "on": "Enabled", + "off": "Disabled" + }, + "manage": "Manage", + "delete": "Delete", + "deleteSuccess": "Deleted successfully", + "copySuccess": "Copied successfully", + "copyFail": "Copy failed", + "submitSuccess": "Submitted successfully", + "commonTable": { + "contractName": "Name", + "contractStatus": "Status", + "contractNum": "Number", + "contractType": "Type", + "contractPayType": "Pay Type", + "contractAmount": "Amount", + "contractNamePlaceholder": "enter contract name", + "contractStatusPlaceholder": "enter contract status", + "contractNumPlaceholder": "enter contract number", + "contractTypePlaceholder": "enter contract type", + "operation": "Operation", + "detail": "detail", + "delete": "delete", + "placeholder": "please enter to search", + "contractStatusEnum": { + "fail": "fail", + "audit": "audit", + "executing": "executing", + "pending": "pending", + "finish": "finish" + }, + "contractTypeEnum": { + "main": "main", + "sub": "sub", + "supplement": "supplement" + }, + "reset": "reset", + "query": "query" + } + }, + "layout": { + "header": { + "code": "Code Repository", + "help": "Document", + "user": "Profile", + "signOut": "Sign Out", + "setting": "Setting" + }, + "notice": { + "title": "Notification Center", + "clear": "Clear", + "setRead": "Set Read", + "empty": "Empty", + "emptyNotice": "No Notice", + "viewAll": "View All" + }, + "tagTabs": { + "closeOther": "close other", + "closeLeft": "close left", + "closeRight": "close right", + "refresh": "refresh" + }, + "searchPlaceholder": "Enter search content", + "search": { + "placeholder": "Enter search content" + }, + "setting": { + "title": "Setting", + "theme": { + "mode": "Theme Mode", + "color": "Theme Color", + "options": { + "light": "Light", + "dark": "Dark ", + "auto": "Follow System" + } + }, + "navigationLayout": "Navigation Layout", + "sideMode": "Side Menu Mode", + "splitMenu": "Split Menu (Only Mix mode)", + "fixedSidebar": "Fixed Sidebar", + "element": { + "title": "Element Switch", + "showHeader": "Show Header", + "showBreadcrumb": "Show Breadcrumb", + "showFooter": "Show Footer", + "useTagTabs": "Use Tag Tabs", + "menuAutoCollapsed": "Menu Auto Collapsed" + }, + "tips": "Please copy and manually modify the configuration file: /src/config/style.ts", + "copy": { + "title": "Copy", + "success": "copied", + "fail": "fail to copy" + } + } + }, + "constants": { + "contract": { + "name": "Name", + "status": "Status", + "num": "Number", + "type": "Type", + "typePlaceholder": "Please enter type", + "payType": "Pay Type", + "amount": "Amount", + "amountPlaceholder": "Please enter amount", + "signDate": "Sign Date", + "effectiveDate": "Effective Date", + "endDate": "End Date", + "createDate": "Create Date", + "attachment": "Attachment", + "company": "Company", + "employee": "Employee", + "pay": "pay", + "receive": "received", + "remark": "remark", + "statusOptions": { + "fail": "Failure", + "auditPending": "Pending audit", + "execPending": "Pending performance", + "executing": "Successful", + "finish": "Finish" + }, + "typeOptions": { + "main": "Master contract", + "sub": "Subcontract", + "supplement": "Supplementary contract" + } + } + }, + "pages": { + "dashboardBase": { + "title": "Overview Dashboard", + "outputOverview": { + "title": "In/Out Overview", + "subtitle": "(pieces)", + "export": "Export data", + "month": { + "input": "Total in store this month", + "output": "Total out store this month" + }, + "since": "Since last week" + }, + "rankList": { + "title": "Sales order ranking", + "week": "This week", + "month": "Latest 3 months", + "info": "Detail" + }, + "topPanel": { + "card1": "Total Revenue", + "card2": "Total Refund", + "card3": "Active User(s)", + "card4": "Generate Order(s)", + "cardTips": "since last week", + "analysis": { + "title": "Analysis Data", + "unit": "ten thousand yuan", + "series1": "this month", + "series2": "last month", + "channels": "Sales Channels", + "channel1": "online", + "channel2": "shop", + "channelTips": " sales ratio" + } + }, + "saleColumns": { + "index": "Ranking", + "productName": "Customer", + "growUp": "Grow up", + "count": "Count", + "operation": "Operation" + }, + "buyColumns": { + "index": "Ranking", + "productName": "Supplier", + "growUp": "Grow up", + "count": "Count", + "operation": "Operation" + }, + "saleTend": { + "item1": "State Grid Corporation of China", + "item2": "Shenzhen Gas Group Co., Ltd", + "item3": "State Administration of Tobacco Monopoly", + "item4": "China Telecom Group Co., Ltd", + "item5": "China Mobile Communications Group Co., Ltd", + "item6": "Xinyu City Office Supplies Procurement Project" + }, + "buyTend": { + "item1": "Tencent Technology (Shenzhen) Co., Ltd", + "item2": "Darunfa Co., Ltd", + "item3": "Sichuan Haidilao Co., Ltd", + "item4": "Sony (China) Co., Ltd", + "item5": "Panasonic Electronics (China) Co., Ltd", + "item6": "Xinyu City Office Supplies Procurement Project" + }, + "chart": { + "week1": "MON", + "week2": "TUE", + "week3": "WED", + "week4": "THU", + "week5": "FRI", + "week6": "SAT", + "week7": "SUN", + "max": "Max", + "min": "Min", + "thisMonth": "this month", + "lastMonth": "last month" + } + }, + "dashboardDetail": { + "topPanel": { + "title": "Purchase applications for this month", + "quarter": "Quarter on quarter", + "paneList": { + "totalRequest": "Apply count", + "suppliers": "Number of Suppliers", + "productCategory": "Product Category", + "applicant": "Number of Application", + "completionRate": "Completion Rate(%)", + "arrivalRate": "Arrival Rate(%)" + } + }, + "procurement": { + "title": "Trends in purchase requisitions for goods", + "goods": { + "cup": "cup", + "tea": "tea", + "honey": "honey", + "flour": "flour", + "coffeeMachine": "coffee machine", + "massageMachine": "massage machine" + } + }, + "ssl": "SSL certificate", + "sslDescription": "SSL certificate, also known as a server certificate, is a digital certificate that authenticates the identity of a website and encrypts information sent to the server using SSL technology. Tencent Cloud provides you with a one-stop service for SSL certificates, including application, management, and deployment of both free and paid certificates.", + "satisfaction": { + "title": "distribution of satisfaction levels for purchased goods", + "export": "export data" + }, + "chart": { + "week1": "MON", + "week2": "TUE", + "week3": "WED", + "week4": "THU", + "week5": "FRI", + "week6": "SAT", + "week7": "SUN", + "max": "Max", + "min": "Min", + "thisMonth": "this month", + "lastMonth": "last month" + } + }, + "detailBase": { + "baseInfo": { + "title": "Base Info" + }, + "sampleData": { + "contractName": "Office Supplies Procurement Project", + "status": "In Progress", + "company": "Tencent Technology (Shenzhen) Co., Ltd", + "employee": "Osun", + "fileName": "Office Supplies Procurement Contract.pdf" + }, + "changelog": { + "title": "Changelog", + "step1": { + "title": "upload file", + "subtitle": "subtitle" + }, + "step2": { + "title": "modify contract amount", + "subtitle": "subtitle" + }, + "step3": { + "title": "create contract", + "desc": "administrator" + } + } + }, + "detailCard": { + "baseInfo": { + "title": "Base Info" + }, + "invoice": { + "title": "Invoice Progress", + "step1": { + "title": "Apply", + "content": "The electronic invoice has been submitted on December 21st" + }, + "step2": { + "title": "Electronic invoice", + "content": "expected to be processed within 1-3 business days." + }, + "step3": { + "title": "Invoice is send", + "content": "we will contact you within 7 business days." + }, + "step4": { + "title": "Finish" + } + }, + "product": { + "title": "Product Category", + "add": "add production", + "month": "month", + "quarter": "quarter" + }, + "detail": { + "title": "Product Procurement Detail", + "budgetExceeded": "Budget Exceeded", + "form": { + "applyNo": "Apply no", + "product": "Name", + "productNo": "No.", + "department": "Department", + "num": "Num", + "createTime": "Create time", + "operation": "Operation", + "manage": "manage", + "delete": "delete" + } + }, + "products": { + "product1": { + "name": "MacBook Pro 2021", + "company": "Apple Inc.", + "size": "13.3 inches", + "cpu": "Apple M1", + "memory": "RAM 16GB", + "info": "Up to 16GB memory · Up to 2TB storage · Battery life up to 18 hours" + }, + "product2": { + "name": "Surface Laptop Go", + "company": "Microsoft Corporation", + "size": "12.4 inches", + "cpu": "Core i7", + "memory": "RAM 16GB", + "info": "Surface regular use, up to 13 hours of battery life, work anytime" + } + } + }, + "detailDeploy": { + "deployTrend": { + "title": "Deploy Trend", + "warning": "Warning", + "thisMonth": "this month", + "thisWeek": "this week", + "lastMonth": "last month", + "thisYear": "this year", + "lastYear": "last year", + "week1": "MON", + "week2": "TUE", + "week3": "WED", + "week4": "THU", + "week5": "FRI", + "week6": "SAT", + "week7": "SUN" + }, + "projectList": { + "title": "Project List", + "dialog": { + "title": "Base Info" + }, + "table": { + "name": "Name", + "admin": "Admin", + "createTime": "Create time", + "operation": "Operation", + "manage": "manage", + "delete": "delete" + } + }, + "baseInfo": { + "clusterName": "Cluster Name", + "clusterId": "Cluster ID", + "status": "Status", + "running": "Running", + "k8sVersion": "K8S Version", + "config": "Config", + "region": "Region", + "guangzhou": "Guangzhou", + "project": "Resource Project", + "defaultProject": "Default Project", + "nodeCount": "Node Count", + "nodeNetwork": "Node Network", + "containerNetwork": "Container Network", + "clusterCredential": "Cluster Credential", + "showCredential": "Show Credential", + "createUpdate": "Create/Update", + "description": "Description" + } + }, + "detailSecondary": { + "read": "Read", + "unread": "Unread", + "all": "All", + "setRead": "set as read", + "setUnread": "set as unread", + "delete": "delete", + "deleteConfirm": "Delete notification", + "deleteTip": "Confirm delete notification: {content}?", + "empty": "Empty" + }, + "notification": { + "contract": "Contract Updates", + "invoice": "Invoice Updates", + "meeting": "Meeting Notification", + "msg1": "Tencent Building First Floor Renovation Project has passed audit!", + "msg2": "Third Quarter Raw Material Procurement Project invoicing successful!", + "msg3": "Meeting 【State Grid Offline Signing】at 2021-01-01 10:00 is about to start, please arrive at Conference Room 1 10 minutes early for check-in!", + "msg4": "First Quarter Raw Material Procurement Project invoicing successful!" + }, + "formBase": { + "title": "Contract Info", + "contractName": "Name", + "contractNamePlaceholder": "Please enter contract name", + "contractStatus": "Status", + "contractNum": "Number", + "contractType": "Type", + "contractTypePlaceholder": "Please enter type", + "contractPayType": "Pay Type", + "contractAmount": "Amount", + "contractAmountPlaceholder": "Please enter amount", + "contractSignDate": "Sign Date", + "contractEffectiveDate": "Effective Date", + "contractEndDate": "End Date", + "company": "Company", + "employee": "Employee", + "pay": "pay", + "receive": "received", + "upload": "upload file", + "uploadFile": "upload contract file", + "uploadTips": "Please upload a PDF file, with a size limit of 60MB.", + "otherInfo": "Other Info", + "remark": "Remark", + "remarkPlaceholder": "please enter remark", + "notaryPublic": "Notary Public", + "fileSizeExceed": "File size cannot exceed 60MB", + "uploadFail": "Upload failed", + "confirm": "confirm", + "cancel": "cancel", + "validation": { + "name": "Please enter contract name", + "type": "Please select contract type", + "payment": "Please select payment type", + "amount": "Please enter amount", + "partyA": "Please select Party A", + "partyB": "Please select Party B", + "signDate": "Please select date", + "startDate": "Please select date", + "endDate": "Please select date" + }, + "typeOptions": { + "typeA": "Type A", + "typeB": "Type B", + "typeC": "Type C" + }, + "partyOptions": { + "companyA": "Company A", + "companyB": "Company B", + "companyC": "Company C" + } + }, + "formStep": { + "validation": { + "name": "Please select contract name", + "type": "Please select type", + "title": "Please enter invoice title", + "taxNum": "Please enter tax number", + "consignee": "Please enter consignee", + "mobileNum": "Please enter mobile number", + "deliveryAddress": "Please select delivery address", + "fullAddress": "Please enter full address" + }, + "options": { + "nameA": "Contract A", + "nameB": "Contract B", + "nameC": "Contract C", + "typeA": "Type A", + "typeB": "Type B", + "typeC": "Type C", + "address1": "Nanshan District, Shenzhen, Guangdong", + "address2": "Haidian District, Beijing", + "address3": "Xuhui District, Shanghai", + "address4": "High-tech Zone, Chengdu, Sichuan", + "address5": "Tianhe District, Guangzhou, Guangdong", + "address6": "High-tech Zone, Xi'an, Shaanxi" + }, + "step1": { + "title": "Submit Application", + "subtitle": "Submitted on December 21st", + "rules": "rules", + "rule1": "1. After applying for an invoice, the electronic invoice will be issued within 1-3 working days. If the qualification review is passed, the VAT special invoice (paper) will be mailed to you within 10 working days after the electronic invoice is issued;", + "rule2": "2. The invoiced amount will be the actual amount you paid;", + "rule3": "3. For any questions, please contact us directly at 13300001111.", + "contractName": "Name", + "contractTips": "Please select a contract name", + "invoiceType": "Invoice type", + "amount": "Amount", + "submit": "Submit Application" + }, + "step2": { + "title": "Electronic Information", + "subtitle": "Contact Customer Service if you have any questions", + "invoiceTitle": "Invoice Title", + "taxNum": "Tax Num", + "address": "Address", + "bank": "Bank", + "bankAccount": "Bank Account", + "email": "Email", + "tel": "Tel", + "invoiceTitlePlaceholder": "please enter invoice title", + "taxNumPlaceholder": "please enter tax num", + "addressPlaceholder": "please enter address", + "bankPlaceholder": "please enter bank", + "bankAccountPlaceholder": "please enter bank account", + "emailPlaceholder": "please enter email", + "telPlaceholder": "please enter tel" + }, + "step3": { + "title": "Invoice Mailed", + "subtitle": "Contact us after the electronic invoice is issued", + "consignee": "Consignee", + "mobileNum": "Mobile Num", + "deliveryAddress": "Address", + "fullAddress": "Full Address" + }, + "step4": { + "title": "Application Completed", + "subtitle": "Contact Customer Service if you have any questions", + "finishTitle": "Application is completed.", + "finishTips": "The electronic invoice is expected to be sent to your email within 1-3 working days. Please be patient for the delivery of the paper invoice.", + "reapply": "reapply", + "check": "check progress" + }, + "preStep": "pre step", + "nextStep": "next step" + }, + "listBase": { + "export": "export", + "create": "create", + "select": "select", + "items": "items", + "contractName": "Name", + "contractStatus": "Status", + "contractNum": "Number", + "contractType": "Type", + "contractPayType": "Pay Type", + "contractAmount": "Amount", + "operation": "Operation", + "detail": "detail", + "delete": "delete", + "pay": "pay", + "receive": "received", + "placeholder": "please enter to search", + "deleteConfirm": "Confirm delete selected contracts?", + "deleteTip": "After deletion, all contract information of {name} will be cleared and cannot be recovered", + "contractStatusEnum": { + "fail": "fail", + "audit": "audit", + "executing": "executing", + "pending": "pending", + "finish": "finish" + } + }, + "listCard": { + "create": "Create Product", + "placeholder": "please enter to search", + "loading": "Loading data...", + "deleteConfirm": "Confirm delete selected products?", + "deleteSuccess": "Deleted successfully", + "deleteTip": "After confirmation, all product information of {name} will be cleared and cannot be recovered", + "productName": "Name", + "productStatus": "Status", + "productDescription": "Description", + "productType": "Type", + "productRemark": "Remark", + "productStatusEnum": { + "off": "off", + "on": "on" + }, + "dialogForm": { + "productNamePlaceholder": "Please enter product name", + "cancel": "Cancel", + "confirm": "Confirm", + "typeGateway": "Gateway", + "typeAI": "Artificial Intelligence", + "typeCVM": "CVM", + "validation": { + "productName": "Please enter product name" + } + } + }, + "listFilter": {}, + "listTree": { + "placeholder": "please enter to search", + "treeData": { + "shenzhen": "Shenzhen HQ", + "beijing": "Beijing HQ", + "shanghai": "Shanghai HQ", + "hunan": "Hunan", + "hubei": "Hubei", + "generalOffice": "General Office", + "marketing": "Marketing", + "technology": "Technology", + "finance": "Finance", + "purchase1": "Purchasing Team 1", + "purchase2": "Purchasing Team 2", + "finance1": "Finance Team 1", + "finance2": "Finance Team 2" + } + }, + "login": { + "loginTitle": "Login in", + "noAccount": "No Account?", + "createAccount": "Create Account", + "remember": "Remember Account", + "forget": "Forget Account", + "signIn": "Sign in", + "existAccount": "Exist Account?", + "register": "Register", + "refresh": "refresh", + "wechatLogin": "Login with WeChat", + "accountLogin": "Login with Account", + "phoneLogin": "Login with Mobile Phone", + "loginSuccess": "Login successful", + "countdown": "Resend after {count} seconds", + "input": { + "account": "please enter account", + "password": "please enter password", + "phone": "please enter phone", + "verification": "please enter verification code" + }, + "required": { + "account": "account is required", + "phone": "phone is required", + "password": "password is required", + "verification": "verification code is require" + }, + "sendVerification": "send", + "register": { + "phonePlaceholder": "Please enter your phone number", + "emailPlaceholder": "Please enter your email", + "passwordPlaceholder": "Please enter your password", + "verifyCodePlaceholder": "Please enter verification code", + "sendVerifyCode": "Send verification code", + "resendCountdown": "Resend in {count} seconds", + "agreeTerms": "I have read and agree to", + "serviceTerms": "TDesign Service Terms", + "privacyStatement": "TDesign Privacy Statement", + "registerBtn": "Register", + "useEmailRegister": "Register with email", + "usePhoneRegister": "Register with phone", + "validation": { + "phone": "Phone number is required", + "email": "Email is required", + "emailFormat": "Please enter a valid email", + "password": "Password is required", + "verifyCode": "Verification code is required", + "agreeTerms": "You must agree to the service terms and privacy statement" + }, + "messages": { + "registerSuccess": "Registration successful" + } + } + }, + "result": { + "403": { + "tips": "sorry, you don not have permission to access this page. Please contact the creator through WeCom", + "back": "Back to homepage" + }, + "404": { + "subtitle": "Sorry, the page is not found", + "back": "Back to homepage" + }, + "500": { + "subtitle": "Sorry, the server is error", + "back": "Back to homepage" + }, + "fail": { + "title": "Create fail", + "subtitle": "Sorry, your project creation has failed", + "back": "Back to homepage", + "modify": "Back to modify" + }, + "success": { + "title": "Project is created", + "subtitle": "Contact the person in charge of distributing the application", + "back": "Back to homepage", + "progress": "Check Progress" + }, + "maintenance": { + "title": "System maintenance", + "subtitle": "Please try again later", + "back": "Back to homepage" + }, + "browserIncompatible": { + "title": "browser is incompatible", + "subtitle": "the browser version you are using is too outdated to open the current webpage.", + "back": "Back to homepage", + "recommend": "TDesign Starter recommend the following browser" + }, + "networkError": { + "title": "Network Error", + "subtitle": "Network error, please try again later", + "back": "Back to homepage", + "reload": "Reload" + } + }, + "user": { + "markDay": "Good afternoon, today marks your 100th day at Tencent", + "greeting": "Hi, Image", + "unit": "(times)", + "account": "My Account", + "organization": "Tencent / Tencent Company / Business Group / Product Department / Operations Center / Merchant Services Group", + "personalInfo": { + "title": "Personal Info", + "position": "Employee of the Hong Kong and Macau Business Expansion team", + "desc": { + "phone": "Phone", + "mobile": "Mobile", + "seat": "Seat", + "email": "Email", + "position": "Position", + "leader": "Leader", + "entity": "Entity", + "joinDay": "Day of join", + "group": "Group" + }, + "tencentGroup": "Tencent Group", + "seniorDesigner": "Senior UI Designer" + }, + "visitData": "Visit Data", + "contentList": "Content List", + "teamMember": "Team Member", + "serviceProduction": "Service Product" + } + } +} diff --git a/src/locales/lang/en_US/components.ts b/src/locales/lang/en_US/components.ts deleted file mode 100644 index e4e09d5f..00000000 --- a/src/locales/lang/en_US/components.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default { - isSetup: { - on: 'Enabled', - off: 'Disabled', - }, - manage: 'Manage', - delete: 'Delete', - commonTable: { - contractName: 'Name', - contractStatus: 'Status', - contractNum: 'Number', - contractType: 'Type', - contractPayType: 'Pay Type', - contractAmount: 'Amount', - contractNamePlaceholder: 'enter contract name', - contractStatusPlaceholder: 'enter contract status', - contractNumPlaceholder: 'enter contract number', - contractTypePlaceholder: 'enter contract type', - operation: 'Operation', - detail: 'detail', - delete: 'delete', - contractStatusEnum: { - fail: 'fail', - audit: 'audit', - executing: 'executing', - pending: 'pending', - finish: 'finish', - }, - contractTypeEnum: { - main: 'main', - sub: 'sub', - supplement: 'supplement', - }, - reset: 'reset', - query: 'query', - }, -}; diff --git a/src/locales/lang/en_US/index.ts b/src/locales/lang/en_US/index.ts deleted file mode 100644 index 62d2f7c1..00000000 --- a/src/locales/lang/en_US/index.ts +++ /dev/null @@ -1,54 +0,0 @@ -import merge from 'lodash/merge'; -import componentsLocale from 'tdesign-vue-next/es/locale/en_US'; - -import components from './components'; -import layout from './layout'; -import pages from './pages'; - -export default { - lang: 'English', - layout, - pages, - components, - constants: { - contract: { - name: 'Name', - status: 'Status', - num: 'Number', - type: 'Type', - typePlaceholder: 'Please enter type', - payType: 'Pay Type', - amount: 'Amount', - amountPlaceholder: 'Please enter amount', - signDate: 'Sign Date', - effectiveDate: 'Effective Date', - endDate: 'End Date', - createDate: 'Create Date', - attachment: 'Attachment', - company: 'Company', - employee: 'Employee', - pay: 'pay', - receive: 'received', - remark: 'remark', - statusOptions: { - fail: 'Failure', - auditPending: 'Pending audit', - execPending: 'Pending performance', - executing: 'Successful', - finish: 'Finish', - }, - typeOptions: { - main: 'Master contract', - sub: 'Subcontract', - supplement: 'Supplementary contract', - }, - }, - }, - componentsLocale: merge({}, componentsLocale, { - // 可以在此处定义更多自定义配置,具体可配置内容参看 API 文档 - // https://tdesign.tencent.com/vue-next/config?tab=api - // pagination: { - // jumpTo: 'xxx' - // }, - }), -}; diff --git a/src/locales/lang/en_US/layout.ts b/src/locales/lang/en_US/layout.ts deleted file mode 100644 index 5c4a1d52..00000000 --- a/src/locales/lang/en_US/layout.ts +++ /dev/null @@ -1,54 +0,0 @@ -export default { - header: { - code: 'Code Repository', - help: 'Document', - user: 'Profile', - signOut: 'Sign Out', - setting: 'Setting', - }, - notice: { - title: 'Notification Center', - clear: 'Clear', - setRead: 'Set Read', - empty: 'Empty', - emptyNotice: 'No Notice', - viewAll: 'View All', - }, - tagTabs: { - closeOther: 'close other', - closeLeft: 'close left', - closeRight: 'close right', - refresh: 'refresh', - }, - searchPlaceholder: 'Enter search content', - setting: { - title: 'Setting', - theme: { - mode: 'Theme Mode', - color: 'Theme Color', - options: { - light: 'Light', - dark: 'Dark ', - auto: 'Follow System', - }, - }, - navigationLayout: 'Navigation Layout', - sideMode: 'Side Menu Mode', - splitMenu: 'Split Menu(Only Mix mode)', - fixedSidebar: 'Fixed Sidebar', - element: { - title: 'Element Switch', - showHeader: 'Show Header', - showBreadcrumb: 'Show Breadcrumb', - showFooter: 'Show Footer', - useTagTabs: 'Use Tag Tabs', - menuAutoCollapsed: 'Menu Auto Collapsed', - }, - tips: 'Please copy and manually modify the configuration file: /src/config/style.ts', - copy: { - title: 'Copy', - success: 'copied', - fail: 'fail to copy', - }, - }, -}; diff --git a/src/locales/lang/en_US/pages/dashboard-base.ts b/src/locales/lang/en_US/pages/dashboard-base.ts deleted file mode 100644 index 920c88f1..00000000 --- a/src/locales/lang/en_US/pages/dashboard-base.ts +++ /dev/null @@ -1,62 +0,0 @@ -export default { - outputOverview: { - title: 'In/Out Overview', - subtitle: '(pieces)', - export: 'Export data', - month: { - input: 'Total in store this month', - output: 'Total out store this month', - }, - since: 'Since last week', - }, - rankList: { - title: 'Sales order ranking', - week: 'This week', - month: 'Latest 3 months', - info: 'Detail', - }, - topPanel: { - card1: 'Total Revenue', - card2: 'Total Refund', - card3: 'Active User(s)', - card4: 'Generate Order(s)', - cardTips: 'since last week', - analysis: { - title: 'Analysis Data', - unit: 'ten thousand yuan', - series1: 'this month', - series2: 'last month', - channels: 'Sales Channels', - channel1: 'online', - channel2: 'shop', - channelTips: ' sales ratio', - }, - }, - saleColumns: { - index: 'Ranking', - productName: 'Customer', - growUp: 'Grow up', - count: 'Count', - operation: 'Operation', - }, - buyColumns: { - index: 'Ranking', - productName: 'Supplier', - growUp: 'Grow up', - count: 'Count', - operation: 'Operation', - }, - chart: { - week1: 'MON', - week2: 'TUE', - week3: 'WED', - week4: 'THU', - week5: 'FRI', - week6: 'SAT', - week7: 'SUN', - max: 'Max', - min: 'Min', - thisMonth: 'this month', - lastMonth: 'last month', - }, -}; diff --git a/src/locales/lang/en_US/pages/dashboard-detail.ts b/src/locales/lang/en_US/pages/dashboard-detail.ts deleted file mode 100644 index 2d5a4790..00000000 --- a/src/locales/lang/en_US/pages/dashboard-detail.ts +++ /dev/null @@ -1,45 +0,0 @@ -export default { - topPanel: { - title: 'Purchase applications for this month', - quarter: 'Quarter on quarter', - paneList: { - totalRequest: 'Apply count', - suppliers: 'Number of Suppliers', - productCategory: 'Product Category', - applicant: 'Number of Application', - completionRate: 'Completion Rate(%)', - arrivalRate: 'Arrival Rate(%)', - }, - }, - procurement: { - title: 'Trends in purchase requisitions for goods', - goods: { - cup: 'cup', - tea: 'tea', - honey: 'honey', - flour: 'flour', - coffeeMachine: 'coffee machine', - massageMachine: 'massage machine', - }, - }, - ssl: 'SSL certificate', - sslDescription: - 'SSL certificate, also known as a server certificate, is a digital certificate that authenticates the identity of a website and encrypts information sent to the server using SSL technology. Tencent Cloud provides you with a one-stop service for SSL certificates, including application, management, and deployment of both free and paid certificates.', - satisfaction: { - title: 'distribution of satisfaction levels for purchased goods', - export: 'export data', - }, - chart: { - week1: 'MON', - week2: 'TUE', - week3: 'WED', - week4: 'THU', - week5: 'FRI', - week6: 'SAT', - week7: 'SUN', - max: 'Max', - min: 'Min', - thisMonth: 'this month', - lastMonth: 'last month', - }, -}; diff --git a/src/locales/lang/en_US/pages/detail-base.ts b/src/locales/lang/en_US/pages/detail-base.ts deleted file mode 100644 index d40d1e1f..00000000 --- a/src/locales/lang/en_US/pages/detail-base.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default { - baseInfo: { - title: 'Base Info', - }, - changelog: { - title: 'Changelog', - step1: { - title: 'upload file', - subtitle: 'subtitle', - }, - step2: { - title: 'modify contract amount', - subtitle: 'subtitle', - }, - step3: { - title: 'create contract', - desc: 'administrator', - }, - }, -}; diff --git a/src/locales/lang/en_US/pages/detail-card.ts b/src/locales/lang/en_US/pages/detail-card.ts deleted file mode 100644 index 116a2390..00000000 --- a/src/locales/lang/en_US/pages/detail-card.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - baseInfo: { - title: 'Base Info', - }, - invoice: { - title: 'Invoice Progress', - step1: { - title: 'Apply', - content: 'The electronic invoice has been submitted on December 21st', - }, - step2: { - title: 'Electronic invoice', - content: 'expected to be processed within 1-3 business days.', - }, - step3: { - title: 'Invoice is send', - content: 'we will contact you within 7 business days.', - }, - step4: { - title: 'Finish', - }, - }, - product: { - title: 'Product Category', - add: 'add production', - month: 'month', - quarter: 'quarter', - }, - detail: { - title: 'Product Procurement Detail', - form: { - applyNo: 'Apply no', - product: 'Name', - productNo: 'No.', - department: 'Department', - num: 'Num', - createTime: 'Create time', - operation: 'Operation', - manage: 'manage', - delete: 'delete', - }, - }, -}; diff --git a/src/locales/lang/en_US/pages/detail-deploy.ts b/src/locales/lang/en_US/pages/detail-deploy.ts deleted file mode 100644 index d639b3e1..00000000 --- a/src/locales/lang/en_US/pages/detail-deploy.ts +++ /dev/null @@ -1,32 +0,0 @@ -export default { - deployTrend: { - title: 'Deploy Trend', - warning: 'Warning', - thisMonth: 'this month', - thisWeek: 'this week', - lastMonth: 'last month', - thisYear: 'this year', - lastYear: 'last year', - week1: 'MON', - week2: 'TUE', - week3: 'WED', - week4: 'THU', - week5: 'FRI', - week6: 'SAT', - week7: 'SUN', - }, - projectList: { - title: 'Project List', - dialog: { - title: 'Base Info', - }, - table: { - name: 'Name', - admin: 'Admin', - createTime: 'Create time', - operation: 'Operation', - manage: 'manage', - delete: 'delete', - }, - }, -}; diff --git a/src/locales/lang/en_US/pages/detail-secondary.ts b/src/locales/lang/en_US/pages/detail-secondary.ts deleted file mode 100644 index b6b28b61..00000000 --- a/src/locales/lang/en_US/pages/detail-secondary.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - read: 'Read', - unread: 'Unread', - all: 'All', - setRead: 'set as read', - setUnread: 'set as unread', - delete: 'delete', - empty: 'Empty', -}; diff --git a/src/locales/lang/en_US/pages/form-base.ts b/src/locales/lang/en_US/pages/form-base.ts deleted file mode 100644 index 7a26ce99..00000000 --- a/src/locales/lang/en_US/pages/form-base.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - title: 'Contract Info', - contractName: 'Name', - contractStatus: 'Status', - contractNum: 'Number', - contractType: 'Type', - contractTypePlaceholder: 'Please enter type', - contractPayType: 'Pay Type', - contractAmount: 'Amount', - contractAmountPlaceholder: 'Please enter amount', - contractSignDate: 'Sign Date', - contractEffectiveDate: 'Effective Date', - contractEndDate: 'End Date', - company: 'Company', - employee: 'Employee', - pay: 'pay', - receive: 'received', - upload: 'upload file', - uploadFile: 'upload contract file', - uploadTips: 'Please upload a PDF file, with a size limit of 60MB.', - otherInfo: 'Other Info', - remark: 'Remark', - remarkPlaceholder: 'please enter remark', - notaryPublic: 'Notary Public', - confirm: 'confirm', - cancel: 'cancel', -}; diff --git a/src/locales/lang/en_US/pages/form-step.ts b/src/locales/lang/en_US/pages/form-step.ts deleted file mode 100644 index 3805f125..00000000 --- a/src/locales/lang/en_US/pages/form-step.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default { - step1: { - title: 'Submit Application', - subtitle: 'Submitted on December 21st', - rules: 'rules', - rule1: - '1. After applying for an invoice, the electronic invoice will be issued within 1-3 working days. If the qualification review is passed, the VAT special invoice (paper) will be mailed to you within 10 working days after the electronic invoice is issued;', - rule2: '2. The invoiced amount will be the actual amount you paid;', - rule3: '3. For any questions, please contact us directly at 13300001111.', - contractName: 'Name', - contractTips: 'Please select a contract name', - invoiceType: 'Invoice type', - amount: 'Amount', - submit: 'Submit Application', - }, - step2: { - title: 'Electronic Information', - subtitle: 'Contact Customer Service if you have any questions', - invoiceTitle: 'Invoice Title', - taxNum: 'Tax Num', - address: 'Address', - bank: 'Bank', - bankAccount: 'Bank Account', - email: 'Email', - tel: 'Tel', - invoiceTitlePlaceholder: 'please enter invoice title', - taxNumPlaceholder: 'please enter tax num', - addressPlaceholder: 'please enter address', - bankPlaceholder: 'please enter bank', - bankAccountPlaceholder: 'please enter bank account', - emailPlaceholder: 'please enter email', - telPlaceholder: 'please enter tel', - }, - step3: { - title: 'Invoice Mailed', - subtitle: 'Contact us after the electronic invoice is issued', - consignee: 'Consignee', - mobileNum: 'Mobile Num', - deliveryAddress: 'Address', - fullAddress: 'Full Address', - }, - step4: { - title: 'Application Completed', - subtitle: 'Contact Customer Service if you have any questions', - finishTitle: 'Application is completed.', - finishTips: - 'The electronic invoice is expected to be sent to your email within 1-3 working days. Please be patient for the delivery of the paper invoice.', - reapply: 'reapply', - check: 'check progress', - }, - preStep: 'pre step', - nextStep: 'next step', -}; diff --git a/src/locales/lang/en_US/pages/index.ts b/src/locales/lang/en_US/pages/index.ts deleted file mode 100644 index 47da178b..00000000 --- a/src/locales/lang/en_US/pages/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -import dashboardBase from './dashboard-base'; -import dashboardDetail from './dashboard-detail'; -import detailBase from './detail-base'; -import detailCard from './detail-card'; -import detailDeploy from './detail-deploy'; -import detailSecondary from './detail-secondary'; -import formBase from './form-base'; -import formStep from './form-step'; -import listBase from './list-base'; -import listCard from './list-card'; -import listFilter from './list-filter'; -import listTree from './list-tree'; -import login from './login'; -import result from './result'; -import user from './user'; - -export default { - dashboardBase, - dashboardDetail, - listBase, - listCard, - listFilter, - listTree, - detailBase, - detailCard, - detailDeploy, - detailSecondary, - formBase, - formStep, - user, - login, - result, -}; diff --git a/src/locales/lang/en_US/pages/list-base.ts b/src/locales/lang/en_US/pages/list-base.ts deleted file mode 100644 index c5de9ae4..00000000 --- a/src/locales/lang/en_US/pages/list-base.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - export: 'export', - create: 'create', - select: 'select', - items: 'items', - contractName: 'Name', - contractStatus: 'Status', - contractNum: 'Number', - contractType: 'Type', - contractPayType: 'Pay Type', - contractAmount: 'Amount', - operation: 'Operation', - detail: 'detail', - delete: 'delete', - pay: 'pay', - receive: 'received', - placeholder: 'please enter to search', - contractStatusEnum: { - fail: 'fail', - audit: 'audit', - executing: 'executing', - pending: 'pending', - finish: 'finish', - }, -}; diff --git a/src/locales/lang/en_US/pages/list-card.ts b/src/locales/lang/en_US/pages/list-card.ts deleted file mode 100644 index ac86551f..00000000 --- a/src/locales/lang/en_US/pages/list-card.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - create: 'Create Product', - placeholder: 'please enter to search', - productName: 'Name', - productStatus: 'Status', - productDescription: 'Description', - productType: 'Type', - productRemark: 'Remark', - productStatusEnum: { - off: 'off', - on: 'on', - }, -}; diff --git a/src/locales/lang/en_US/pages/list-filter.ts b/src/locales/lang/en_US/pages/list-filter.ts deleted file mode 100644 index ff8b4c56..00000000 --- a/src/locales/lang/en_US/pages/list-filter.ts +++ /dev/null @@ -1 +0,0 @@ -export default {}; diff --git a/src/locales/lang/en_US/pages/list-tree.ts b/src/locales/lang/en_US/pages/list-tree.ts deleted file mode 100644 index 1186fd64..00000000 --- a/src/locales/lang/en_US/pages/list-tree.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - placeholder: 'please enter to search', -}; diff --git a/src/locales/lang/en_US/pages/login.ts b/src/locales/lang/en_US/pages/login.ts deleted file mode 100644 index d2e62a5c..00000000 --- a/src/locales/lang/en_US/pages/login.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - loginTitle: 'Login in', - noAccount: 'No Account?', - createAccount: 'Create Account', - remember: 'Remember Account', - forget: 'Forget Account', - signIn: 'Sign in', - existAccount: 'Exist Account?', - refresh: 'refresh', - wechatLogin: 'Login with WeChat', - accountLogin: 'Login with Account', - phoneLogin: 'Login with Mobile Phone', - loginSuccess: 'Login successful', - input: { - account: 'please enter account', - password: 'please enter password', - phone: 'please enter phone', - verification: 'please enter verification code', - }, - required: { - account: 'account is required', - phone: 'phone is required', - password: 'password is required', - verification: 'verification code is require', - }, - sendVerification: 'send', -}; diff --git a/src/locales/lang/en_US/pages/result.ts b/src/locales/lang/en_US/pages/result.ts deleted file mode 100644 index df5fb51a..00000000 --- a/src/locales/lang/en_US/pages/result.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 403: { - tips: 'sorry, you don not have permission to access this page. Please contact the creator through WeCom', - back: 'Back to homepage', - }, - 404: { - subtitle: 'Sorry, the page is not found', - back: 'Back to homepage', - }, - 500: { - subtitle: 'Sorry, the server is error', - back: 'Back to homepage', - }, - fail: { - title: 'Create fail', - subtitle: 'Sorry, your project creation has failed', - back: 'Back to homepage', - modify: 'Back to modify', - }, - success: { - title: 'Project is created', - subtitle: 'Contact the person in charge of distributing the application', - back: 'Back to homepage', - progress: 'Check Progress', - }, - maintenance: { - title: 'System maintenance', - subtitle: 'Please try again later', - back: 'Back to homepage', - }, - browserIncompatible: { - title: 'browser is incompatible', - subtitle: 'the browser version you are using is too outdated to open the current webpage.', - back: 'Back to homepage', - recommend: 'TDesign Starter recommend the following browser', - }, - networkError: { - title: 'Network Error', - subtitle: 'Network error, please try again later', - back: 'Back to homepage', - reload: 'Reload', - }, -}; diff --git a/src/locales/lang/en_US/pages/user.ts b/src/locales/lang/en_US/pages/user.ts deleted file mode 100644 index 5c49b18b..00000000 --- a/src/locales/lang/en_US/pages/user.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default { - markDay: 'Good afternoon, today marks your 100th day at Tencent', - personalInfo: { - title: 'Personal Info', - position: 'Employee of the Hong Kong and Macau Business Expansion team', - - desc: { - phone: 'Phone', - mobile: 'Mobile', - seat: 'Seat', - email: 'Email', - position: 'Position', - leader: 'Leader', - entity: 'Entity', - joinDay: 'Day of join', - group: 'Group', - }, - }, - contentList: 'Content List', - visitData: 'Visit Data', - teamMember: 'Team Member', - serviceProduction: 'Service Product', -}; diff --git a/src/locales/lang/zh_CN.json b/src/locales/lang/zh_CN.json new file mode 100644 index 00000000..e89bf7c6 --- /dev/null +++ b/src/locales/lang/zh_CN.json @@ -0,0 +1,754 @@ +{ + "lang": "简体中文", + "common": { + "appName": "TDesign Starter", + "copyright": "Copyright @ 2021-2025 Tencent. All Rights Reserved", + "conjunction": "和", + "admin": "admin" + }, + "components": { + "isSetup": { + "on": "已启用", + "off": "已停用" + }, + "manage": "管理", + "delete": "删除", + "deleteSuccess": "删除成功", + "copySuccess": "复制成功", + "copyFail": "复制失败", + "submitSuccess": "提交成功", + "commonTable": { + "contractName": "合同名称", + "contractNamePlaceholder": "请输入合同名称", + "contractStatus": "合同状态", + "contractStatusPlaceholder": "请输入合同状态", + "contractNum": "合同编号", + "contractNumPlaceholder": "请输入合同编号", + "contractType": "合同类型", + "contractTypePlaceholder": "请选择合同类型", + "contractPayType": "合同支付类型", + "contractAmount": "合同金额", + "operation": "操作", + "detail": "详情", + "delete": "删除", + "placeholder": "请输入内容搜索", + "contractStatusEnum": { + "fail": "审核失败", + "audit": "待审核", + "executing": "履行中", + "pending": "待履行", + "finish": "已完成" + }, + "contractTypeEnum": { + "main": "主合同", + "sub": "子合同", + "supplement": "补充合同" + }, + "reset": "重置", + "query": "查询" + } + }, + "layout": { + "header": { + "code": "代码仓库", + "help": "帮助文档", + "user": "个人中心", + "signOut": "退出登录", + "setting": "系统设置" + }, + "notice": { + "title": "通知中心", + "clear": "清空", + "setRead": "设为已读", + "empty": "空", + "emptyNotice": "暂无通知", + "viewAll": "查看全部" + }, + "searchPlaceholder": "请输入搜索内容", + "search": { + "placeholder": "输入要搜索内容" + }, + "tagTabs": { + "closeOther": "关闭其他", + "closeLeft": "关闭左侧", + "closeRight": "关闭右侧", + "refresh": "刷新" + }, + "setting": { + "title": "页面配置", + "theme": { + "mode": "主题模式", + "color": "主题色", + "options": { + "light": "明亮", + "dark": "深色", + "auto": "跟随系统" + } + }, + "navigationLayout": "导航布局", + "sideMode": "侧边栏模式", + "splitMenu": "分割菜单(混合模式下有效)", + "fixedSidebar": "固定侧边栏", + "element": { + "title": "元素开关", + "showHeader": "显示顶栏", + "showBreadcrumb": "显示面包屑", + "showFooter": "显示页脚", + "useTagTabs": "展示多标签Tab页", + "menuAutoCollapsed": "菜单自动折叠" + }, + "tips": "请复制后手动修改配置文件: /src/config/style.ts", + "copy": { + "title": "复制配置项", + "success": "复制成功", + "fail": "复制失败" + } + } + }, + "constants": { + "contract": { + "name": "合同名称", + "status": "合同状态", + "num": "合同编号", + "type": "合同类型", + "typePlaceholder": "请输入类型", + "payType": "合同收支类型", + "amount": "合同金额", + "amountPlaceholder": "请输入金额", + "signDate": "合同签订日期", + "effectiveDate": "合同生效日期", + "endDate": "合同结束日期", + "createDate": "合同创建时间", + "company": "甲方", + "employee": "乙方", + "pay": "付款", + "receive": "收款", + "remark": "备注", + "attachment": "附件", + "statusOptions": { + "fail": "审核失败", + "auditPending": "待审核", + "execPending": "待履行", + "executing": "审核成功", + "finish": "已完成" + }, + "typeOptions": { + "main": "主合同", + "sub": "子合同", + "supplement": "补充合同" + } + } + }, + "pages": { + "dashboardBase": { + "title": "概览仪表盘", + "outputOverview": { + "title": "出入库概览", + "subtitle": "(件)", + "export": "导出数据", + "month": { + "input": "本月入库总计(件)", + "output": "本月出库总计(件)" + }, + "since": "自从上周以来" + }, + "rankList": { + "title": "销售订单排名", + "week": "本周", + "month": "近三月", + "info": "详情" + }, + "topPanel": { + "card1": "总收入", + "card2": "总退款", + "card3": "活跃用户(个)", + "card4": "产生订单(个)", + "cardTips": "自从上周以来", + "analysis": { + "title": "统计数据", + "unit": "万元", + "series1": "本月", + "series2": "上月", + "channels": "销售渠道", + "channel1": "线上", + "channel2": "门店", + "channelTips": "销售占比" + } + }, + "saleColumns": { + "index": "排名", + "productName": "客户名称", + "growUp": "较上周", + "count": "订单量", + "operation": "操作" + }, + "buyColumns": { + "index": "排名", + "productName": "供应商名称", + "growUp": "较上周", + "count": "订单量", + "operation": "操作" + }, + "saleTend": { + "item1": "国家电网有限公司", + "item2": "深圳燃气集团股份有限公司", + "item3": "国家烟草专卖局", + "item4": "中国电信集团有限公司", + "item5": "中国移动通信集团有限公司", + "item6": "新余市办公用户采购项目" + }, + "buyTend": { + "item1": "腾讯科技(深圳)有限公司", + "item2": "大润发有限公司", + "item3": "四川海底捞股份有限公司", + "item4": "索尼(中国)有限公司", + "item5": "松下电器(中国)有限公司", + "item6": "新余市办公用户采购项目" + }, + "chart": { + "week1": "周一", + "week2": "周二", + "week3": "周三", + "week4": "周四", + "week5": "周五", + "week6": "周六", + "week7": "周日", + "max": "最大值", + "min": "最小值", + "thisMonth": "本月", + "lastMonth": "上月" + } + }, + "dashboardDetail": { + "topPanel": { + "title": "本月采购申请情况", + "quarter": "环比", + "paneList": { + "totalRequest": "总申请数(次)", + "suppliers": "供应商数量(个)", + "productCategory": "采购商品品类(类)", + "applicant": "申请人数量(人)", + "completionRate": "申请完成率(%)", + "arrivalRate": "到货及时率(%)" + } + }, + "procurement": { + "title": "采购商品申请趋势", + "goods": { + "cup": "杯子", + "tea": "茶叶", + "honey": "蜂蜜", + "flour": "面粉", + "coffeeMachine": "咖啡机", + "massageMachine": "按摩仪" + } + }, + "ssl": "SSL证书", + "sslDescription": "SSL证书又叫服务器证书,腾讯云为您提供证书的一站式服务,包括免费、付费证书的申请、管理及部署", + "satisfaction": { + "title": "采购商品满意度分布", + "export": "导出数据" + }, + "chart": { + "week1": "周一", + "week2": "周二", + "week3": "周三", + "week4": "周四", + "week5": "周五", + "week6": "周六", + "week7": "周日", + "max": "最大值", + "min": "最小值", + "thisMonth": "本月", + "lastMonth": "上月" + } + }, + "detailBase": { + "baseInfo": { + "title": "基本信息" + }, + "sampleData": { + "contractName": "总部办公用品采购项目", + "status": "履行中", + "company": "腾讯科技(深圳)有限公司", + "employee": "欧尚", + "fileName": "总部办公用品采购项目合同.pdf" + }, + "changelog": { + "title": "变更记录", + "step1": { + "title": "上传合同附件", + "subtitle": "这里是提示文字" + }, + "step2": { + "title": "修改合同金额", + "subtitle": "这里是提示文字" + }, + "step3": { + "title": "新建合同", + "desc": "管理员-李川操作" + } + } + }, + "detailCard": { + "baseInfo": { + "title": "基本信息" + }, + "invoice": { + "title": "发票进度", + "step1": { + "title": "申请提交", + "content": "已于12月21日提交" + }, + "step2": { + "title": "电子发票", + "content": "预计1~3个工作日" + }, + "step3": { + "title": "发票已邮寄", + "content": "电子发票开出后7个工作日联系" + }, + "step4": { + "title": "完成" + } + }, + "product": { + "title": "产品目录", + "add": "新增产品", + "month": "月份", + "quarter": "季度" + }, + "detail": { + "title": "产品采购明细", + "budgetExceeded": "超预算", + "form": { + "applyNo": "申请号", + "product": "产品名称", + "productNo": "产品编号", + "operation": "操作", + "department": "申请部门", + "num": "采购数量", + "createTime": "创建时间", + "manage": "管理", + "delete": "删除" + } + }, + "products": { + "product1": { + "name": "MacBook Pro 2021", + "company": "苹果公司(Apple Inc. )", + "size": "13.3 英寸", + "cpu": "Apple M1", + "memory": "RAM 16GB", + "info": "最高可选配 16GB 内存 · 最高可选配 2TB 存储设备 电池续航最长达 18 小时" + }, + "product2": { + "name": "Surface Laptop Go", + "company": "微软(Microsoft Corporation)", + "size": "12.4 英寸", + "cpu": "Core i7", + "memory": "RAM 16GB", + "info": "常规使用 Surface,续航时间最长可达13小时 随时伴您工作" + } + } + }, + "detailDeploy": { + "deployTrend": { + "title": "部署趋势", + "warning": "告警情况", + "thisMonth": "本月", + "thisWeek": "本周", + "lastMonth": "上月", + "thisYear": "今年", + "lastYear": "去年", + "week1": "周一", + "week2": "周二", + "week3": "周三", + "week4": "周四", + "week5": "周五", + "week6": "周六", + "week7": "周日" + }, + "projectList": { + "title": "项目列表", + "dialog": { + "title": "基本信息" + }, + "table": { + "name": "名称", + "admin": "管理员", + "createTime": "创建时间", + "operation": "操作", + "manage": "管理", + "delete": "删除" + } + }, + "baseInfo": { + "clusterName": "集群名", + "clusterId": "集群ID", + "status": "状态", + "running": "运行中", + "k8sVersion": "K8S版本", + "config": "配置", + "region": "所在地域", + "guangzhou": "广州", + "project": "新增资源所属项目", + "defaultProject": "默认项目", + "nodeCount": "节点数量", + "nodeNetwork": "节点网络", + "containerNetwork": "容器网络", + "clusterCredential": "集群凭证", + "showCredential": "显示凭证", + "createUpdate": "创建/更新", + "description": "描述" + } + }, + "detailSecondary": { + "read": "已读通知", + "unread": "未读通知", + "all": "全部通知", + "setRead": "设为已读", + "setUnread": "设为未读", + "delete": "删除通知", + "deleteConfirm": "删除通知", + "deleteTip": "确认删除通知:{content}吗?", + "empty": "暂无通知" + }, + "notification": { + "contract": "合同动态", + "invoice": "票务动态", + "meeting": "会议通知", + "msg1": "腾讯大厦一楼改造施工项目 已通过审核!", + "msg2": "三季度生产原材料采购项目 开票成功!", + "msg3": "2021-01-01 10:00的【国家电网线下签约】会议即将开始,请提前10分钟前往 会议室1 进行签到!", + "msg4": "一季度生产原材料采购项目 开票成功!" + }, + "formBase": { + "title": "合同信息", + "contractName": "合同名称", + "contractNamePlaceholder": "请输入合同名称", + "contractStatus": "合同状态", + "contractNum": "合同编号", + "contractType": "合同类型", + "contractTypePlaceholder": "请输入类型", + "contractPayType": "合同收支类型", + "contractAmount": "合同金额", + "contractAmountPlaceholder": "请输入金额", + "contractSignDate": "合同签订日期", + "contractEffectiveDate": "合同生效日期", + "contractEndDate": "合同结束日期", + "company": "甲方", + "employee": "乙方", + "pay": "付款", + "receive": "收款", + "upload": "上传文件", + "uploadFile": "上传合同", + "uploadTips": "请上传pdf文件,大小在60M以内", + "otherInfo": "其他信息", + "remark": "备注", + "remarkPlaceholder": "请输入备注", + "notaryPublic": "公证人", + "fileSizeExceed": "上传文件不能大于60M", + "uploadFail": "上传失败", + "confirm": "确认提交", + "cancel": "取消", + "validation": { + "name": "请输入合同名称", + "type": "请选择合同类型", + "payment": "请选择合同收付类型", + "amount": "请输入合同金额", + "partyA": "请选择甲方", + "partyB": "请选择乙方", + "signDate": "请选择日期", + "startDate": "请选择日期", + "endDate": "请选择日期" + }, + "typeOptions": { + "typeA": "类型A", + "typeB": "类型B", + "typeC": "类型C" + }, + "partyOptions": { + "companyA": "甲方公司", + "companyB": "乙方公司", + "companyC": "丙方公司" + } + }, + "formStep": { + "validation": { + "name": "请选择合同名称", + "type": "请选择类型", + "title": "请输入发票抬头", + "taxNum": "请输入纳税人识别号", + "consignee": "请输入收货人", + "mobileNum": "请输入手机号码", + "deliveryAddress": "请选择收货地址", + "fullAddress": "请输入详细地址" + }, + "options": { + "nameA": "合同A", + "nameB": "合同B", + "nameC": "合同C", + "typeA": "类型A", + "typeB": "类型B", + "typeC": "类型C", + "address1": "广东省深圳市南山区", + "address2": "北京市海淀区", + "address3": "上海市徐汇区", + "address4": "四川省成都市高新区", + "address5": "广东省广州市天河区", + "address6": "陕西省西安市高新区" + }, + "step1": { + "title": "提交申请", + "subtitle": "已于12月21日提交", + "rules": "发票开具规则", + "rule1": "1、申请开票后,电子发票在1~3个工作日内开具;增值税专用发票(纸质)如资质审核通过,将在电子发票开具后10个工作日内为您寄出;", + "rule2": "2、开票金额为您实际支付金额;", + "rule3": "3、如有疑问请直接联系:13300001111。", + "contractName": "合同名称", + "contractTips": "请选择合同名称", + "invoiceType": "发票类型", + "amount": "开票金额", + "submit": "提交申请" + }, + "step2": { + "title": "电子信息", + "subtitle": "如有疑问联系客服", + "invoiceTitle": "发票抬头", + "taxNum": "纳税人识别号", + "address": "地址", + "bank": "开户行", + "bankAccount": "银行账号", + "email": "邮箱", + "tel": "手机号", + "titlePlaceholder": "请输入电子信息", + "subtitlePlaceholder": "请输入如有疑问联系客服", + "invoiceTitlePlaceholder": "请输入发票抬头", + "taxNumPlaceholder": "请输入纳税人识别号", + "addressPlaceholder": "请输入地址", + "bankPlaceholder": "请输入开户行", + "bankAccountPlaceholder": "请输入银行账号", + "emailPlaceholder": "请输入邮箱", + "telPlaceholder": "请输入手机号" + }, + "step3": { + "title": "发票已邮寄", + "subtitle": "电子发票开出后联系", + "consignee": "收货人", + "mobileNum": "手机号码", + "deliveryAddress": "收货地址", + "fullAddress": "详细地址" + }, + "step4": { + "title": "完成申请", + "subtitle": "如有疑问联系客服", + "finishTitle": "完成开票申请", + "finishTips": "预计1~3个工作日会将电子发票发至邮箱,发票邮寄请耐心等待", + "reapply": "再次申请", + "check": "查看进度" + }, + "preStep": "上一步", + "nextStep": "下一步" + }, + "listBase": { + "export": "导出合同", + "create": "新建合同", + "select": "已选", + "items": "项", + "contractName": "合同名称", + "contractStatus": "合同状态", + "contractNum": "合同编号", + "contractType": "合同类型", + "contractPayType": "合同收支类型", + "contractAmount": "合同金额", + "operation": "操作", + "detail": "详情", + "delete": "删除", + "pay": "付款", + "receive": "收款", + "placeholder": "请输入内容搜索", + "deleteConfirm": "确认删除当前所选合同?", + "deleteTip": "删除后,{name}的所有合同信息将被清空,且无法恢复", + "contractStatusEnum": { + "fail": "审核失败", + "audit": "待审核", + "executing": "履行中", + "pending": "待履行", + "finish": "已完成" + } + }, + "listCard": { + "create": "新建产品", + "placeholder": "请输入内容搜索", + "loading": "加载数据中...", + "deleteConfirm": "确认删除所选产品?", + "deleteSuccess": "删除成功", + "deleteTip": "确认删除后{name}的所有产品信息将被清空, 且无法恢复", + "productName": "产品名称", + "productStatus": "产品状态", + "productDescription": "产品描述", + "productType": "产品类型", + "productRemark": "备注", + "productStatusEnum": { + "off": "停用", + "on": "启用" + }, + "dialogForm": { + "productNamePlaceholder": "请输入产品名称", + "cancel": "取消", + "confirm": "确定", + "typeGateway": "网关", + "typeAI": "人工智能", + "typeCVM": "CVM", + "validation": { + "productName": "请输入产品名称" + } + } + }, + "listFilter": {}, + "listTree": { + "placeholder": "请输入内容进行搜索", + "treeData": { + "shenzhen": "深圳总部", + "beijing": "北京总部", + "shanghai": "上海总部", + "hunan": "湖南", + "hubei": "湖北", + "generalOffice": "总办", + "marketing": "市场部", + "technology": "技术部", + "finance": "财务部", + "purchase1": "采购1组", + "purchase2": "采购2组", + "finance1": "财务1组", + "finance2": "财务2组" + } + }, + "login": { + "loginTitle": "登录到", + "noAccount": "没有账号吗?", + "existAccount": "已有账号?", + "createAccount": "注册新账号", + "remember": "记住账号", + "forget": "忘记账号", + "signIn": "登录", + "register": "注册", + "refresh": "刷新", + "wechatLogin": "使用微信扫一扫登录", + "accountLogin": "使用账号登录", + "phoneLogin": "使用手机号登录", + "loginSuccess": "登录成功", + "countdown": "{count}秒后可重发", + "input": { + "account": "请输入账号", + "password": "请输入登录密码", + "phone": "请输入手机号", + "verification": "请输入验证码" + }, + "required": { + "account": "账号必填", + "phone": "手机号必填", + "password": "密码必填", + "verification": "验证码必填" + }, + "sendVerification": "发送验证码", + "register": { + "phonePlaceholder": "请输入您的手机号", + "emailPlaceholder": "请输入您的邮箱", + "passwordPlaceholder": "请输入登录密码", + "verifyCodePlaceholder": "请输入验证码", + "sendVerifyCode": "发送验证码", + "resendCountdown": "{count}秒后可重发", + "agreeTerms": "我已阅读并同意", + "serviceTerms": "TDesign服务协议", + "privacyStatement": "TDesign 隐私声明", + "registerBtn": "注册", + "useEmailRegister": "使用邮箱注册", + "usePhoneRegister": "使用手机号注册", + "validation": { + "phone": "手机号必填", + "email": "邮箱必填", + "emailFormat": "请输入正确的邮箱", + "password": "密码必填", + "verifyCode": "验证码必填", + "agreeTerms": "请同意TDesign服务协议和TDesign 隐私声明" + }, + "messages": { + "registerSuccess": "注册成功" + } + } + }, + "result": { + "403": { + "tips": "抱歉,您无权限访问此页面,企业微信联系创建者", + "back": "返回首页" + }, + "404": { + "subtitle": "抱歉,您访问的页面不存在", + "back": "返回首页" + }, + "500": { + "subtitle": "抱歉,服务器出错啦", + "back": "返回首页" + }, + "fail": { + "title": "创建失败", + "subtitle": "抱歉,您的项目创建失败,企业微信联系检查创建者权限,或返回修改。", + "back": "回到首页", + "modify": "返回修改" + }, + "success": { + "title": "项目已创建成功", + "subtitle": "可以联系负责人分发应用", + "back": "回到首页", + "progress": "查看进度" + }, + "maintenance": { + "title": "系统维护中", + "subtitle": "系统维护中,请稍后再试", + "back": "回到首页" + }, + "browserIncompatible": { + "title": "浏览器不兼容", + "subtitle": "抱歉,您正在使用的浏览器版本过低,无法打开当前网页。", + "back": "回到首页", + "recommend": "TDesign Starter 推荐以下主流浏览器" + }, + "networkError": { + "title": "网络异常", + "subtitle": "网络异常, 请稍后重试", + "back": "回到首页", + "reload": "重新加载" + } + }, + "user": { + "markDay": "下午好,今天是你加入鹅厂的第 100 天", + "greeting": "Hi,Image", + "unit": "(次)", + "account": "My Account", + "organization": "腾讯/腾讯公司/某事业群/某产品部/某运营中心/商户服务组", + "personalInfo": { + "title": "个人信息", + "position": "港澳业务拓展组员工 直客销售 ", + "desc": { + "phone": "座机", + "mobile": "手机", + "seat": "座位", + "email": "邮箱", + "position": "职位", + "leader": "上级", + "entity": "主体", + "joinDay": "入职时间", + "group": "所属团队" + }, + "tencentGroup": "腾讯集团", + "seniorDesigner": "高级 UI 设计师" + }, + "visitData": "首页访问数据", + "contentList": "内容列表", + "teamMember": "团队成员", + "serviceProduction": "服务产品" + } + } +} diff --git a/src/locales/lang/zh_CN/components.ts b/src/locales/lang/zh_CN/components.ts deleted file mode 100644 index ffdf9183..00000000 --- a/src/locales/lang/zh_CN/components.ts +++ /dev/null @@ -1,38 +0,0 @@ -export default { - isSetup: { - on: '已启用', - off: '已停用', - }, - manage: '管理', - delete: '删除', - commonTable: { - contractName: '合同名称', - contractNamePlaceholder: '请输入合同名称', - contractStatus: '合同状态', - contractStatusPlaceholder: '请输入合同状态', - contractNum: '合同编号', - contractNumPlaceholder: '请输入合同编号', - contractType: '合同类型', - contractTypePlaceholder: '请选择合同类型', - contractPayType: '合同支付类型', - contractAmount: '合同金额', - operation: '操作', - detail: '详情', - delete: '删除', - placeholder: '请输入内容搜索', - contractStatusEnum: { - fail: '审核失败', - audit: '待审核', - executing: '履行中', - pending: '待履行', - finish: '已完成', - }, - contractTypeEnum: { - main: '主合同', - sub: '子合同', - supplement: '补充合同', - }, - reset: '重置', - query: '查询', - }, -}; diff --git a/src/locales/lang/zh_CN/index.ts b/src/locales/lang/zh_CN/index.ts deleted file mode 100644 index f27b2dc8..00000000 --- a/src/locales/lang/zh_CN/index.ts +++ /dev/null @@ -1,47 +0,0 @@ -import componentsLocale from 'tdesign-vue-next/es/locale/zh_CN'; - -import components from './components'; -import layout from './layout'; -import pages from './pages'; - -export default { - lang: '简体中文', - layout, - pages, - components, - constants: { - contract: { - name: '合同名称', - status: '合同状态', - num: '合同编号', - type: '合同类型', - typePlaceholder: '请输入类型', - payType: '合同收支类型', - amount: '合同金额', - amountPlaceholder: '请输入金额', - signDate: '合同签订日期', - effectiveDate: '合同生效日期', - endDate: '合同结束日期', - createDate: '合同创建时间', - company: '甲方', - employee: '乙方', - pay: '付款', - receive: '收款', - remark: '备注', - attachment: '附件', - statusOptions: { - fail: '审核失败', - auditPending: '待审核', - execPending: '待履行', - executing: '审核成功', - finish: '已完成', - }, - typeOptions: { - main: '主合同', - sub: '子合同', - supplement: '补充合同', - }, - }, - }, - componentsLocale, -}; diff --git a/src/locales/lang/zh_CN/layout.ts b/src/locales/lang/zh_CN/layout.ts deleted file mode 100644 index 5c9aca47..00000000 --- a/src/locales/lang/zh_CN/layout.ts +++ /dev/null @@ -1,54 +0,0 @@ -export default { - header: { - code: '代码仓库', - help: '帮助文档', - user: '个人中心', - signOut: '退出登录', - setting: '系统设置', - }, - notice: { - title: '通知中心', - clear: '清空', - setRead: '设为已读', - empty: '空', - emptyNotice: '暂无通知', - viewAll: '查看全部', - }, - searchPlaceholder: '请输入搜索内容', - tagTabs: { - closeOther: '关闭其他', - closeLeft: '关闭左侧', - closeRight: '关闭右侧', - refresh: '刷新', - }, - setting: { - title: '页面配置', - theme: { - mode: '主题模式', - color: '主题色', - options: { - light: '明亮', - dark: '深色', - auto: '跟随系统', - }, - }, - navigationLayout: '导航布局', - sideMode: '侧边栏模式', - splitMenu: '分割菜单(混合模式下有效)', - fixedSidebar: '固定侧边栏', - element: { - title: '元素开关', - showHeader: '显示顶栏', - showBreadcrumb: '显示面包屑', - showFooter: '显示页脚', - useTagTabs: '展示多标签Tab页', - menuAutoCollapsed: '菜单自动折叠', - }, - tips: '请复制后手动修改配置文件: /src/config/style.ts', - copy: { - title: '复制配置项', - success: '复制成功', - fail: '复制失败', - }, - }, -}; diff --git a/src/locales/lang/zh_CN/pages/dashboard-base.ts b/src/locales/lang/zh_CN/pages/dashboard-base.ts deleted file mode 100644 index 64cf01b6..00000000 --- a/src/locales/lang/zh_CN/pages/dashboard-base.ts +++ /dev/null @@ -1,63 +0,0 @@ -export default { - title: '概览仪表盘', - outputOverview: { - title: '出入库概览', - subtitle: '(件)', - export: '导出数据', - month: { - input: '本月入库总计(件)', - output: '本月出库总计(件)', - }, - since: '自从上周以来', - }, - rankList: { - title: '销售订单排名', - week: '本周', - month: '近三月', - info: '详情', - }, - topPanel: { - card1: '总收入', - card2: '总退款', - card3: '活跃用户(个)', - card4: '产生订单(个)', - cardTips: '自从上周以来', - analysis: { - title: '统计数据', - unit: '万元', - series1: '本月', - series2: '上月', - channels: '销售渠道', - channel1: '线上', - channel2: '门店', - channelTips: '销售占比', - }, - }, - saleColumns: { - index: '排名', - productName: '客户名称', - growUp: '较上周', - count: '订单量', - operation: '操作', - }, - buyColumns: { - index: '排名', - productName: '供应商名称', - growUp: '较上周', - count: '订单量', - operation: '操作', - }, - chart: { - week1: '周一', - week2: '周二', - week3: '周三', - week4: '周四', - week5: '周五', - week6: '周六', - week7: '周日', - max: '最大值', - min: '最小值', - thisMonth: '本月', - lastMonth: '上月', - }, -}; diff --git a/src/locales/lang/zh_CN/pages/dashboard-detail.ts b/src/locales/lang/zh_CN/pages/dashboard-detail.ts deleted file mode 100644 index 5e47ad81..00000000 --- a/src/locales/lang/zh_CN/pages/dashboard-detail.ts +++ /dev/null @@ -1,44 +0,0 @@ -export default { - topPanel: { - title: '本月采购申请情况', - quarter: '环比', - paneList: { - totalRequest: '总申请数(次)', - suppliers: '供应商数量(个)', - productCategory: '采购商品品类(类)', - applicant: '申请人数量(人)', - completionRate: '申请完成率(%)', - arrivalRate: '到货及时率(%)', - }, - }, - procurement: { - title: '采购商品申请趋势', - goods: { - cup: '杯子', - tea: '茶叶', - honey: '蜂蜜', - flour: '面粉', - coffeeMachine: '咖啡机', - massageMachine: '按摩仪', - }, - }, - ssl: 'SSL证书', - sslDescription: 'SSL证书又叫服务器证书,腾讯云为您提供证书的一站式服务,包括免费、付费证书的申请、管理及部署', - satisfaction: { - title: '采购商品满意度分布', - export: '导出数据', - }, - chart: { - week1: '周一', - week2: '周二', - week3: '周三', - week4: '周四', - week5: '周五', - week6: '周六', - week7: '周日', - max: '最大值', - min: '最小值', - thisMonth: '本月', - lastMonth: '上月', - }, -}; diff --git a/src/locales/lang/zh_CN/pages/detail-base.ts b/src/locales/lang/zh_CN/pages/detail-base.ts deleted file mode 100644 index 65ed5cd2..00000000 --- a/src/locales/lang/zh_CN/pages/detail-base.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default { - baseInfo: { - title: '基本信息', - }, - changelog: { - title: '变更记录', - step1: { - title: '上传合同附件', - subtitle: '这里是提示文字', - }, - step2: { - title: '修改合同金额', - subtitle: '这里是提示文字', - }, - step3: { - title: '新建合同', - desc: '管理员-李川操作', - }, - }, -}; diff --git a/src/locales/lang/zh_CN/pages/detail-card.ts b/src/locales/lang/zh_CN/pages/detail-card.ts deleted file mode 100644 index 88f81ce7..00000000 --- a/src/locales/lang/zh_CN/pages/detail-card.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - baseInfo: { - title: '基本信息', - }, - invoice: { - title: '发票进度', - step1: { - title: '申请提交', - content: '已于12月21日提交', - }, - step2: { - title: '电子发票', - content: '预计1~3个工作日', - }, - step3: { - title: '发票已邮寄', - content: '电子发票开出后7个工作日联系', - }, - step4: { - title: '完成', - }, - }, - product: { - title: '产品目录', - add: '新增产品', - month: '月份', - quarter: '季度', - }, - detail: { - title: '产品采购明细', - form: { - applyNo: '申请号', - product: '产品名称', - productNo: '产品编号', - operation: '操作', - department: '申请部门', - num: '采购数量', - createTime: '创建时间', - manage: '管理', - delete: '删除', - }, - }, -}; diff --git a/src/locales/lang/zh_CN/pages/detail-deploy.ts b/src/locales/lang/zh_CN/pages/detail-deploy.ts deleted file mode 100644 index 12fc15a8..00000000 --- a/src/locales/lang/zh_CN/pages/detail-deploy.ts +++ /dev/null @@ -1,32 +0,0 @@ -export default { - deployTrend: { - title: '部署趋势', - warning: '告警情况', - thisMonth: '本月', - thisWeek: '本周', - lastMonth: '上月', - thisYear: '今年', - lastYear: '去年', - week1: '周一', - week2: '周二', - week3: '周三', - week4: '周四', - week5: '周五', - week6: '周六', - week7: '周日', - }, - projectList: { - title: '项目列表', - dialog: { - title: '基本信息', - }, - table: { - name: '名称', - admin: '管理员', - createTime: '创建时间', - operation: '操作', - manage: '管理', - delete: '删除', - }, - }, -}; diff --git a/src/locales/lang/zh_CN/pages/detail-secondary.ts b/src/locales/lang/zh_CN/pages/detail-secondary.ts deleted file mode 100644 index c66270d1..00000000 --- a/src/locales/lang/zh_CN/pages/detail-secondary.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default { - read: '已读通知', - unread: '未读通知', - all: '全部通知', - setRead: '设为已读', - setUnread: '设为未读', - delete: '删除通知', - empty: '暂无通知', -}; diff --git a/src/locales/lang/zh_CN/pages/form-base.ts b/src/locales/lang/zh_CN/pages/form-base.ts deleted file mode 100644 index 1b119f85..00000000 --- a/src/locales/lang/zh_CN/pages/form-base.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default { - title: '合同信息', - contractName: '合同名称', - contractStatus: '合同状态', - contractNum: '合同编号', - contractType: '合同类型', - contractTypePlaceholder: '请输入类型', - contractPayType: '合同收支类型', - contractAmount: '合同金额', - contractAmountPlaceholder: '请输入金额', - contractSignDate: '合同签订日期', - contractEffectiveDate: '合同生效日期', - contractEndDate: '合同结束日期', - company: '甲方', - employee: '乙方', - pay: '付款', - receive: '收款', - upload: '上传文件', - uploadFile: '上传合同', - uploadTips: '请上传pdf文件,大小在60M以内', - otherInfo: '其他信息', - remark: '备注', - remarkPlaceholder: '请输入备注', - notaryPublic: '公证人', - confirm: '确认提交', - cancel: '取消', -}; diff --git a/src/locales/lang/zh_CN/pages/form-step.ts b/src/locales/lang/zh_CN/pages/form-step.ts deleted file mode 100644 index bad33a9c..00000000 --- a/src/locales/lang/zh_CN/pages/form-step.ts +++ /dev/null @@ -1,54 +0,0 @@ -export default { - step1: { - title: '提交申请', - subtitle: '已于12月21日提交', - rules: '发票开具规则', - rule1: - '1、申请开票后,电子发票在1~3个工作日内开具;增值税专用发票(纸质)如资质审核通过,将在电子发票开具后10个工作日内为您寄出;', - rule2: '2、开票金额为您实际支付金额;', - rule3: '3、如有疑问请直接联系:13300001111。', - contractName: '合同名称', - contractTips: '请选择合同名称', - invoiceType: '发票类型', - amount: '开票金额', - submit: '提交申请', - }, - step2: { - title: '电子信息', - subtitle: '如有疑问联系客服', - invoiceTitle: '发票抬头', - taxNum: '纳税人识别号', - address: '地址', - bank: '开户行', - bankAccount: '银行账号', - email: '邮箱', - tel: '手机号', - titlePlaceholder: '请输入电子信息', - subtitlePlaceholder: '请输入如有疑问联系客服', - invoiceTitlePlaceholder: '请输入发票抬头', - taxNumPlaceholder: '请输入纳税人识别号', - addressPlaceholder: '请输入地址', - bankPlaceholder: '请输入开户行', - bankAccountPlaceholder: '请输入银行账号', - emailPlaceholder: '请输入邮箱', - telPlaceholder: '请输入手机号', - }, - step3: { - title: '发票已邮寄', - subtitle: '电子发票开出后联系', - consignee: '收货人', - mobileNum: '手机号码', - deliveryAddress: '收货地址', - fullAddress: '详细地址', - }, - step4: { - title: '完成申请', - subtitle: '如有疑问联系客服', - finishTitle: '完成开票申请', - finishTips: '预计1~3个工作日会将电子发票发至邮箱,发票邮寄请耐心等待', - reapply: '再次申请', - check: '查看进度', - }, - preStep: '上一步', - nextStep: '下一步', -}; diff --git a/src/locales/lang/zh_CN/pages/index.ts b/src/locales/lang/zh_CN/pages/index.ts deleted file mode 100644 index 47da178b..00000000 --- a/src/locales/lang/zh_CN/pages/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -import dashboardBase from './dashboard-base'; -import dashboardDetail from './dashboard-detail'; -import detailBase from './detail-base'; -import detailCard from './detail-card'; -import detailDeploy from './detail-deploy'; -import detailSecondary from './detail-secondary'; -import formBase from './form-base'; -import formStep from './form-step'; -import listBase from './list-base'; -import listCard from './list-card'; -import listFilter from './list-filter'; -import listTree from './list-tree'; -import login from './login'; -import result from './result'; -import user from './user'; - -export default { - dashboardBase, - dashboardDetail, - listBase, - listCard, - listFilter, - listTree, - detailBase, - detailCard, - detailDeploy, - detailSecondary, - formBase, - formStep, - user, - login, - result, -}; diff --git a/src/locales/lang/zh_CN/pages/list-base.ts b/src/locales/lang/zh_CN/pages/list-base.ts deleted file mode 100644 index 5a96799d..00000000 --- a/src/locales/lang/zh_CN/pages/list-base.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default { - export: '导出合同', - create: '新建合同', - select: '已选', - items: '项', - contractName: '合同名称', - contractStatus: '合同状态', - contractNum: '合同编号', - contractType: '合同类型', - contractPayType: '合同收支类型', - contractAmount: '合同金额', - operation: '操作', - detail: '详情', - delete: '删除', - pay: '付款', - receive: '收款', - placeholder: '请输入内容搜索', - contractStatusEnum: { - fail: '审核失败', - audit: '待审核', - executing: '履行中', - pending: '待履行', - finish: '已完成', - }, -}; diff --git a/src/locales/lang/zh_CN/pages/list-card.ts b/src/locales/lang/zh_CN/pages/list-card.ts deleted file mode 100644 index 38323f18..00000000 --- a/src/locales/lang/zh_CN/pages/list-card.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - create: '新建产品', - placeholder: '请输入内容搜索', - productName: '产品名称', - productStatus: '产品状态', - productDescription: '产品描述', - productType: '产品类型', - productRemark: '备注', - productStatusEnum: { - off: '停用', - on: '启用', - }, -}; diff --git a/src/locales/lang/zh_CN/pages/list-filter.ts b/src/locales/lang/zh_CN/pages/list-filter.ts deleted file mode 100644 index ff8b4c56..00000000 --- a/src/locales/lang/zh_CN/pages/list-filter.ts +++ /dev/null @@ -1 +0,0 @@ -export default {}; diff --git a/src/locales/lang/zh_CN/pages/list-tree.ts b/src/locales/lang/zh_CN/pages/list-tree.ts deleted file mode 100644 index c7d68a7d..00000000 --- a/src/locales/lang/zh_CN/pages/list-tree.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - placeholder: '请输入内容进行搜索', -}; diff --git a/src/locales/lang/zh_CN/pages/login.ts b/src/locales/lang/zh_CN/pages/login.ts deleted file mode 100644 index 962f973d..00000000 --- a/src/locales/lang/zh_CN/pages/login.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default { - loginTitle: '登录到', - noAccount: '没有账号吗?', - existAccount: '已有账号?', - createAccount: '注册新账号', - remember: '记住账号', - forget: '忘记账号', - signIn: '登录', - register: '注册', - refresh: '刷新', - wechatLogin: '使用微信扫一扫登录', - accountLogin: '使用账号登录', - phoneLogin: '使用手机号登录', - loginSuccess: '登录成功', - input: { - account: '请输入账号', - password: '请输入登录密码', - phone: '请输入手机号', - verification: '请输入验证码', - }, - required: { - account: '账号必填', - phone: '手机号必填', - password: '密码必填', - verification: '验证码必填', - }, - sendVerification: '发送验证码', -}; diff --git a/src/locales/lang/zh_CN/pages/result.ts b/src/locales/lang/zh_CN/pages/result.ts deleted file mode 100644 index e00487c8..00000000 --- a/src/locales/lang/zh_CN/pages/result.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default { - 403: { - tips: '抱歉,您无权限访问此页面,企业微信联系创建者', - back: '返回首页', - }, - 404: { - subtitle: '抱歉,您访问的页面不存在', - back: '返回首页', - }, - 500: { - subtitle: '抱歉,服务器出错啦', - back: '返回首页', - }, - fail: { - title: '创建失败', - subtitle: '抱歉,您的项目创建失败,企业微信联系检查创建者权限,或返回修改。', - back: '回到首页', - modify: '返回修改', - }, - success: { - title: '项目已创建成功', - subtitle: '可以联系负责人分发应用', - back: '回到首页', - progress: '查看进度', - }, - maintenance: { - title: '系统维护中', - subtitle: '系统维护中,请稍后再试', - back: '回到首页', - }, - browserIncompatible: { - title: '浏览器不兼容', - subtitle: '抱歉,您正在使用的浏览器版本过低,无法打开当前网页。', - back: '回到首页', - recommend: 'TDesign Starter 推荐以下主流浏览器', - }, - networkError: { - title: '网络异常', - subtitle: '网络异常, 请稍后重试', - back: '回到首页', - reload: '重新加载', - }, -}; diff --git a/src/locales/lang/zh_CN/pages/user.ts b/src/locales/lang/zh_CN/pages/user.ts deleted file mode 100644 index c1a8b2f9..00000000 --- a/src/locales/lang/zh_CN/pages/user.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - markDay: '下午好,今天是你加入鹅厂的第 100 天', - personalInfo: { - title: '个人信息', - position: '港澳业务拓展组员工 直客销售 ', - desc: { - phone: '座机', - mobile: '手机', - seat: '座位', - email: '邮箱', - position: '职位', - leader: '上级', - entity: '主体', - joinDay: '入职时间', - group: '所属团队', - }, - }, - visitData: '首页访问数据', - contentList: '内容列表', - teamMember: '团队成员', - serviceProduction: '服务产品', -}; diff --git a/src/locales/useLocale.ts b/src/locales/useLocale.ts index 7bf7d46f..2b0b1c56 100644 --- a/src/locales/useLocale.ts +++ b/src/locales/useLocale.ts @@ -1,21 +1,27 @@ import { useLocalStorage } from '@vueuse/core'; import type { GlobalConfigProvider } from 'tdesign-vue-next'; import { computed } from 'vue'; -import { useI18n } from 'vue-i18n'; -import { i18n, langCode, localeConfigKey } from '@/locales/index'; +import type { SupportedLocale } from '@/locales/index'; +import { i18n, localeConfigKey, supportedLocales } from '@/locales/index'; +import { useNotificationStore } from '@/store/modules/notification'; export function useLocale() { - const { locale } = useI18n({ useScope: 'global' }); - function changeLocale(lang: string) { - // 如果切换的语言不在对应语言文件里则默认为简体中文 - if (!langCode.includes(lang)) { - lang = 'zh_CN'; - } + const locale = computed({ + get: () => i18n.global.locale.value, + set: (val: string) => { + i18n.global.locale.value = val; + }, + }); + const storedLocale = useLocalStorage(localeConfigKey, 'zh_CN'); - locale.value = lang; - useLocalStorage(localeConfigKey, 'zh_CN').value = lang; - } + const changeLocale = (lang: string) => { + const validLang = supportedLocales.includes(lang as SupportedLocale) ? (lang as SupportedLocale) : 'zh_CN'; + locale.value = validLang; + storedLocale.value = validLang; + // 刷新持久化的翻译数据 + useNotificationStore().refreshMsgData(); + }; const getComponentsLocale = computed(() => { return i18n.global.getLocaleMessage(locale.value).componentsLocale as GlobalConfigProvider; diff --git a/src/pages/dashboard/base/components/RankList.vue b/src/pages/dashboard/base/components/RankList.vue index 53adf2c6..a1c5a2f0 100644 --- a/src/pages/dashboard/base/components/RankList.vue +++ b/src/pages/dashboard/base/components/RankList.vue @@ -8,7 +8,7 @@ {{ t('pages.dashboardBase.rankList.month') }} - + - +