From c5c38906cab476a4249e5b2a22c3e3d30e8d0111 Mon Sep 17 00:00:00 2001 From: Khusika Dhamar Gusti Date: Sat, 25 Mar 2023 14:57:27 +0700 Subject: [PATCH] feat(vssue): add id-ID language (#166) Signed-off-by: Khusika Dhamar Gusti --- packages/docs/src/options/README.md | 1 + packages/docs/src/zh/options/README.md | 1 + packages/vssue/src/i18n/index.ts | 3 ++ packages/vssue/src/i18n/langs/id-ID.ts | 54 ++++++++++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 packages/vssue/src/i18n/langs/id-ID.ts diff --git a/packages/docs/src/options/README.md b/packages/docs/src/options/README.md index 333bea4..56cd2f5 100644 --- a/packages/docs/src/options/README.md +++ b/packages/docs/src/options/README.md @@ -235,6 +235,7 @@ The common pattern of repository's URL is `` `${baseURL}/${owner}/${repo}` ``: - `'he'` (`'he-IL'`) - `'ko'` (`'ko-KR'`) - `'fr'` (`'fr-FR'`) + - `'id'` (`'id-ID'`) Contributions welcome for more languages support. ::: diff --git a/packages/docs/src/zh/options/README.md b/packages/docs/src/zh/options/README.md index cc0f558..e99879b 100644 --- a/packages/docs/src/zh/options/README.md +++ b/packages/docs/src/zh/options/README.md @@ -235,6 +235,7 @@ Vue.use(Vssue, { - `'he'` (`'he-IL'`) - `'ko'` (`'ko-KR'`) - `'fr'` (`'fr-FR'`) + - `'id'` (`'id-ID'`) 欢迎贡献代码帮助 Vssue 支持更多语言。 ::: diff --git a/packages/vssue/src/i18n/index.ts b/packages/vssue/src/i18n/index.ts index 63c26a9..f55b9e8 100644 --- a/packages/vssue/src/i18n/index.ts +++ b/packages/vssue/src/i18n/index.ts @@ -8,6 +8,7 @@ import jaJP from './langs/ja-JP'; import heIL from './langs/he-IL'; import koKR from './langs/ko-KR'; import frFR from './langs/fr-FR'; +import idID from './langs/id-ID'; if (!Object.prototype.hasOwnProperty.call(Vue, '$i18n')) { Vue.use(VueI18n); @@ -32,6 +33,8 @@ const i18n: VueI18n = new VueI18n({ 'ko-KR': koKR, fr: frFR, 'fr-FR': frFR, + id: idID, + 'id-ID': idID, }, }); diff --git a/packages/vssue/src/i18n/langs/id-ID.ts b/packages/vssue/src/i18n/langs/id-ID.ts new file mode 100644 index 0000000..7d9fee4 --- /dev/null +++ b/packages/vssue/src/i18n/langs/id-ID.ts @@ -0,0 +1,54 @@ +import VueI18n from 'vue-i18n'; + +const messages: VueI18n.LocaleMessageObject = { + // auth + login: 'Masuk dengan {platform}', + logout: 'Keluar', + currentUser: 'Pengguna Saat Ini', + + // comment input + loading: 'Memuat', + submit: 'Kirim', + submitting: 'Mengirim', + submitComment: 'Kirim Komentar', + cancel: 'Batalkan', + edit: 'Sunting', + editMode: 'Mode Menyunting', + delete: 'Hapus', + reply: 'Balas', + + // reactions + heart: 'Heart', + like: 'Like', + unlike: 'Unlike', + + // pagination + perPage: 'Komentar per halaman', + sort: 'Klik untuk mengubah arah pengurutan', + page: 'Halaman', + prev: 'Halaman Sebelumnya', + next: 'Halaman Sesudahnya', + + // hint + comments: 'Komentar | {count} Komentar | {count} Komentar', + loginToComment: 'Masuk dengan {platform} akun untuk meniggalkan komentar', + placeholder: + 'Tinggalkan komentar. Mendukung gaya penulisan Markdown. Ctrl + Enter untuk mengirim.', + noLoginPlaceHolder: + 'Tinggalkan komentar. Mendukung gaya penulisan Markdown. ', + + // status + failed: 'Gagal untuk memuat komentar', + initializing: 'Inisialisasi...', + issueNotCreated: 'Klik untuk membuat isu', + loadingComments: 'Memuat komentar...', + loginRequired: 'Masuk untuk melihat komentar', + noComments: 'Belum ada komentar. Tinggalkan komentar pertama !', + + // alerts + reactionGiven: `Reaksi '{reaction}' sudah diberikan`, + deleteConfirm: 'Konfirmasi untuk menghapus komentar ini ?', + deleteFailed: 'Gagal untuk menghapus komentar', +}; + +export default messages;