Skip to content

Commit 17a5bf8

Browse files
committed
Fixed smaller translations errors and console errors.
1 parent c9fd7c3 commit 17a5bf8

File tree

9 files changed

+50
-13
lines changed

9 files changed

+50
-13
lines changed

locales/deu/general.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ Locales['deu']['GENERAL'] = {
3030
'NO': 'Nein',
3131
'OK': 'Ok',
3232
'SETTINGS': 'Einstellungen',
33+
'UNSAVED_CHANGES': 'Änderungen wurden nicht gespeichert. Beenden?',
3334
'YES': 'Ja',
3435
};

locales/eng/general.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ Locales['eng']['GENERAL'] = {
3030
'NO': 'No',
3131
'OK': 'Ok',
3232
'SETTINGS': 'Settings',
33+
'UNSAVED_CHANGES': 'Changes have not been saved. Exit?',
3334
'YES': 'Yes',
3435
};

src/blocks/phaser/generators/blocks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Blockly.Blocks['phaser_generator_vertical_obstacle'] = {
2828
.appendField(Blockly.BlocksTemplate.point())
2929
.appendField(i18t('@@BLOCKS_PHASER__GENERATOR_VERTICAL_OBSTACLE'))
3030
.appendField(new Blockly.FieldDropdown(
31-
Blockly.BlocksHelper['phaser_image']('block')), 'sprite');
31+
Blockly.BlocksHelper['phaser_image']('obstacles')), 'sprite');
3232
this.appendValueInput('obstacles')
3333
.setCheck('Number')
3434
.setAlign(Blockly.ALIGN_RIGHT)

src/blocks/phaser/toolbox.soy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
{if $files}
9595
<category name="@@BLOCKS_PHASER__FILES" colour="150">
96-
<button text="{msg desc=""}BLOCKS_PHASER_OPEN_FILE_LIBRARY{/msg}" callbackKey="FILE_LIBRARY_MANAGMENT" />
96+
<button text="{msg desc=""}@@BLOCKS_PHASER__OPEN_FILE_LIBRARY{/msg}" callbackKey="FILE_LIBRARY_MANAGMENT" />
9797
{call .files data="all" /}
9898
</category>
9999
{/if}

src/blocks/phaser/toolbox_input.soy

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,39 @@
143143
</block>
144144
</statement>
145145
</block>
146-
</statement>
147-
</block>
146+
</statement>
147+
</block>
148+
149+
<block type="phaser_input_body">
150+
<statement name="CODE">
151+
<block type="controls_if">
152+
<value name="IF0">
153+
<block type="phaser_input_keyboard_key_is_pressed">
154+
<value name="key">
155+
<block type="variables_get">
156+
<field name="VAR">spacebar</field>
157+
</block>
158+
</value>
159+
</block>
160+
</value>
161+
<statement name="DO0">
162+
<block type="phaser_physics_arcade_sprite_adjust">
163+
<value name="variable">
164+
<block type="variables_get">
165+
<field name="VAR">player</field>
166+
</block>
167+
</value>
168+
<field name="property">velocity.y</field>
169+
<value name="value">
170+
<block type="math_number">
171+
<field name="NUM"></field>
172+
</block>
173+
</value>
174+
</block>
175+
</statement>
176+
</block>
177+
</statement>
178+
</block>
148179
{/if}
149180

150181
{if not $opt_show_create_blocks}

src/protocol/low-level/tcp/http_server.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ cwc.protocol.tcp.HTTPServer.prototype.httpResponse_ = function(content,
197197
}
198198
let statusCode = options['status_code'] || 200;
199199
chrome.sockets.tcp.getInfo(clientSocketId, function(socketInfo) {
200-
if (!socketInfo['connected']) {
200+
if (!socketInfo) {
201+
this.log_.error('Socket is not available yet!');
202+
return;
203+
} else if (!socketInfo['connected']) {
201204
this.log_.error('Socket is no longer connected', socketInfo);
202205
this.disconnectSocket_(clientSocketId);
203206
return;

src/ui/gui/gui.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,19 @@ cwc.ui.Gui.prototype.setFullscreen = function(fullscreen = true) {
157157
if (fullscreen) {
158158
if (this.isChromeApp_ && chrome.app.window) {
159159
chrome.app.window.current()['fullscreen']();
160-
} else if (goog.dom.fullscreen.isSupported()) {
160+
} else if (goog.dom.fullscreen.isSupported() &&
161+
!goog.dom.fullscreen.isFullScreen()) {
161162
goog.dom.fullscreen.requestFullScreen(document.documentElement);
162163
}
163-
} else {
164-
// Make sure to end Chrome window mode, to avoid any user confusions.
165-
if (this.isChromeApp_ && chrome.app.window &&
164+
165+
// Make sure to end Chrome window mode, to avoid any user confusions.
166+
} else if (this.isChromeApp_ && chrome.app.window &&
166167
(chrome.app.window.current()['isFullscreen']() ||
167168
chrome.app.window.current()['isMaximized']())) {
168169
chrome.app.window.current()['restore']();
169-
} else if (goog.dom.fullscreen.isSupported()) {
170+
} else if (goog.dom.fullscreen.isSupported() &&
171+
goog.dom.fullscreen.isFullScreen()) {
170172
goog.dom.fullscreen.exitFullScreen();
171-
}
172173
}
173174
};
174175

src/utils/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ cwc.utils.Helper.prototype.handleUnsavedChanges = function(func) {
450450
title: 'Unsaved Changes for',
451451
untranslated: ' ' + filename,
452452
};
453-
let content = 'Changes have not been saved. Exit?';
453+
let content = i18t('@@GENERAL__UNSAVED_CHANGES');
454454
let action = i18t('@@GENERAL__EXIT');
455455
dialogInstance.showActionCancel(title, content, action).then((answer) => {
456456
if (answer) {

third_party/codemirror

0 commit comments

Comments
 (0)