Skip to content

Commit e27dfb8

Browse files
authored
Merge pull request #385 from kota113/master
Add Japanese translations
2 parents 45afec4 + 3a35c2e commit e27dfb8

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/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`.
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/ja` 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
@@ -54,6 +54,7 @@ import {
5454
ru,
5555
ro,
5656
id,
57+
ja,
5758
} from 'react-native-paper-dates'
5859
import { useCallback, useState } from 'react'
5960

@@ -81,6 +82,7 @@ const locales: [string, TranslationsType][] = [
8182
['ru', ru],
8283
['ro', ro],
8384
['id', id],
85+
['ja', ja],
8486
]
8587

8688
locales.forEach((locale) => {

src/index.tsx

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

src/translations/ja.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 ja: TranslationsType = {
4+
save: '保存',
5+
selectSingle: '日付を選択',
6+
selectMultiple: '日付を選択',
7+
selectRange: '期間を選択',
8+
notAccordingToDateFormat: (inputFormat) =>
9+
`形式が無効です。使用:${inputFormat}`,
10+
mustBeHigherThan: (date) => `${date}より後にする必要があります`,
11+
mustBeLowerThan: (date) => `${date}より前にする必要があります`,
12+
mustBeBetween: (startDate, endDate) =>
13+
`${startDate} - ${endDate}の範囲で入力してください`,
14+
dateIsDisabled: '日付は入力できません',
15+
previous: '前へ',
16+
next: '次へ',
17+
typeInDate: '日付を入力',
18+
pickDateFromCalendar: 'カレンダーから日付を選択',
19+
close: '閉じる',
20+
minute: '分',
21+
hour: '時',
22+
}
23+
export default ja

0 commit comments

Comments
 (0)