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

Add Japanese translations #385

Merged
merged 4 commits into from
May 15, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/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`.
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`.

```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 @@ -54,6 +54,7 @@ import {
ru,
ro,
id,
ja,
} from 'react-native-paper-dates'
import { useCallback, useState } from 'react'

Expand Down Expand Up @@ -81,6 +82,7 @@ const locales: [string, TranslationsType][] = [
['ru', ru],
['ro', ro],
['id', id],
['ja', ja],
]

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 @@ -30,3 +30,4 @@ 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'
export { default as ja } from './translations/ja'
23 changes: 23 additions & 0 deletions src/translations/ja.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { TranslationsType } from './utils'

const ja: TranslationsType = {
save: '保存',
selectSingle: '日付を選択',
selectMultiple: '日付を選択',
selectRange: '期間を選択',
notAccordingToDateFormat: (inputFormat) =>
`形式が無効です。使用:${inputFormat}`,
mustBeHigherThan: (date) => `${date}より後にする必要があります`,
mustBeLowerThan: (date) => `${date}より前にする必要があります`,
mustBeBetween: (startDate, endDate) =>
`${startDate} - ${endDate}の範囲で入力してください`,
dateIsDisabled: '日付は入力できません',
previous: '前へ',
next: '次へ',
typeInDate: '日付を入力',
pickDateFromCalendar: 'カレンダーから日付を選択',
close: '閉じる',
minute: '分',
hour: '時',
}
export default ja
Loading