Skip to content

Add Japanese translation file #1510

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

Merged
merged 2 commits into from
Feb 24, 2019
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
40 changes: 40 additions & 0 deletions docs/translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,43 @@ Scenario('成功提交表單', (我) => {
我.在當前網址中看不到('/documentation')
});
```

## Japanese

Add to config

```json
"translation": "ja-JP"
```

Now you can write test like this:

```js
Scenario('ログインできる', (私は) => {
私は.ページを移動する('/login');
私は.フィールドに入力する("Eメール", "foo@example.com");
私は.フィールドに入力する("パスワード", "p@ssword");
私は.クリックする('ログイン');
私は.待つ(1);
私は.URLに含まれるか確認する('/home');
});
```

## Using your own translation file

Create translation file like this:

```js
module.exports = {
I: '',
actions: {
click: 'Klicken',
wait: 'Wartenn',
}
```

And add the file path to your config

```json
"translation": "./path/to/your/translation.js"
```
1 change: 1 addition & 0 deletions translations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ exports['it-IT'] = require('./it-IT');
exports['pl-PL'] = require('./pl-PL');
exports['zh-CN'] = require('./zh-CN');
exports['zh-TW'] = require('./zh-TW');
exports['ja-JP'] = require('./ja-JP');
55 changes: 55 additions & 0 deletions translations/ja-JP.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
module.exports = {
I: '私は',
actions: {
amOutsideAngularApp: 'Angularの外に出る',
amInsideAngularApp: 'Angularの中に入る',
waitForElement: '要素を待つ',
waitForClickable: 'クリック可能になるまで待つ',
waitForVisible: '要素が見えるようになるまで待つ',
waitForText: 'テキストが表示されるまで待つ',
moveTo: '移動する',
refresh: '更新する',
haveModule: 'モジュールを持っている',
resetModule: 'モジュールをリセットする',
amOnPage: 'ページを移動する',
click: 'クリックする',
doubleClick: 'ダブルクリックする',
see: 'テキストがあるか確認する',
dontSee: 'テキストがないことを確認する',
selectOption: 'オプションを選ぶ',
fillField: 'フィールドに入力する',
pressKey: 'キー入力する',
triggerMouseEvent: 'マウスイベントを発火させる',
attachFile: 'ファイルを添付する',
seeInField: 'フィールドに文字が入っているか確認する',
dontSeeInField: 'フィールドに文字が入っていないか確認する',
appendField: 'フィールドに文字を追加する',
checkOption: 'オプションをチェックする',
seeCheckboxIsChecked: 'チェックされているか確認する',
dontSeeCheckboxIsChecked: 'チェックされていないことを確認する',
grabTextFrom: 'テキストを取得する',
grabValueFrom: '入力値を取得する',
grabAttributeFrom: '要素を取得する',
seeInTitle: 'タイトルに文字が含まれるか確認する',
dontSeeInTitle: 'タイトルに文字が含まれないことを確認する',
grabTitle: 'タイトルを取得する',
seeElement: '要素があるか確認する',
dontSeeElement: '要素がないことを確認する',
seeInSource: 'ソースにあるか確認する',
dontSeeInSource: 'ソースにないことを確認する',
executeScript: 'スクリプトを実行する',
executeAsyncScript: '非同期スクリプトを実行する',
seeInCurrentUrl: 'URLに含まれるか確認する',
dontSeeInCurrentUrl: 'URLに含まれないことを確認する',
seeCurrentUrlEquals: 'URLが等しいか確認する',
dontSeeCurrentUrlEquals: 'URLが等しくないことを確認する',
saveScreenshot: 'スクリーンショットを保存する',
setCookie: 'Cookieをセットする',
clearCookie: 'Cookieをクリアする',
seeCookie: 'Cookieに含まれることを確認する',
dontSeeCookie: 'Cookieに含まれないことを確認する',
grabCookie: 'Cookieを取得する',
resizeWindow: 'ウィンドウをリサイズする',
wait: '待つ',
},
};