Added few missing translations

First of all:
+ bottom command bar labels
+ missing command translation
+ command not supported in current environment translation
This commit is contained in:
YourSenseiCreeper 2021-02-08 15:51:11 +01:00
parent 905845fa53
commit 38b19a6654
5 changed files with 71 additions and 11 deletions

View file

@ -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.'
},
};

View file

@ -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;

View file

@ -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')
})
})
);
},

View file

@ -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)

View file

@ -48,7 +48,7 @@ class LevelToolbarView extends React.Component {
<div className="clearfix">
<div className="levelNameWrapper">
<i className="icon-bolt"></i>
{' Level '}
{ intl.str('level-label') }
<span className="levelToolbarSpan">
{this.props.name}
</span>