Skip to content

Commit af404a2

Browse files
committed
Added status_button translation in new Key = Text format.
Added title name as filename within the preview url.
1 parent 1d077bf commit af404a2

File tree

37 files changed

+371
-212
lines changed

37 files changed

+371
-212
lines changed

locales/deu/general.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* @fileoverview General Translation file (german).
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+
window['Locales'] = window['Locales'] || {};
21+
Locales['deu'] = Locales['deu'] || {};
22+
23+
24+
/**
25+
* @final
26+
* @export
27+
*/
28+
/* eslint-disable max-len */
29+
Object.assign(Locales['deu'], {
30+
'ABOUT': 'Über',
31+
'BACK': 'Zurück',
32+
'CANCEL': 'Abbrechen',
33+
'CLOSE': 'Schließen',
34+
'CONTINUE': 'Fortsetzen',
35+
'DONE': 'Fertig',
36+
'EXIT': 'Beenden',
37+
'HELP': 'Hilfe',
38+
'NEXT': 'Weiter',
39+
'NO': 'Nein',
40+
'OK': 'Ok',
41+
'SETTINGS': 'Einstellungen',
42+
'YES': 'Ja',
43+
});

locales/deu/status.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ Locales['deu'] = Locales['deu'] || {};
2727
*/
2828
/* eslint-disable max-len */
2929
Object.assign(Locales['deu'], {
30+
'STATUS_BUTTON_COLLAPSE_VIEW': 'Verkleinere die Ansicht',
31+
'STATUS_BUTTON_EXPAND_VIEW': 'Vergrößere die Ansicht',
32+
'STATUS_BUTTON_OPEN_IN_BROWSER': 'Öffne die Ansicht in einen neuen Browser Fenster',
33+
'STATUS_BUTTON_REFRESH_VIEW': 'Ansicht aktualisieren',
34+
'STATUS_BUTTON_RUN_CODE': 'Führe denn Code aus und aktualisiere die Ansicht',
35+
'STATUS_BUTTON_STOP_VIEW': 'Stoppt oder beendet die Ansicht',
36+
'STATUS_BUTTON_TERMINATE_VIEW': 'Beendet die Anischt',
3037
'STATUS_LOADED': 'Beendet nach $VAR$ Sekunden.',
3138
'STATUS_LOADING': 'Laded ...',
3239
'STATUS_PREPARE': 'Vorbereitung',

locales/deu/translation.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Locales['deu'] = Locales['deu'] || {};
2727
*/
2828
/* eslint-disable max-len */
2929
Object.assign(Locales['deu'], {
30-
'About': 'Über',
31-
'Advanced': 'Fortgeschrittener',
3230
'All': 'Alle',
3331
'Audio': 'Audio',
3432
'Automatically reloads the preview after a change on the editor content': 'Automatisches Neuladen der Vorschau nach einer Änderung des Editorinhalts',
@@ -37,9 +35,7 @@ Object.assign(Locales['deu'], {
3735
'Blockly file': 'Blockly Datei',
3836
'Bluetooth is disabled!': 'Bluetooth ist deaktiviert!',
3937
'Bouncing cubes': 'Hüpfende Würfel',
40-
'Cancel': 'Abbrechen',
4138
'Check Syntax...': 'Überprüfe Syntax...',
42-
'Close': 'Schließen',
4339
'Collapse Blockly editor.': 'Verkleinere den Block Editor.',
4440
'Collapse Preview': 'Verkleinere die Vorschau',
4541
'Collapse Text editor.': 'Verkleinere den Text Editor.',
@@ -59,7 +55,6 @@ Object.assign(Locales['deu'], {
5955
'Drop file here or click to select': 'Ziehe die Datei hier rein oder klicke auf Hochladen',
6056
'Empty project': 'Neues Projekt',
6157
'Example': 'Beispiel',
62-
'Exit': 'Beenden',
6358
'Expand Blockly editor': 'Vergrößere den Block Editor',
6459
'Expand Preview': 'Vergrößere die Vorschau',
6560
'Expand Text editor': 'Vergrößere den Text Editor',
@@ -72,7 +67,6 @@ Object.assign(Locales['deu'], {
7267
'Hello %s': 'Hallo %s',
7368
'Hello World': 'Hallo Welt',
7469
'Hello, World': 'Hallo, Welt',
75-
'Help': 'Hilfe',
7670
'Images': 'Bilder',
7771
'Input': 'Eingabe',
7872
'Inputs': 'Eingaben',
@@ -97,26 +91,20 @@ Object.assign(Locales['deu'], {
9791
'New file': 'Neue Datei',
9892
'New program': 'Neues Programm',
9993
'New project': 'Neues Projekt',
100-
'Next': 'Nächstes',
101-
'No': 'Nein',
10294
'Open Debug': 'Öffne Debug',
10395
'Open Google Drive file': 'Öffne eine Google Drive Datei',
10496
'Open Settings': 'Öffne die Einstellungen',
10597
'Open a Google Drive file...': 'Öffne eine Google Drive Datei...',
10698
'Open a local file...': 'Öffen eine Datei...',
10799
'Open file': 'Öffne Datei',
108-
'Open preview in new browser window': 'Öffne die Vorschau in einen neuen Browser Fenster',
109100
'Physics Sprite': 'Physik Sprite',
110101
'Preload': 'Vorrausladen',
111102
'Publish to Google Cloud...': 'Veröffentliche auf Google Cloud...',
112103
'Recent': 'Zuletzt',
113104
'Redo last change': 'Mache die letzte Änderung rückgängig',
114-
'Refresh preview': 'Aktualisiere die Vorschau',
115-
'Reload preview': 'Neuladen der Vorschau',
116105
'Render': 'Ausgabe',
117106
'Results shown are labeled for commercial reuse with modification.': 'Die angezeigten Ergebnisse sind für die erneute kommerzielle Verwendung mit Bearbeitung gekennzeichnet.',
118107
'Robots': 'Roboter',
119-
'Runs the code and update preview': 'Führe denn Code aus und aktualisiere die Vorschau',
120108
'Sample Files': 'Beispiel Dateien',
121109
'Save as Google Drive file': 'Speicher als Google Drive Datei',
122110
'Save as Google Drive file...': 'Speicher als Google Drive Datei...',
@@ -134,7 +122,6 @@ Object.assign(Locales['deu'], {
134122
'Start a new project': 'Starte ein neues Projekt',
135123
'Start building new code': 'Neuen Code aufbauen',
136124
'Start creating games': 'Ein Spiel erstellen',
137-
'Stops or terminates the preview': 'Stoppt oder beendet die Vorschau',
138125
'Switch from one game state to another game state': 'Wechsel von einem Spiel Modus zum anderen Spielmodus',
139126
'Switch to Blockly': 'Wechsel zu Blockly',
140127
'Switch to Editor': 'Wechsel zum Editor',
@@ -157,7 +144,6 @@ Object.assign(Locales['deu'], {
157144
'World wrap sprite': 'Welt wrap Sprite',
158145
'World': 'Welt',
159146
'Write many things on the screen with a repeating program (a loop)': 'Schreiben Sie viele Dinge auf mit einem sich wiederholenden Programm (eine Schleife)',
160-
'Yes': 'Ja',
161147
'acceleration': 'Beschleunigung',
162148
'add background image': 'füge Hintergrundbild hinzu',
163149
'add text': 'hinzufügen von Text',

locales/deu/welcome_screen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Object.assign(Locales['deu'], {
3434
'WELCOME_SCREEN_BEGINNER': 'Anfänger',
3535
'WELCOME_SCREEN_BEGINNER_TEXT': 'Lerne mit visuellen Blöcken zu Programmieren. Erstelle Schritt für Schritt ein Programm mit dem setzten, ziehen und ändern von Blöcken.',
3636
'WELCOME_SCREEN_BEGINNER_ACTION': 'Verwende den Anfänger Modus',
37-
'WELCOME_SCREEN_ADVANCED': 'Advanced',
37+
'WELCOME_SCREEN_ADVANCED': 'Fortgeschrittener',
3838
'WELCOME_SCREEN_ADVANCED_TEXT': ' Verwerden Sie eine höhere Programmiersprache wie JavaScript oder Python, um deinen Code zu schreiben.',
3939
'WELCOME_SCREEN_ADVANCED_ACTION': 'Verwende den Fortgeschrittener Modus',
4040
'WECLOME_SCREEN_SHOW_ON_STARTUP': 'Start Bildschirm anzeigen',

locales/eng/general.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* @fileoverview General 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] (Markus Bordihn)
19+
*/
20+
window['Locales'] = window['Locales'] || {};
21+
Locales['eng'] = Locales['eng'] || {};
22+
23+
24+
/**
25+
* @final
26+
* @export
27+
*/
28+
/* eslint-disable max-len */
29+
Object.assign(Locales['eng'], {
30+
'ABOUT': 'About',
31+
'BACK': 'Back',
32+
'CANCEL': 'Cancel',
33+
'CLOSE': 'Close',
34+
'CONTINUE': 'Continue',
35+
'DONE': 'Done',
36+
'EXIT': 'Exit',
37+
'HELP': 'Help',
38+
'NEXT': 'Next',
39+
'NO': 'No',
40+
'OK': 'Ok',
41+
'SETTINGS': 'Settings',
42+
'YES': 'Yes',
43+
});

locales/eng/status.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ Locales['eng'] = Locales['eng'] || {};
2727
*/
2828
/* eslint-disable max-len */
2929
Object.assign(Locales['eng'], {
30+
'STATUS_BUTTON_COLLAPSE_VIEW': 'Collapse view',
31+
'STATUS_BUTTON_EXPAND_VIEW': 'Expand view',
32+
'STATUS_BUTTON_OPEN_IN_BROWSER': 'Open view in new Browser window',
33+
'STATUS_BUTTON_REFRESH_VIEW': 'Refresh view',
34+
'STATUS_BUTTON_RUN_CODE': 'Runs the code and updates the view',
35+
'STATUS_BUTTON_STOP_VIEW': 'Stops or terminates the view',
36+
'STATUS_BUTTON_TERMINATE_VIEW': 'Terminate view',
3037
'STATUS_LOADED': 'Finished after $VAR$ seconds.',
3138
'STATUS_LOADING': 'Loading ...',
3239
'STATUS_PREPARE': 'Preparing',

locales/eng/translation.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Object.assign(Locales['eng'], {
3030
' steps)': ' steps)',
3131
'* You need to restart the application after enabling or disabling these options': '* You need to restart the application after enabling or disabling these options',
3232
'About Coding with Chrome': 'About Coding with Chrome',
33-
'About': 'About',
3433
'Address: {$address}': 'Address: {$address}',
3534
'Advanced Coding': 'Advanced Coding',
3635
'Advanced Mode': 'Advanced Mode',
@@ -121,7 +120,6 @@ Object.assign(Locales['eng'], {
121120
'Example that animates a triangle': 'Example that animates a triangle',
122121
'Example': 'Example',
123122
'Executes the code and send commands to the connected unit': 'Executes the code and send commands to the connected unit',
124-
'Exit': 'Exit',
125123
'Expand Blockly editor': 'Expand Blockly editor',
126124
'Experimental mode': 'Experimental mode',
127125
'File Library': 'File Library',
@@ -151,7 +149,6 @@ Object.assign(Locales['eng'], {
151149
'Hello World example': 'Hello World example',
152150
'Hello World': 'Hello World',
153151
'Hello, World': 'Hello, World',
154-
'Help': 'Help',
155152
'IR beacon': 'IR beacon',
156153
'IR remote': 'IR remote',
157154
'IR sensor change': 'IR sensor change',
@@ -207,8 +204,6 @@ Object.assign(Locales['eng'], {
207204
'New program': 'New program',
208205
'New project': 'new project',
209206
'New variable...': 'New variable...',
210-
'No': 'No',
211-
'OK': 'OK',
212207
'Open Debug': 'Open Debug',
213208
'Open Example': 'Open Example',
214209
'Open Google Drive file': 'Open Google Drive file',
@@ -270,7 +265,6 @@ Object.assign(Locales['eng'], {
270265
'Sets the wheel diameter': 'Sets the wheel diameter',
271266
'Sets the wheel width': 'Sets the wheel width',
272267
'Sets wheelbase': 'Sets wheelbase',
273-
'Settings': 'Settings',
274268
'Shared with me': 'Shared with me',
275269
'Show welcome screen': 'Show welcome screen',
276270
'Shows general information...': 'Shows general information...',
@@ -366,7 +360,6 @@ Object.assign(Locales['eng'], {
366360
'Write code in the simplified CoffeeScript language': 'Write code in the simplified CoffeeScript language',
367361
'Write code with Pencil Code': 'Write code with Pencil Code',
368362
'Write many things on the screen with a repeating program (a loop)': 'Write many things on the screen with a repeating program (a loop)',
369-
'Yes': 'Yes',
370363
'You need to restart the application after enabling or disabling any module': 'You need to restart the application after enabling or disabling any module',
371364
'acceleration': 'acceleration',
372365
'ambient light intensity': 'ambient light intensity',

src/cache/cache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ cwc.Cache = function(helper) {
4242
this.helper = helper;
4343

4444
/** @private {!number} */
45-
this.version = 3;
45+
this.version = 4;
4646

4747
/** @private {!cwc.utils.Database} */
4848
this.database_ = new cwc.utils.Database(this.name, this.version);

src/file_handler/file_handler.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,14 @@ cwc.fileHandler.File.prototype.getFilename = function() {
230230
};
231231

232232

233+
/**
234+
* @return {string}
235+
*/
236+
cwc.fileHandler.File.prototype.getSafeFilename = function() {
237+
return this.filename_.replace(/[^a-z0-9]/gi, '_').toLowerCase();
238+
};
239+
240+
233241
/**
234242
* @param {!string} ui
235243
*/
@@ -294,6 +302,14 @@ cwc.fileHandler.File.prototype.getFileTitle = function() {
294302
};
295303

296304

305+
/**
306+
* @return {string}
307+
*/
308+
cwc.fileHandler.File.prototype.getSafeFileTitle = function() {
309+
return this.getFileTitle().replace(/[^a-z0-9]/gi, '_').toLowerCase();
310+
};
311+
312+
297313
/**
298314
* @param {!Object} file_handler
299315
*/

src/file_handler/file_saver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ cwc.fileHandler.FileSaver.prototype.fileWriterHandler = function(
251251

252252

253253
/**
254-
* Returns and OS safe filename.
254+
* Returns an OS safe filename.
255255
* @param {!string} name
256256
* @return {!string}
257257
* @private

0 commit comments

Comments
 (0)