Skip to content

Commit 79ce5ff

Browse files
keisuketsushimaMarkusBordihn
authored andcommitted
Refactor a part of JA translation code (general and welcom_screen) into (#176)
the new file structure.
1 parent d1b3732 commit 79ce5ff

File tree

5 files changed

+93
-5
lines changed

5 files changed

+93
-5
lines changed

build/cwc/locales.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ closureBuilder.build({
113113
closureBuilder.build({
114114
name: 'Locales.jpn',
115115
srcs: glob([
116-
'locales/jpn/translation.js',
116+
'locales/_jpn.js',
117+
'locales/jpn/**/*.js',
117118
]),
118119
externs: [
119120
'build/externs/locales.js',

locales/jpn/_jpn.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* @fileoverview Translation file (japanese).
3+
*
4+
* @license Copyright 2018 The Coding with Chrome Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* @author [email protected] (Keisuke Tsushima)
19+
*/
20+
window['Locales'] = window['Locales'] || {};
21+
Locales['jpn'] = Locales['jpn'] || {};

locales/jpn/general.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* @fileoverview General Translation file (japanese).
3+
*
4+
* @license Copyright 2018 The Coding with Chrome Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* @author [email protected] (Keisuke Tsushima)
19+
*/
20+
Locales['jpn']['GENERAL'] = {
21+
'ABOUT': 'Codig with Chrome について',
22+
'BACK': '戻る',
23+
'CANCEL': 'キャンセル',
24+
'CLOSE': '閉じる',
25+
'CONTINUE': '続ける',
26+
'DONE': '完了',
27+
'EXIT': '終わる',
28+
'HELP': 'ヘルプ',
29+
'NEXT': '次へ',
30+
'NO': 'いいえ',
31+
'OK': 'OK',
32+
'SETTINGS': '設定',
33+
'YES': 'はい',
34+
};

locales/jpn/translation.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@
1818
* @author [email protected] (Junji Hashimoto)
1919
* @deprecated
2020
*/
21-
window['Locales'] = window['Locales'] || {};
22-
2321

2422
/**
2523
* @final
2624
* @export
2725
*/
2826
/* eslint-disable max-len */
29-
Locales['jpn'] = {
27+
Object.assign(Locales['jpn'], {
3028
'(0 - 254)': '(0 - 254)',
3129
'* You need to restart the application after enabling or disabling these options.': '* このオプションを変更した後、アプリの再起動が必要です。',
3230
'About Coding with Chrome': 'コーディング ウィズ クロームについて',
@@ -242,4 +240,4 @@ Locales['jpn'] = {
242240
'stop motors(': 'モーターを止める(',
243241
'when finished': '終わったとき',
244242
'{$startSpan}Click here{$endSpan} to see our short introduction to Coding with Chrome.': 'コーディング ウィズ クロームの紹介をみる場合、{$startSpan}ここをクリック{$endSpan}してしてください。',
245-
};
243+
});

locales/jpn/welcome_screen.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* @fileoverview Translation file for the Welcome screen (japanese).
3+
*
4+
* @license Copyright 2018 The Coding with Chrome Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* @author [email protected] (Keisuke Tsushima)
19+
*/
20+
/* eslint-disable max-len */
21+
Locales['jpn']['WELCOME_SCREEN'] = {
22+
'TITLE': 'Coding with Chrome へようこそ!',
23+
'DESCRIPTION': 'Coding with Chrome は教育用の開発環境です',
24+
'HEADER': 'コーディングを開始する',
25+
'CHOOSE': '現在のコーディング レベルを選択してください。',
26+
'BEGINNER': 'ビギナー',
27+
'BEGINNER_TEXT': 'ブロックプログラミングでプログラミングを始めましょう。ブロックをドラッグアンドドロップで並べて一緒にプログラムを組み立てます。',
28+
'BEGINNER_ACTION': 'ビギナー モードを選ぶ',
29+
'ADVANCED': 'アドバンス',
30+
'ADVANCED_TEXT': ' JavaScript や Python などの高級プログラム言語を使用してコードを書きます。',
31+
'ADVANCED_ACTION': 'アドバンス モードを選ぶ',
32+
'SHOW_ON_STARTUP': '起動時にスクリーンを表示',
33+
'SHOW_ON_STARTUP_NOTE': 'いつでも設定メニューから設定を変更できます。',
34+
};

0 commit comments

Comments
 (0)