diff --git a/src/js/intl/strings.js b/src/js/intl/strings.js index c79932f1..b136e2eb 100755 --- a/src/js/intl/strings.js +++ b/src/js/intl/strings.js @@ -1925,5 +1925,59 @@ exports.strings = { 'en_US': 'Confirm', 'pl' : 'Dalej', 'ta_IN': 'உறுதிப்படுத்தவும்' - } + }, + /////////////////////////////////////////////////////////////////////////// + 'level-label': { + '__desc__': 'Label in the top of the left-side menu. Rembember to leave some space on the sides', + 'en_US': ' Level ', + 'pl' : ' Poziom ' + }, + /////////////////////////////////////////////////////////////////////////// + 'command-helper-bar-levels': { + '__desc__': 'Levels command label in the bottom command helper bar.', + 'en_US': 'Levels', + 'pl' : 'Poziomy' + }, + /////////////////////////////////////////////////////////////////////////// + 'command-helper-bar-solution': { + '__desc__': 'Solution command label in the bottom command helper bar.', + 'en_US': 'Solution', + 'pl' : 'Rozwiązanie' + }, + /////////////////////////////////////////////////////////////////////////// + 'command-helper-bar-reset': { + '__desc__': 'Reset command label in the bottom command helper bar.', + 'en_US': 'Reset', + 'pl' : 'Wyczyść' + }, + /////////////////////////////////////////////////////////////////////////// + 'command-helper-bar-undo': { + '__desc__': 'Undo command label in the bottom command helper bar.', + 'en_US': 'Undo', + 'pl' : 'Cofnij' + }, + /////////////////////////////////////////////////////////////////////////// + 'command-helper-bar-objective': { + '__desc__': 'Objective command label in the bottom command helper bar.', + 'en_US': 'Objective', + 'pl' : 'Cel' + }, + /////////////////////////////////////////////////////////////////////////// + 'command-helper-bar-help': { + '__desc__': 'Help command label in the bottom command helper bar.', + 'en_US': 'Help', + 'pl' : 'Pomoc' + }, + /////////////////////////////////////////////////////////////////////////// + 'error-command-currently-not-supported': { + '__desc__': 'Message that appears in git console when command is not supported in the current environment.', + 'en_US': 'That command is valid, but not supported in this current environment! Try entering a level or level builder to use that command', + 'pl' : 'To polecenie jest poprawne, ale nie jest obsługiwane w obecnym środowisku! Spróbuj wybrać poziom lub włączyć konstruktor poziomów, aby użyć tej komendy' + }, + /////////////////////////////////////////////////////////////////////////// + 'git-error-command-not-supported': { + '__desc__': 'Message that appears in git console when command is not supported in the current environment.', + 'en_US': 'The command "{command}" isn\'t supported, sorry!', + 'pl' : 'Polecenie "{command}" niestety nie jest obsługiwane.' + }, }; diff --git a/src/js/models/collections.js b/src/js/models/collections.js index 59800aa2..c1428c06 100644 --- a/src/js/models/collections.js +++ b/src/js/models/collections.js @@ -8,6 +8,8 @@ var Tag = require('../git').Tag; var Command = require('../models/commandModel').Command; var TIME = require('../util/constants').TIME; +var intl = require('../intl'); + var CommitCollection = Backbone.Collection.extend({ model: Commit }); @@ -94,8 +96,7 @@ var CommandBuffer = Backbone.Model.extend({ if (!numListeners) { var Errors = require('../util/errors'); command.set('error', new Errors.GitError({ - msg: 'That command is valid, but not supported in this current environment!' + - ' Try entering a level or level builder to use that command' + msg: intl.str('error-command-currently-not-supported') })); deferred.resolve(); return; diff --git a/src/js/models/commandModel.js b/src/js/models/commandModel.js index c487281d..0580f3d5 100644 --- a/src/js/models/commandModel.js +++ b/src/js/models/commandModel.js @@ -228,7 +228,11 @@ var Command = Backbone.Model.extend({ // if we reach here, this command is not supported :-/ this.set('error', new CommandProcessError({ - msg: 'The command "' + this.get('rawStr') + '" isn\'t supported, sorry!' + msg: intl.str( + 'git-error-command-not-supported', + { + command: this.get('rawStr') + }) }) ); }, diff --git a/src/js/react_views/CommandsHelperBarView.jsx b/src/js/react_views/CommandsHelperBarView.jsx index a3c43fe0..f6bd80b5 100644 --- a/src/js/react_views/CommandsHelperBarView.jsx +++ b/src/js/react_views/CommandsHelperBarView.jsx @@ -4,6 +4,7 @@ var HelperBarView = require('../react_views/HelperBarView.jsx'); var Main = require('../app'); var log = require('../log'); +var intl = require('../intl'); class CommandsHelperBarView extends React.Component { @@ -23,32 +24,32 @@ class CommandsHelperBarView extends React.Component { getItems() { return [{ - text: 'Levels', + text: intl.str('command-helper-bar-levels'), onClick: function() { this.fireCommand('levels'); }.bind(this), }, { - text: 'Solution', + text: intl.str('command-helper-bar-solution'), onClick: function() { this.fireCommand('show solution'); }.bind(this), }, { - text: 'Reset', + text: intl.str('command-helper-bar-reset'), onClick: function() { this.fireCommand('reset'); }.bind(this), }, { - text: 'Undo', + text: intl.str('command-helper-bar-undo'), onClick: function() { this.fireCommand('undo'); }.bind(this), }, { - text: 'Objective', + text: intl.str('command-helper-bar-objective'), onClick: function() { this.fireCommand('objective'); }.bind(this), }, { - text: 'Help', + text: intl.str('command-helper-bar-help'), onClick: function() { this.fireCommand('help general; git help'); }.bind(this) diff --git a/src/js/react_views/LevelToolbarView.jsx b/src/js/react_views/LevelToolbarView.jsx index b498df63..35a8a1b1 100644 --- a/src/js/react_views/LevelToolbarView.jsx +++ b/src/js/react_views/LevelToolbarView.jsx @@ -48,7 +48,7 @@ class LevelToolbarView extends React.Component {
- {' Level '} + { intl.str('level-label') } {this.props.name}