Skip to content

Commit

Permalink
feat: add new translations
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmo-ds committed Dec 13, 2023
1 parent f2cdbb1 commit 83f5c36
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
39 changes: 37 additions & 2 deletions localization/zh-hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"You are running the latest version of the Creator Companion": "您正在运行 Creator Companion 的最新版本",
"Installed Repositories": "已安装的储存库",
"Community Repositories": "社区储存库",
"The Creator Companion includes VRChat's official and curated repositories by default. You can add your own community repositories by clicking 'Add Repository'.": "Creator Companion默认包括VRChat的官方和精选储存库。您可以通过单击“添加储存库”来添加您自己的社区储存库。",
"The Creator Companion includes VRChat's official and curated repositories by default. You can add your own community repositories by clicking 'Add Repository'.": "Creator Companion 默认包括 VRChat 的官方和精选储存库。您可以通过单击“添加储存库”来添加您自己的社区储存库。",
"Author": "作者",
"Add Repository": "添加储存库",
"Remove repository": "移除储存库",
Expand Down Expand Up @@ -241,5 +241,40 @@
"Open Project Upgrade Window": "打开项目升级窗口",
"VRChat has upgraded to Unity 2022. Upgrade your project to use all the latest features": "VRChat 已升级到 Unity 2022. 升级你的项目以使用所有最新功能",
"Upgrade to 2022": "升级到 2022",
"You will have a chance to review the changes before applying them": "在应用更改之前, 你可以查看进行的更改"
"You will have a chance to review the changes before applying them": "在应用更改之前, 你可以查看进行的更改",
"Welcome to the Creator Companion": "欢迎来到 Creator Companion",
"Create, add, or manage your VRChat worlds and avatar projects.": "创建,添加或管理您的世界和头像项目.",
"See other official tools made by VRChat.": "查看 VRChat 制作的其他官方工具.",
"View errors and other information logged by the Creator Companion.": "查看错误和其他信息日志.",
"Change your settings, visual theme, selected Unity editor, and more.": "更改您的设置, 主题, Unity编辑器等",
"Not recommended for new users.": "不推荐新用户使用.",
" Skip the Unity installation for now. You can add Unity later in the Settings": " 暂时跳过 Unity 安装. 您可以稍后在\"设置\"中添加 Unity",
"Current Version ": "当前版本 ",
"New Version ": "新版本 ",
"Updating Creator Companion": "正在更新 Creator Companion",
"No Unity Editors Found": "未找到 Unity编辑器",
"You need a Unity Editor to be able to launch projects via the VCC": "您需要一个 Unity编辑器 才能通过 VCC 启动项目",
"Are you sure?": "你确定吗?",
"Skipping Unity install is not recommended.": "不推荐跳过Unity安装.",
"This will prevent the VCC from opening your projects. You will need to install Unity to enable that functionality.": "这将会导致无法使用 VCC 打开你的项目. 你需要安装 Unity 才能启用完整功能.",
"Back to Unity Install": "返回到 Unity 安装",
"If you have any questions about the Creator Companion or creating VRChat content, check out the ": "如果您对 Creator Companion 或创建 VRChat 内容有任何疑问, 请查看 ",
" page.": " 页面.",
"You are adding": "您正在添加",
"You are downgrading": "您正在下载",
"You are removing": "您正在移除",
"[matcher]VCC is now ready to install Unity(.*)": "VCC 已经准备安装 Unity$1",
"Install Unity ": "安装 Unity ",
"Install Error:": "安装错误:",
"Unknown error": "未知错误",
"VCC failed to install the Unity Editor": "VCC 安装 Unity编辑器 失败",
"Try Again": "再试一次",
"Install Manually": "手动安装",
"Manually install the Unity Editor": "手动安装 Unity编辑器",
"I have installed the Unity Editor": "已安装 Unity编辑器",
"Click this link to start installation in Unity Hub": "点击此链接开始安装在 Unity Hub",
"Select 'Android Build Support' under 'Platforms'": "选择\"平台\"下的\"Android Build Support\"",
"Click 'Install'": "点击 \"安装\"",
"Check out the help article if you have any trouble": "如果遇到问题请查看帮助文章",
"Unity Version used by this project is not installed": "该项目使用的Unity版本未安装"
}
10 changes: 9 additions & 1 deletion vcc-auto-translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ const supported_element_name = [
'SplitButton',
'ToggleButton',
'DataGridHeaderCell',
'TableHeaderCell',
'MenuItem',
'Body1',
'Title1',
'Title3',
'Subtitle2',
'Input',
'DialogTitle',
'DialogContent',
Expand All @@ -24,6 +27,10 @@ const supported_element_name = [
'Dropdown',
'Link',
'ToastBody',
'Checkbox',
'Alert',
'TableCellLayout',
'OptionGroup',

'li',
'span',
Expand All @@ -32,6 +39,7 @@ const supported_element_name = [
'b',
'input',
'p',
'code',
]
const localization = supported_languages[navigator.language]
const localization_matcher = localization
Expand Down Expand Up @@ -77,7 +85,7 @@ globalThis['vcc_auto_translate'] = (e: any, t: any) => {
}

var children_translated = false
for (const k of ['children', 'placeholder', 'title']) {
for (const k of ['children', 'placeholder', 'title', 'label']) {
if (!t[k]) continue
if (typeof t[k] === 'string') {
const r = tr(t[k])
Expand Down

0 comments on commit 83f5c36

Please sign in to comment.