Skip to content

Commit

Permalink
Merge pull request #379 from ddikodroid/feat/indonesian-translation
Browse files Browse the repository at this point in the history
Add Indonesian Translation
  • Loading branch information
iM-GeeKy authored Apr 18, 2024
2 parents 14bfedb + 8ccc13a commit d3864ec
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docusaurus/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ npm install react-native-paper-dates --save

### Supported

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`.
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`.

```javascript
import { enGB, registerTranslation } from 'react-native-paper-dates'
Expand Down
2 changes: 2 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import {
el,
ru,
ro,
id,
} from 'react-native-paper-dates'
import { useCallback, useState } from 'react'

Expand All @@ -79,6 +80,7 @@ const locales: [string, TranslationsType][] = [
['el', el],
['ru', ru],
['ro', ro],
['id', id],
]

locales.forEach((locale) => {
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ export { default as cs } from './translations/cs'
export { default as el } from './translations/el'
export { default as ru } from './translations/ru'
export { default as ro } from './translations/ro'
export { default as id } from './translations/id'
23 changes: 23 additions & 0 deletions src/translations/id.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { TranslationsType } from './utils'

const id: TranslationsType = {
save: 'Simpan',
selectSingle: 'Pilih tanggal',
selectMultiple: 'Pilih tanggal',
selectRange: 'Pilih periode',
notAccordingToDateFormat: (inputFormat) =>
`Format tanggal harus ${inputFormat}`,
mustBeHigherThan: (date) => `Harus lebih besar dari ${date}`,
mustBeLowerThan: (date) => `Harus lebih kecil dari ${date}`,
mustBeBetween: (startDate, endDate) =>
`Harus di antara ${startDate} - ${endDate}`,
dateIsDisabled: 'Hari tidak diperbolehkan',
previous: 'Sebelumnya',
next: 'Berikutnya',
typeInDate: 'Ketik tanggal',
pickDateFromCalendar: 'Pilih tanggal dari kalender',
close: 'Tutup',
minute: 'Menit',
hour: 'Jam',
}
export default id

0 comments on commit d3864ec

Please sign in to comment.