-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add example * feat: translate api * feat: complementary examples * feat: edit api types * refactor: translate * feat: add example * chore: gitignore * feat: edit api&readme&test
- Loading branch information
Showing
28 changed files
with
1,335 additions
and
638 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ node_modules | |
dist | ||
lib | ||
temp | ||
example/auto-command/localesDir | ||
example/auto-command/localesFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import menu from './zh-CN/menu'; | ||
import pages from './zh-CN/pages'; | ||
import other from './zh-CN/other'; | ||
|
||
export default { | ||
...menu, | ||
...pages, | ||
...other, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default { | ||
'menu.login': '登录', | ||
'menu.welcome': '欢迎页面', | ||
'menu.setting': '设置', | ||
'menu.analysis': '图标统计', | ||
'menu.data-base': '基础数据', | ||
'menu.data-date': '日期数据', | ||
'menu.account.logout': '退出登录', | ||
'menu.account.userName': '访客', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export default { | ||
'app.copyright.produced': '道源1035', | ||
'app.connection': '有建议可以联系:微信:DaoYuan1035、邮箱:[email protected]', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
export default { | ||
'pages.layouts.userLayout.title': '时间管理系统', | ||
'pages.layouts.userLayout.subTitle': '更好的统计你的时间去向', | ||
'pages.login.accountLogin.tab': '关注公众号登录', | ||
'pages.login.accountLogin.errorMessage': '错误的验证码', | ||
'pages.login.weixin.tips': '关注公众号登录,回复”验证码“获得', | ||
'pages.login.failure': '登录失败,请重试!', | ||
'pages.login.success': '登录成功!', | ||
'pages.login.captcha.placeholder': '请输入验证码!', | ||
'pages.login.captcha.required': '验证码是必填项!', | ||
'pages.login.submit': '登录', | ||
'pages.table.columns.1': '路径', | ||
'pages.table.columns.2': '开始时间', | ||
'pages.table.columns.3': '结束时间', | ||
'pages.table.columns.4': '大小', | ||
'pages.table.columns.5': '名称', | ||
'pages.table.columns.6': '操作', | ||
'pages.table.columns.7': '标签分组', | ||
'pages.table.columns.8': '索引', | ||
'pages.table.columns.9': '标签', | ||
'pages.table.columns.10': '持续时间', | ||
'pages.table.columns.11': '备注', | ||
'pages.table.columns.12': '日期', | ||
'pages.table.columns.13': '第几周', | ||
'pages.table.columns.14': '记录时间', | ||
'pages.table.columns.15': '未记录时间', | ||
'pages.table.columns.16': '年份', | ||
'pages.table.columns.17': '月份', | ||
'pages.table.operation.1': '删除', | ||
'pages.table.operation.2': '编辑', | ||
'pages.table.other.1': '导入数据', | ||
'pages.table.other.2': '自动获取类型', | ||
'pages.table.other.3': '数据表格', | ||
'pages.table.other.4': '导出配置', | ||
'pages.table.other.5': '导入配置', | ||
'pages.setting.1': '导入导出', | ||
'pages.setting.2': '设置相关', | ||
'pages.setting.3': '类型', | ||
'pages.analysis.1': '卡片动态配置', | ||
'pages.analysis.2': '图标动态配置', | ||
'pages.analysis.3': '记录天数', | ||
'pages.analysis.4': '天', | ||
'pages.analysis.5': '记录时间', | ||
'pages.analysis.6': '最近一周', | ||
'pages.analysis.7': '占比', | ||
'pages.analysis.8': '总计', | ||
'pages.analysis.9': '总', | ||
'pages.analysis.10': '最近一月', | ||
'pages.analysis.11': '最近一年', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default { | ||
'menu.login': '登录', | ||
'menu.welcome': '欢迎页面', | ||
'menu.setting': '设置', | ||
'menu.analysis': '图标统计', | ||
'menu.data-base': '基础数据', | ||
'menu.data-date': '日期数据', | ||
'menu.account.logout': '退出登录', | ||
'menu.account.userName': '访客', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"private": true, | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "esno ./test.ts" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { defineConfig } from '@/packages/auto-command/src'; | ||
import translate from '@/packages/auto-command/src/translate'; | ||
|
||
const config1 = defineConfig({ | ||
translate: { | ||
translatorType: 'youdao', | ||
// 分隔符号(可选):默认为-,如果你的文件名不是以-分割的话需要配置 | ||
separator: '-', | ||
// 是否保持以前的翻译不变(可选),默认关闭 | ||
keep: false, | ||
// 类型(可选):默认为目录 | ||
type: 'dir', | ||
// 路径(必填):locales文件的绝对路径 | ||
outDir: '/Users/shawdanon/GitHub/minehttp/txp/example/auto-command/localesDir', | ||
// 语言转换(可选):默认从中文转英文 | ||
language: { | ||
from: 'zh-CN', | ||
to: ['en-US'], | ||
}, | ||
}, | ||
}); | ||
const config2 = defineConfig({ | ||
translate: { | ||
google: { proxy: { host: '1', port: 123 } }, | ||
youdao: { key: '12', secret: '123' }, | ||
translatorType: 'youdao', | ||
language: { | ||
from: 'zh-CN', | ||
to: ['en-US'], | ||
}, | ||
type: 'file', | ||
outDir: '/Users/shawdanon/GitHub/minehttp/txp/example/auto-command/localesFile', | ||
}, | ||
}); | ||
const config3 = defineConfig({ | ||
translate: { | ||
outDir: '/Users/shawdanon/GitHub/minehttp/txp/example/auto-command/localesDir', | ||
}, | ||
}); | ||
// 测试目录情况 | ||
// translate(config1.translate); | ||
// 测试文件情况 | ||
translate(config3.translate); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.