Skip to content

Commit

Permalink
Merge pull request #234 from chhinsras/main
Browse files Browse the repository at this point in the history
Add Khmer Translation
  • Loading branch information
honghuangdc committed May 24, 2023
2 parents c1c4335 + f89f3e6 commit b7fea53
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 3 deletions.
1 change: 1 addition & 0 deletions Sras.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test Sync
6 changes: 5 additions & 1 deletion src/layouts/common/global-header/components/toggle-lang.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ const options = [
{
label: 'English',
key: 'en'
}
},
{
label: 'ភាសាខ្មែរ',
key: 'km-KH'
}
];
const handleSelect = (key: string) => {
language.value = key as I18nType.langType;
Expand Down
4 changes: 3 additions & 1 deletion src/locales/lang/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import zhCN from './zh-cn';
import en from './en';
import kmKH from './km-KH';

const locales = {
'zh-CN': zhCN,
en
en,
'km-KH': kmKH,
};

export type LocaleKey = keyof typeof locales;
Expand Down
85 changes: 85 additions & 0 deletions src/locales/lang/km-KH.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import type { LocaleMessages } from 'vue-i18n';

const locale: LocaleMessages<I18nType.Schema> = {
message: {
system: {
title: 'ប្រព័ន្ធគ្រប់គ្រង'
},
routes: {
dashboard: {
dashboard: 'ផ្ទាំងទិន្នន័យ',
analysis: 'ផ្ទាំងវិភាគ',
workbench: 'ផ្ទាំងការងារ'
},
document: {
_value: 'ឯកសារ',
vue: 'ឯកសារ​ Vue',
vite: 'ឯកសារ​ Vite',
naive: 'ឯកសារ NaiveUI',
project: 'ឯកសារគម្រោង',
'project-link': 'ឯកសារគម្រោង(href)'
},
component: {
_value: 'សមាស​ភាគ',
button: 'ប៊ូតុង',
card: 'កាត',
table: 'តារាង'
},
plugin: {
_value: 'មុខងារជំនួយ',
charts: {
_value: 'តារាង​ Chart',
echarts: 'តារាង ECharts',
antv: 'AntV'
},
copy: 'ចម្លង',
editor: {
_value: 'កែប្រែ',
quill: 'Quill',
markdown: 'Markdown'
},
icon: 'អាយខន',
map: 'ផែនទី',
print: 'បោះពុម្ភ',
swiper: 'Swiper',
video: 'វីដេអូ'
},
'auth-demo': {
_value: 'ឌីមូ Auth',
permission: 'បិទ/បើកការអនុញ្ញាត',
super: 'Super Auth'
},
function: {
_value: 'មុខងារ',
tab: 'ថេបប្រព័ន្ធ'
},
exception: {
_value: 'ករណីពិេសស',
403: '403',
404: '404',
500: '500'
},
'multi-menu': {
_value: 'ម៉ឺនុយពហុដឺក្រេ',
first: {
_value: 'ដឺក្រេទី១',
second: 'ដែក្រេទី២',
'second-new': {
_value: 'ដឺក្រេទី២មានអនុក្រោម',
third: 'ដឺក្រេទី៣'
}
}
},
management: {
_value: 'ការគ្រប់គ្រងប្រព័ន្ធ',
auth: 'Auth',
role: 'សិទ្ធី',
route: 'ផ្លូវប្រព័ន្ធ',
user: 'អ្នកប្រើប្រាស់'
},
about: 'អំពីប្រព័ន្ធ'
}
}
};

export default locale;
2 changes: 1 addition & 1 deletion src/typings/system.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ declare namespace App {
}

declare namespace I18nType {
type langType = 'en' | 'zh-CN';
type langType = 'en' | 'zh-CN' | 'km-KH';

interface Schema {
system: {
Expand Down

1 comment on commit b7fea53

@vercel
Copy link

@vercel vercel bot commented on b7fea53 May 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.