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: translate all to indonesian #48287

Merged
merged 6 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions components/locale/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -148032,7 +148032,7 @@ exports[`Locale Provider should display the text as id 1`] = `
type="button"
>
<span>
OK
Oke
</span>
</button>
</div>
Expand Down Expand Up @@ -148089,7 +148089,7 @@ exports[`Locale Provider should display the text as id 1`] = `
class="ant-transfer-list-header-selected"
>
0
item
data
</span>
<span
class="ant-transfer-list-header-title"
Expand Down Expand Up @@ -148129,7 +148129,7 @@ exports[`Locale Provider should display the text as id 1`] = `
</span>
<input
class="ant-input"
placeholder="Cari"
placeholder="Cari di sini"
type="text"
value=""
/>
Expand Down Expand Up @@ -148323,7 +148323,7 @@ exports[`Locale Provider should display the text as id 1`] = `
class="ant-transfer-list-header-selected"
>
0
item
data
</span>
<span
class="ant-transfer-list-header-title"
Expand Down Expand Up @@ -148363,7 +148363,7 @@ exports[`Locale Provider should display the text as id 1`] = `
</span>
<input
class="ant-input"
placeholder="Cari"
placeholder="Cari di sini"
type="text"
value=""
/>
Expand Down Expand Up @@ -149622,7 +149622,7 @@ exports[`Locale Provider should display the text as id 1`] = `
type="button"
>
<span>
OK
Oke
</span>
</button>
</div>
Expand Down
125 changes: 112 additions & 13 deletions components/locale/id_ID.ts
Original file line number Diff line number Diff line change
@@ -1,49 +1,148 @@
/* eslint-disable no-template-curly-in-string */
import Pagination from 'rc-pagination/lib/locale/id_ID';

import type { Locale } from '.';
import Calendar from '../calendar/locale/id_ID';
import DatePicker from '../date-picker/locale/id_ID';
import TimePicker from '../time-picker/locale/id_ID';

const typeTemplate = '${label} tidak valid ${type}';

const localeValues: Locale = {
locale: 'id',
Pagination,
DatePicker,
TimePicker,
Calendar,
global: {
placeholder: 'Silahkan pilih',
},
Table: {
filterTitle: 'Saring',
filterConfirm: 'OK',
filterReset: 'Hapus',
selectAll: 'Pilih semua di halaman ini',
selectInvert: 'Balikkan pilihan di halaman ini',
filterTitle: 'Menu filter',
filterConfirm: 'Oke',
filterReset: 'Reset',
filterEmptyText: 'Tidak ada filter',
filterCheckall: 'Pilih semua item',
filterSearchPlaceholder: 'Cari di filter',
emptyText: 'Tidak ada data',
selectAll: 'Pilih halaman saat ini',
selectInvert: 'Balikkan halaman saat ini',
selectNone: 'Hapus semua data',
selectionAll: 'Pilih semua data',
sortTitle: 'Urutkan',
expand: 'Perluas baris',
collapse: 'Perkecil baris',
triggerDesc: 'Klik untuk mengurutkan secara menurun',
triggerAsc: 'Klik untuk mengurutkan secara menaik',
cancelSort: 'Klik untuk membatalkan pengurutan',
},
Tour: {
Next: 'Selanjutnya',
Previous: 'Sebelumnya',
Finish: 'Selesai',
},
Modal: {
okText: 'OK',
okText: 'Oke',
cancelText: 'Batal',
justOkText: 'OK',
justOkText: 'Oke',
},
Popconfirm: {
okText: 'OK',
okText: 'Oke',
cancelText: 'Batal',
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Cari',
itemUnit: 'item',
itemsUnit: 'item',
searchPlaceholder: 'Cari di sini',
itemUnit: 'data',
itemsUnit: 'data',
remove: 'Hapus',
selectCurrent: 'Pilih halaman saat ini',
removeCurrent: 'Hapus halaman saat ini',
selectAll: 'Pilih semua data',
removeAll: 'Hapus semua data',
selectInvert: 'Balikkan halaman saat ini',
},
Upload: {
uploading: 'Mengunggah...',
removeFile: 'Hapus file',
uploadError: 'Kesalahan pengunggahan',
previewFile: 'File pratinjau',
downloadFile: 'Unduh berkas',
previewFile: 'Pratinjau file',
downloadFile: 'Unduh file',
},
Empty: {
description: 'Tidak ada data',
},
Icon: {
icon: 'ikon',
},
Text: {
edit: 'Ubah',
copy: 'Salin',
copied: 'Disalin',
expand: 'Perluas',
collapse: 'Perkecil',
},
Form: {
optional: '(optional)',
defaultValidateMessages: {
default: 'Kesalahan validasi untuk ${label}',
required: 'Tolong masukkan ${label}',
enum: '${label} harus menjadi salah satu dari [${enum}]',
whitespace: '${label} tidak boleh berupa karakter kosong',
date: {
format: '${label} format tanggal tidak valid',
parse: '${label} tidak dapat diubah menjadi tanggal',
invalid: '${label} adalah tanggal yang tidak valid',
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate,
},
string: {
len: '${label} harus berupa ${len} karakter',
min: '${label} harus minimal ${min} karakter',
max: '${label} harus maksimal ${max} karakter',
range: '${label} harus diantara ${min}-${max} karakter',
},
number: {
len: '${label} harus sama dengan ${len}',
min: '${label} harus minimal ${min}',
max: '${label} harus maksimal ${max}',
range: '${label} harus di antara ${min}-${max}',
},
array: {
len: 'Harus ${len} ${label}',
min: 'Minimal ${min} ${label}',
max: 'Maksimal ${max} ${label}',
range: 'Jumlah ${label} harus di antara ${min}-${max}',
},
pattern: {
mismatch: '${label} tidak sesuai dengan pola ${pattern}',
},
},
},
Image: {
preview: 'Pratinjau',
},
QRCode: {
expired: 'Kode QR sudah habis masa berlakunya',
refresh: 'Segarkan',
scanned: 'Dipindai',
},
ColorPicker: {
presetEmpty: 'Kosong',
},
};

export default localeValues;