Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/codeimage/src/i18n/ notFound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ export const notFound = {
goToHome: 'Go to home',
},
},
zh: {
notFound: {
title: '404',
description: '你访问的资源不存在',
goToHome: '返回首页',
},
},
};
7 changes: 7 additions & 0 deletions apps/codeimage/src/i18n/bottombar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ export const bottomBar = {
editor: 'Editor',
},
},
zh: {
bottomBar: {
themes: '主题',
styles: '样式',
editor: '编辑器',
},
},
};
39 changes: 39 additions & 0 deletions apps/codeimage/src/i18n/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,43 @@ export const dashboard = {
},
},
},
zh: {
dashboard: {
myProjects: '我的项目',
new: '新建',
created: '创建时间',
updated: '更新时间',
errorCreatingProject: '发生错误!',
projectCreateSuccess: '项目创建成功',
projectCloneSuccess: '项目 {{name}} 克隆成功',
projectDeleteSuccess: '项目 {{name}} 已删除',
projectDeleteError: '无法删除项目 {{name}}',
empty: {
title: '暂无项目',
description: '从零开始创建一个新项目,<br/>并分享你的代码片段',
},
errorLoadingList: {
title: '出错了!',
description: '抱歉!你的请求出现了问题。',
},
noMatchingProjects: {
title: '没有结果',
description: '哎呀!没有与搜索匹配的项目。<br />',
},
deleteProject: {
dropdownLabel: '删除',
confirmTitle: '删除项目',
confirmMessage: '此操作不可逆。',
},
renameProject: {
dropdownLabel: '重命名',
confirmTitle: '重命名项目',
confirmMessage: '请输入项目的新名称。',
},
cloneProject: {
dropdownLabel: '克隆',
confirmTitle: '克隆项目',
},
},
},
};
101 changes: 96 additions & 5 deletions apps/codeimage/src/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {notFound} from './ notFound';
import {dashboard} from './dashboard';
import {presets} from './presets';
import { notFound } from './ notFound';
import { dashboard } from './dashboard';
import { presets } from './presets';
import sidebarLocale from './sidebar';
import {uiLocale} from './ui';
import {bottomBar} from './bottombar';
import { uiLocale } from './ui';
import { bottomBar } from './bottombar';

