Skip to content

Commit 28b7746

Browse files
committed
Merge branch 'therealeldaria-Swedish_Translation'
2 parents f11e561 + c777987 commit 28b7746

23 files changed

+1058
-22
lines changed

build/cwc/locales.js

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ closureBuilder.build({
108108

109109

110110
/**
111-
* JPN Translation.
111+
* FRA Translation.
112112
*/
113113
closureBuilder.build({
114-
name: 'Locales.jpn',
114+
name: 'Locales.fra',
115115
srcs: glob([
116-
'locales/_jpn.js',
117-
'locales/jpn/**/*.js',
116+
'locales/_fra.js',
117+
'locales/fra/**/*.js',
118118
]),
119119
externs: [
120120
'build/externs/locales.js',
@@ -125,17 +125,17 @@ closureBuilder.build({
125125
rewrite_polyfills: false,
126126
},
127127
},
128-
out: 'genfiles/core/js/locales/jpn.js',
128+
out: 'genfiles/core/js/locales/fra.js',
129129
});
130130

131131

132132
/**
133-
* KOR Translation.
133+
* HIN Translation.
134134
*/
135135
closureBuilder.build({
136-
name: 'Locales.kor',
136+
name: 'Locales.hin',
137137
srcs: glob([
138-
'locales/kor/translation.js',
138+
'locales/hin/translation.js',
139139
]),
140140
externs: [
141141
'build/externs/locales.js',
@@ -146,17 +146,18 @@ closureBuilder.build({
146146
rewrite_polyfills: false,
147147
},
148148
},
149-
out: 'genfiles/core/js/locales/kor.js',
149+
out: 'genfiles/core/js/locales/hin.js',
150150
});
151151

152152

153153
/**
154-
* HIN Translation.
154+
* JPN Translation.
155155
*/
156156
closureBuilder.build({
157-
name: 'Locales.hin',
157+
name: 'Locales.jpn',
158158
srcs: glob([
159-
'locales/hin/translation.js',
159+
'locales/_jpn.js',
160+
'locales/jpn/**/*.js',
160161
]),
161162
externs: [
162163
'build/externs/locales.js',
@@ -167,17 +168,17 @@ closureBuilder.build({
167168
rewrite_polyfills: false,
168169
},
169170
},
170-
out: 'genfiles/core/js/locales/hin.js',
171+
out: 'genfiles/core/js/locales/jpn.js',
171172
});
172173

174+
173175
/**
174-
* FRA Translation.
176+
* KOR Translation.
175177
*/
176178
closureBuilder.build({
177-
name: 'Locales.fra',
179+
name: 'Locales.kor',
178180
srcs: glob([
179-
'locales/_fra.js',
180-
'locales/fra/**/*.js',
181+
'locales/kor/translation.js',
181182
]),
182183
externs: [
183184
'build/externs/locales.js',
@@ -188,9 +189,32 @@ closureBuilder.build({
188189
rewrite_polyfills: false,
189190
},
190191
},
191-
out: 'genfiles/core/js/locales/fra.js',
192+
out: 'genfiles/core/js/locales/kor.js',
192193
});
193194

195+
196+
/**
197+
* SWE Translation.
198+
*/
199+
closureBuilder.build({
200+
name: 'Locales.swe',
201+
srcs: glob([
202+
'locales/_swe.js',
203+
'locales/swe/**/*.js',
204+
]),
205+
externs: [
206+
'build/externs/locales.js',
207+
],
208+
compress: true,
209+
options: {
210+
closure: {
211+
rewrite_polyfills: false,
212+
},
213+
},
214+
out: 'genfiles/core/js/locales/swe.js',
215+
});
216+
217+
194218
/**
195219
* VIE Translation.
196220
*/

build/external/extra_files.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ closureBuilder.build({
3939
});
4040

4141

42+
/**
43+
* Blockly translation
44+
*/
4245
closureBuilder.build({
4346
name: 'Blockly language files',
4447
resources: [
@@ -48,6 +51,7 @@ closureBuilder.build({
4851
BlocklyPath + 'msg/js/hi.js',
4952
BlocklyPath + 'msg/js/ja.js',
5053
BlocklyPath + 'msg/js/ko.js',
54+
BlocklyPath + 'msg/js/sv.js',
5155
BlocklyPath + 'msg/js/vi.js',
5256
],
5357
out: 'genfiles/third_party/external/blockly/msg/',

doc/I18N.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,29 @@ closureBuilder.build({
6666
});
6767
```
6868

69+
### Adjust Blockly translation build rule
70+
71+
Adjust the *Blockly translation* build rule in the file
72+
`build/external/extra_files.js` to include the new supported language.
73+
74+
Example for the "deu" translation:
75+
76+
```javascript
77+
/**
78+
* Blockly translation
79+
*/
80+
closureBuilder.build({
81+
name: 'Blockly language files',
82+
resources: [
83+
...
84+
BlocklyPath + 'msg/js/de.js',
85+
...
86+
],
87+
out: 'genfiles/third_party/external/blockly/msg/',
88+
});
89+
```
90+
91+
6992
Additional language support
7093
----------------------------
7194

locales/supported.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ Locales['supportedLanguages'] = [
3131
'fra',
3232
'hin',
3333
'jpn',
34+
'swe',
3435
'vie',
3536
];

locales/swe/_swe.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* @fileoverview Translation file (english).
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] (Brian Levinsen)
19+
*/
20+
window['Locales'] = window['Locales'] || {};
21+
Locales['swe'] = Locales['swe'] || {};

locales/swe/blockly.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* @fileoverview Blockly Translation file (english).
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] (Brian Levinsen)
19+
*/
20+
Locales['swe']['BLOCKLY'] = {
21+
'CREATE_NEW_VARIABLE': 'Skapa ny Variabel',
22+
};

locales/swe/blocks/blocks.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/**
2+
* @fileoverview Translation file for blocks (english).
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] (Markus Bordihn)
19+
*/
20+
Locales['swe']['BLOCKS'] = {
21+
'ALL': 'alla',
22+
'AND': 'och',
23+
'AS': 'som',
24+
'CHANGE': 'ändra',
25+
'CLEAR_DISPLAY': 'rensa_skärm',
26+
'CONTROL': 'Kontrollera',
27+
'DEFINE': 'definera',
28+
'DESTROY': 'förstör',
29+
'DISABLE': 'avaktivera',
30+
'DISPLAY': 'Visa',
31+
'DISPLAY_TEXT': 'visa text',
32+
'DO': 'gör',
33+
'DOWN': 'ner',
34+
'ENABLE': 'aktivera',
35+
'GROUP': 'gruppera',
36+
'HEIGHT': 'höjd',
37+
'IMMEDIATELY': 'omedelbart',
38+
'IN': 'in',
39+
'KILL': 'döda',
40+
'LEFT': 'vänster',
41+
'LISTS': 'Listor',
42+
'PADDING': 'stoppning',
43+
'REPEAT_FOREVER': 'repetera_för_evigt',
44+
'RIGHT': 'höger',
45+
'SEC': 'sek.',
46+
'SET': 'sätt',
47+
'TO': 'till',
48+
'UP': 'upp',
49+
'WAIT': 'vänta',
50+
'WHEN_FINISHED': 'när avslutad',
51+
'WIDTH': 'bredd',
52+
'WITH': 'med',
53+
};

locales/swe/blocks/phaser_blocks.js

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/**
2+
* @fileoverview Translation file for Phaser blocks (english).
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] (Markus Bordihn)
19+
*/
20+
/* eslint-disable max-len */
21+
Locales['swe']['BLOCKS_PHASER'] = {
22+
'AUDIO': 'Ljud',
23+
'AUDIO_ADD_BGM': 'som bakgrundsljud',
24+
'AUDIO_PAUSE': 'pausa ljud',
25+
'AUTOSTART': 'autostart',
26+
'CHECK_COLLISION_DOWN': 'kontrollera kollison ner',
27+
'CHECK_COLLISION_LEFT': 'kontrollera kollison vänster',
28+
'CHECK_COLLISION_RIGHT': 'kontrollera kollison höger',
29+
'CHECK_COLLISION_UP': 'kontrollera kollison upp',
30+
'COLLIDE_WITH': 'kollidera med',
31+
'COUNT_LIVING_OBJECTS': 'räkna levande objekt',
32+
'CREATE': 'Skapa',
33+
'EXAMPLE_FILES': 'Exempelfiler',
34+
'FILES': 'Filer',
35+
'GAME': 'Spel',
36+
'GAME_RESTART': 'Starta om spel',
37+
'GAME_START': 'starta spel',
38+
'GENERATOR': 'Generatorer',
39+
'GENERATOR_OBSTACLE': 'generera hinder',
40+
'GENERATOR_RANDOM_VERTICAL_OBSTACLE': 'generera slumpvis vertikala hinder',
41+
'GENERATOR_VERTICAL_OBSTACLE': 'generera vertikala hinder',
42+
'GROUP': 'Gruppera',
43+
'INPUT': 'Inmatning',
44+
'INPUTS': 'Ingångar',
45+
'KEYBOARD_CURSOR_KEYS': 'piltangenter',
46+
'KEYBOARD_KEY': 'tangentbordsknapp',
47+
'KEYBOARD_SPACEBAR': 'mellanrumstangenten',
48+
'KEYBOARD_WASD_KEYS': 'WASD-tangenter',
49+
'LOAD_AUDIO': 'ladda ljud',
50+
'LOAD_IMAGE': 'ladda bild',
51+
'MOUSE_KEYS': 'musknappar',
52+
'NO_AUTOSTART': 'ingen automatisk start',
53+
'ON_CREATE': 'vid skapande',
54+
'ON_OUT_OF_BOUNDS': 'vid utanför banan',
55+
'ON_PRELOAD': 'vid förprogrammering',
56+
'OPEN_FILE_LIBRARY': 'Öppna filbibliotek',
57+
'PHYSICS_ARCADE_ENABLE': 'aktivera arkadfysik för',
58+
'PHYSICS_SPRITE': 'Fysisk-Sprite',
59+
'PRELOAD': 'Förprogrammera',
60+
'RENDERER': 'Rendera',
61+
'SPRITE': 'Sprite',
62+
'TEXT': 'Textobjekt',
63+
'TILE_SPRITE': 'Tile Sprite',
64+
'TIME_LOOP_EVENT': 'repetera varje',
65+
'UPDATE': 'Uppdatera',
66+
'WORLD': 'Världen',
67+
'WORLD_ARCADE_PHYSICS': 'Världen-arkadfysik',
68+
'WORLD_SORT_DIRECTION': 'Världen-sorteringsriktning',
69+
};

locales/swe/blocks/robot_blocks.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**
2+
* @fileoverview Translation file for robot blocks (english).
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] (Markus Bordihn)
19+
*/
20+
/* eslint-disable max-len */
21+
Locales['swe']['BLOCKS_ROBOT'] = {
22+
'EVENTS': 'Event',
23+
'HEADING': 'riktning',
24+
'LIGHTS': 'Lampor',
25+
'MOVEMENTS': 'Förflyttning',
26+
'ON_COLLISION': 'vid kollision',
27+
'ON_POSITION_CHANGE': 'vid ändrad riktning',
28+
'RESET_ROBOT': 'nolställ robot',
29+
'ROLL_FOR': 'rulla',
30+
'ROLL_WITH': 'rulla med',
31+
'ROTATE': 'rotara',
32+
'SET_BACKLIGHT': 'sätt bakljus',
33+
'SET_BLINK': 'sätt blinka',
34+
'SET_COLOR': 'sätt färg',
35+
'SET_HEADING': 'sätt riktning',
36+
'SET_SPEED': 'sätt hastighet',
37+
'SET_STABILIZATION': 'sätt stabilisering',
38+
'SPEED': 'hastighet',
39+
'START': 'Programstart',
40+
'STOP_MOTORS': 'stanna motorer',
41+
};

0 commit comments

Comments
 (0)