Skip to content

Commit c7c7d81

Browse files
authored
feat(i18n): translate time units and dialog buttons (#2530)
resolve #2529
1 parent 84771e7 commit c7c7d81

7 files changed

Lines changed: 22 additions & 4 deletions

File tree

frontend/nyanpasu/src/components/profiles/profile-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export const ProfileDialog = ({
284284
InputProps={{
285285
inputProps: { min: 0 },
286286
endAdornment: (
287-
<InputAdornment position="end">mins</InputAdornment>
287+
<InputAdornment position="end">{t('minutes')}</InputAdornment>
288288
),
289289
}}
290290
/>

frontend/nyanpasu/src/components/setting/setting-clash-web.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ export const SettingClashWeb = () => {
117117
setEditIndex(null)
118118
setEditString('')
119119
}}
120-
ok="Submit"
121-
close="Close"
120+
ok={t('Ok')}
121+
close={t('Close')}
122122
contentStyle={{ overflow: editString ? 'auto' : 'hidden' }}
123123
divider
124124
>

frontend/nyanpasu/src/components/setting/setting-system-proxy.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ const ProxyGuardInterval = () => {
109109
'aria-autocomplete': 'none',
110110
},
111111
InputProps: {
112-
endAdornment: <InputAdornment position="end">s</InputAdornment>,
112+
endAdornment: (
113+
<InputAdornment position="end">{t('seconds')}</InputAdornment>
114+
),
113115
},
114116
}}
115117
/>

frontend/nyanpasu/src/locales/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"seconds": "s",
3+
"minutes": "min(s)",
4+
"Ok": "OK",
5+
"Close": "Close",
26
"label_dashboard": "Dashboard",
37
"label_proxies": "Proxies",
48
"label_profiles": "Profiles",

frontend/nyanpasu/src/locales/ru.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"seconds": "секунды",
3+
"minutes": "минуты",
4+
"Ok": "OK",
5+
"Close": "Закрыть",
26
"label_dashboard": "Панель управления",
37
"label_proxies": "Прокси",
48
"label_profiles": "Профили",

frontend/nyanpasu/src/locales/zh-CN.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"seconds": "",
3+
"minutes": "分钟",
4+
"Ok": "确定",
5+
"Close": "关闭",
26
"label_dashboard": "概 览",
37
"label_proxies": "代 理",
48
"label_profiles": "配 置",

frontend/nyanpasu/src/locales/zh-TW.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"seconds": "",
3+
"minutes": "分鐘",
4+
"Ok": "確定",
5+
"Close": "關閉",
26
"label_dashboard": "儀表盤",
37
"label_proxies": "代理組",
48
"label_profiles": "代理設定檔",

0 commit comments

Comments
 (0)