export const locale = {
it: {
Expand Down Expand Up @@ -34,6 +34,7 @@ export const locale = {
en: 'Inglese',
de: 'Tedesco',
es: 'Spagnolo',
zh: 'Cinese',
},
toolbar: {
export: 'Exporta',
Expand Down Expand Up @@ -119,6 +120,7 @@ export const locale = {
en: 'English',
de: 'German',
es: 'Spanish',
zh: 'Chinese',
},
readOnlyBanner: {
title:
Expand Down Expand Up @@ -209,6 +211,7 @@ export const locale = {
en: 'Englisch',
de: 'Deutsch',
es: 'Spanisch',
zh: 'Chinesisch',
},
toolbar: {
export: 'Export',
Expand Down Expand Up @@ -296,6 +299,7 @@ export const locale = {
en: 'Inglés',
de: 'Alemán',
es: 'Español',
zh: 'Chino',
},
toolbar: {
export: 'Exportar',
Expand Down Expand Up @@ -355,6 +359,93 @@ export const locale = {
...notFound.es,
...presets.es,
},
zh: {
canvas: {
copiedToClipboard: '代码片段已复制到剪贴板',
linkGeneratedToClipboard: '链接已复制到剪贴板',
formattedCode: '代码已格式化',
pastedCode: '代码已粘贴',
errorFormattedCode: '代码格式化失败',
},
common: {
close: '关闭',
confirm: '确认',
yes: '是',
no: '否',
show: '显示',
hide: '隐藏',
reload: '重新加载',
clone: '克隆',
new: '新建',
},
locales: {
it: '意大利语',
en: '英语',
de: '德语',
es: '西班牙语',
zh: '中文',
},
readOnlyBanner: {
title:
'当前为只读模式。克隆此代码片段以保存到你的工作区并进行编辑。',
},
toolbar: {
export: '导出',
openNewTab: '新标签打开',
loadingNewTab: '正在准备链接...',
share: '分享',
generateLink: '生成链接',
toggleTheme: '切换主题',
changeLanguage: '切换语言',
exportLoading: '正在导出...',
},
pwa: {
offline: '应用已准备好离线使用',
update: '发现新内容,点击重新加载以更新',
close: '关闭',
reload: '重新加载',
},
export: {
title: '导出图片',
shareMode: '分享你的代码',
shareHint: '此模式使用新的',
exportMode: '导出为图片',
fileName: '文件名',
fileNamePlaceholder: '请输入文件名...',
extensionType: '文件扩展名',
pixelRatio: '缩放',
genericSaveError: '保存时发生错误',
noOpacitySupportedWithThisExtension:
'该扩展不支持自定义透明度',
quality: '质量',
},
shortcut: {
esc: 'Esc',
buttonAction: '键盘快捷键',
focusCodeEditor: '聚焦代码编辑器',
unFocusCodeEditor: '取消聚焦代码编辑器',
toggleBackground: '切换背景',
toggleDarkMode: '切换深色模式',
toggleHeader: '切换标题栏',
toggleWatermark: '切换水印',
changePadding: '调整内边距',
pickRandomTheme: '随机选择主题',
export: '导出',
exportNewTab: '在新标签中导出',
copyLink: '复制链接',
copySnippet: '复制代码片段',
openShortcuts: '打开快捷键',
},
themeSwitcher: {
search: '搜索主题...',
},
...uiLocale.zh,
...bottomBar.zh,
...sidebarLocale.zh,
...dashboard.zh,
...notFound.zh,
...presets.zh,
},
};

export type AppLocaleEntries = typeof locale;
48 changes: 47 additions & 1 deletion apps/codeimage/src/i18n/presets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {guestLimit, userLimit} from '@codeimage/store/presets/bridge';
import { guestLimit, userLimit } from '@codeimage/store/presets/bridge';

export const presets = {
it: {
Expand Down Expand Up @@ -181,4 +181,50 @@ export const presets = {
},
},
},
zh: {
presets: {
userPresets: '你的预设',
updatePreset: {
label: '更新',
dialogTitle: '更新预设',
dialogMessage: '确认用当前编辑器状态更新所选预设',
old: '旧',
new: '新',
},
share: {
label: '分享',
confirm: '预设链接已复制',
},
renamePreset: {
label: '重命名',
confirmTitle: '重命名预设',
confirmMessage: '请输入预设的新名称。',
},
addPreset: {
label: '添加预设',
confirmTitle: '添加新预设',
confirmMessage: '请输入你的预设名称',
},
deletePreset: {
label: '删除',
confirmTitle: '删除预设',
confirmMessage: '此操作不可逆。',
},
sync: {
label: '保存到你的账号',
},
openPreset: {
label: '查看你的预设',
},
limit: {
user: {
label: `你已达到每位用户最多 ${userLimit} 个预设的限制`,
},
guest: {
label: `你已达到访客最多 ${guestLimit} 个预设的限制`,
actionLabel: `登录以提升限制`,
},
},
},
},
};
29 changes: 29 additions & 0 deletions apps/codeimage/src/i18n/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,33 @@ export default {
border: 'Border',
},
},
zh: {
frame: {
frame: '画框',
padding: '内边距',
visible: '可见',
opacity: '不透明度',
color: '颜色',
background: '背景',
terminal: '窗口',
header: '标题栏',
tabAccent: '标签高亮',
shadows: '阴影',
shadow: '阴影',
editor: '编辑器',
language: '语言',
lineNumbers: '行号',
lineNumberStart: '起始行',
font: '字体',
fontWeight: '字重',
reflection: '反射',
watermark: '水印',
backgroundType: '背景类型',
theme: '主题',
ligatures: '连字',
aspectRatio: '纵横比',
formatter: '格式化工具',
border: '边框',
},
},
} as const;
17 changes: 17 additions & 0 deletions apps/codeimage/src/i18n/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,21 @@ export const uiLocale = {
outlined: 'Contorno',
},
},
zh: {
colorPicker: {
color: '颜色',
gradient: '渐变',
background: '自定义',
},
shadows: {
lg: '大',
md: '中',
sm: '小',
none: '无',
bottom: '底部',
xl: '特大',
'3d': '3D 效果',
outlined: '描边',
},
},
};
2 changes: 1 addition & 1 deletion packages/config/src/lib/base/locales.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SUPPORTED_LOCALES = ['it', 'en', 'de', 'es'] as const;
export const SUPPORTED_LOCALES = ['it', 'en', 'de', 'es', 'zh'] as const;