Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kotti-ui): add indonesian translation #443

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
4 changes: 4 additions & 0 deletions packages/kotti-ui/source/kotti-translation/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import elementDe from 'element-ui/lib/locale/lang/de'
import elementEn from 'element-ui/lib/locale/lang/en'
import elementEs from 'element-ui/lib/locale/lang/es'
import elementFr from 'element-ui/lib/locale/lang/fr'
import elementId from 'element-ui/lib/locale/lang/id'
import elementJa from 'element-ui/lib/locale/lang/ja'

import { KT_TRANSLATION_CONTEXT } from './constants'
import { deDE } from './locales/de-DE'
import { enUS } from './locales/en-US'
import { esES } from './locales/es-ES'
import { frFR } from './locales/fr-FR'
import { idID } from './locales/id-ID'
import { jaJP } from './locales/ja-JP'
import { KottiTranslation } from './types'
import { fixDeepMerge } from './utilities'
Expand Down Expand Up @@ -68,6 +70,7 @@ export const useTranslationProvide = (
'de-DE': deDE,
'es-ES': esES,
'fr-FR': frFR,
'id-ID': idID,
'ja-JP': jaJP,
}[locale.value]),
)
Expand All @@ -83,6 +86,7 @@ export const useTranslationProvide = (
'de-DE': elementDe,
'es-ES': elementEs,
'fr-FR': elementFr,
'id-ID': elementId,
'ja-JP': elementJa,
}[newValue]

Expand Down
69 changes: 69 additions & 0 deletions packages/kotti-ui/source/kotti-translation/locales/id-ID.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { KottiTranslation } from '../types'

export const idID: KottiTranslation.Messages = {
KtBanner: {
expandLabel: 'Lihat',
expandCloseLabel: 'Tutup',
},
KtFields: {
optionalLabel: 'Opsional',
requiredMessage: 'Bidang ini wajib',
},
KtFieldSelects: {
loadingText: 'Memuat',
noMatchText: 'Tidak ada data ditemukan',
noDataText: 'Tidak ada data',
placeholder: 'Pilih',
},
KtFilters: {
addFilterLabel: 'Tambah Filter',
andLabel: 'Dan',
boolean: {
EQUAL: 'adalah',
IS_EMPTY: 'kosong',
},
clearAllLabel: 'Hapus Semua',
dateRange: {
IN_RANGE: 'di dalam batasan',
IS_EMPTY: 'kosong',
},
disabledLabel: 'Nonaktif',
emptyListLabel: 'Tidak ada Filter Diterapkan',
enabledLabel: 'Diaktifkan',
filterLabel: 'Filter',
filtersLabel: 'Filter-filter',
multiEnum: {
IS_EMPTY: 'kosong',
ONE_OF: 'salah satu dari',
},
number: {
EQUAL: 'sama dengan',
GREATER_THAN: 'lebih besar dari',
GREATER_THAN_OR_EQUAL: 'lebih besar atau sama dengan',
IS_EMPTY: 'kosong',
LESS_THAN: 'kurang dari',
LESS_THAN_OR_EQUAL: 'kurang dari atau sama dengan',
},
searchLabel: 'Cari',
singleEnum: {
EQUAL: 'adalah',
IS_EMPTY: 'kosong',
},
string: {
CONTAINS: 'berisi',
IS_EMPTY: 'kosong',
},
unsetLabel: 'Hapus Pengaturan',
whereLabel: 'Dimana',
},
KtFormSubmit: {
errorsSectionTitle: 'Galat',
title: 'Pengiriman Formulir Dilarang',
warningsSectionTitle: 'Peringatan',
},
KtNavbar: {
menuCollapse: 'Tutup menu',
menuExpand: 'Buka menu',
quickLinksTitle: 'Pranala Cepat',
},
}
1 change: 1 addition & 0 deletions packages/kotti-ui/source/kotti-translation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ export namespace KottiTranslation {
| 'de-DE'
| 'es-ES'
| 'fr-FR'
| 'id-ID'
| 'ja-JP'
}