-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Allow custom paths * Add translation file * Fix jest test * Added more tests * Update docs Content of translation jsons * Leave only one translation file * generate default translations file * Simplify i18n setup * Code review changes Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
c5727c1
commit ea14b97
Showing
5 changed files
with
209 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/kbn-plugin-generator/sao_template/template/i18nrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"prefix": "<%= camelCase(name) %>", | ||
"paths": { | ||
"<%= camelCase(name) %>": "." | ||
}, | ||
"translations": [ | ||
"translations/ja-JP.json" | ||
] | ||
} | ||
|
82 changes: 82 additions & 0 deletions
82
packages/kbn-plugin-generator/sao_template/template/translations/ja-JP.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
|
||
{ | ||
"formats": { | ||
"number": { | ||
"currency": { | ||
"style": "currency" | ||
}, | ||
"percent": { | ||
"style": "percent" | ||
} | ||
}, | ||
"date": { | ||
"short": { | ||
"month": "numeric", | ||
"day": "numeric", | ||
"year": "2-digit" | ||
}, | ||
"medium": { | ||
"month": "short", | ||
"day": "numeric", | ||
"year": "numeric" | ||
}, | ||
"long": { | ||
"month": "long", | ||
"day": "numeric", | ||
"year": "numeric" | ||
}, | ||
"full": { | ||
"weekday": "long", | ||
"month": "long", | ||
"day": "numeric", | ||
"year": "numeric" | ||
} | ||
}, | ||
"time": { | ||
"short": { | ||
"hour": "numeric", | ||
"minute": "numeric" | ||
}, | ||
"medium": { | ||
"hour": "numeric", | ||
"minute": "numeric", | ||
"second": "numeric" | ||
}, | ||
"long": { | ||
"hour": "numeric", | ||
"minute": "numeric", | ||
"second": "numeric", | ||
"timeZoneName": "short" | ||
}, | ||
"full": { | ||
"hour": "numeric", | ||
"minute": "numeric", | ||
"second": "numeric", | ||
"timeZoneName": "short" | ||
} | ||
}, | ||
"relative": { | ||
"years": { | ||
"units": "year" | ||
}, | ||
"months": { | ||
"units": "month" | ||
}, | ||
"days": { | ||
"units": "day" | ||
}, | ||
"hours": { | ||
"units": "hour" | ||
}, | ||
"minutes": { | ||
"units": "minute" | ||
}, | ||
"seconds": { | ||
"units": "second" | ||
} | ||
} | ||
}, | ||
"messages": { | ||
"<%= camelCase(name) %>.buttonText": "Translate me to Japanese", | ||
} | ||
} |