Skip to content

Commit d3864ec

Browse files
authored
Merge pull request #379 from ddikodroid/feat/indonesian-translation
Add Indonesian Translation
2 parents 14bfedb + 8ccc13a commit d3864ec

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

docusaurus/docs/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ npm install react-native-paper-dates --save
3636

3737
### Supported
3838

39-
React-Native-Paper-Dates currently supports `ar/ca/de/en/en-GB/es/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW/cs/el/ru/ro` translations. Ideally you would do this somewhere before react-native-paper-dates is used. For example, you might add the follow to your `index.js` or `app.js`.
39+
React-Native-Paper-Dates currently supports `ar/ca/de/en/en-GB/es/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW/cs/el/ru/ro/id` translations. Ideally you would do this somewhere before react-native-paper-dates is used. For example, you might add the follow to your `index.js` or `app.js`.
4040

4141
```javascript
4242
import { enGB, registerTranslation } from 'react-native-paper-dates'

example/src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import {
5353
el,
5454
ru,
5555
ro,
56+
id,
5657
} from 'react-native-paper-dates'
5758
import { useCallback, useState } from 'react'
5859

@@ -79,6 +80,7 @@ const locales: [string, TranslationsType][] = [
7980
['el', el],
8081
['ru', ru],
8182
['ro', ro],
83+
['id', id],
8284
]
8385

8486
locales.forEach((locale) => {

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ export { default as cs } from './translations/cs'
2929
export { default as el } from './translations/el'
3030
export { default as ru } from './translations/ru'
3131
export { default as ro } from './translations/ro'
32+
export { default as id } from './translations/id'

src/translations/id.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { TranslationsType } from './utils'
2+
3+
const id: TranslationsType = {
4+
save: 'Simpan',
5+
selectSingle: 'Pilih tanggal',
6+
selectMultiple: 'Pilih tanggal',
7+
selectRange: 'Pilih periode',
8+
notAccordingToDateFormat: (inputFormat) =>
9+
`Format tanggal harus ${inputFormat}`,
10+
mustBeHigherThan: (date) => `Harus lebih besar dari ${date}`,
11+
mustBeLowerThan: (date) => `Harus lebih kecil dari ${date}`,
12+
mustBeBetween: (startDate, endDate) =>
13+
`Harus di antara ${startDate} - ${endDate}`,
14+
dateIsDisabled: 'Hari tidak diperbolehkan',
15+
previous: 'Sebelumnya',
16+
next: 'Berikutnya',
17+
typeInDate: 'Ketik tanggal',
18+
pickDateFromCalendar: 'Pilih tanggal dari kalender',
19+
close: 'Tutup',
20+
minute: 'Menit',
21+
hour: 'Jam',
22+
}
23+
export default id

0 commit comments

Comments
 (0)