From: Cory Chaplin Date: Mon, 31 Mar 2014 14:15:26 +0000 (+0200) Subject: Merge remote branch 'origin/development' into text_themes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d27a09e5fdb30b7ee7d6b4f05591e82a00e1e222;p=KiwiIRC.git Merge remote branch 'origin/development' into text_themes Conflicts: client/build.js client/src/models/network.js client/src/translations/es.po server/settingsgenerator.js --- d27a09e5fdb30b7ee7d6b4f05591e82a00e1e222 diff --cc client/build.js index 008a44f,4b9df3b..0956e07 --- a/client/build.js +++ b/client/build.js @@@ -84,7 -81,11 +81,11 @@@ var source_files = __dirname + '/src/views/userbox.js', __dirname + '/src/views/channeltools.js', __dirname + '/src/views/channelinfo.js', - __dirname + '/src/views/texttheme.js' - ++ __dirname + '/src/views/texttheme.js', + __dirname + '/src/applets/settings.js', + __dirname + '/src/applets/chanlist.js', + __dirname + '/src/applets/scripteditor.js', + __dirname + '/src/applets/startup.js' ]; diff --cc client/src/models/network.js index 974bbf9,0374d06..23987bf --- a/client/src/models/network.js +++ b/client/src/models/network.js @@@ -168,11 -168,10 +168,15 @@@ // Trim any whitespace off the name channel_name = channel_name.trim(); + // If not a valid channel name, display a warning + if (!that.isChannelName(channel_name)) { + that.panels.server.addMsg('', styleText('client_models_network_channel_invalid_name', {'%T': translateText('client_models_network_channel_invalid_name'), '%C': channel_name})); + _kiwi.app.message.text(channel_name + ' ' + _kiwi.global.i18n.translate('client_models_network_channel_invalid_name').fetch(), {timeout: 5000}); + return; + // Add channel_prefix in front of the first channel if missing + if (that.get('channel_prefix').indexOf(channel_name[0]) === -1) { + // Could be many prefixes but '#' is highly likely the required one + channel_name = '#' + channel_name; } // Check if we have the panel already. If not, create it @@@ -491,11 -490,15 +495,15 @@@ panel = this.panels.server; } - panel.addMsg('[' + (event.nick||'') + ']', event.msg, 'notice', {time: event.time}); + panel.addMsg('[' + (event.nick||'') + ']', styleText('notice', {'%T': event.msg}), 'notice', {time: event.time}); - // Show this notice to the active panel if it didn't have a set target - if (!event.from_server && panel === this.panels.server && _kiwi.app.panels().active !== this.panels.server) + // Show this notice to the active panel if it didn't have a set target, but only in an active channel or query window + active_panel = _kiwi.app.panels().active; + + if (!event.from_server && panel === this.panels.server && active_panel !== this.panels.server) { + if (active_panel.isChannel() || active_panel.isQuery()) - active_panel.addMsg('[' + (event.nick||'') + ']', event.msg, 'notice', {time: event.time}); + _kiwi.app.panels().active.addMsg('[' + (event.nick||'') + ']', styleText('notice', {'%T': event.msg}), 'notice', {time: event.time}); + } } @@@ -844,10 -846,7 +852,7 @@@ display_params.shift(); } - if (event.trailing) - display_params.push(event.trailing); - - this.panels.server.addMsg('', '[' + event.command + '] ' + display_params.join(', ', '')); + this.panels.server.addMsg('', styleText('unknown_command', {'%T': '[' + event.command + '] ' + display_params.join(', ', '')})); } } diff --cc client/src/translations/es.po index d238f83,990c3a8..a19b369 --- a/client/src/translations/es.po +++ b/client/src/translations/es.po @@@ -179,7 -179,7 +179,7 @@@ msgstr "Error al conectarse a %s:%s (%s #: client/assets/src/models/channel.js msgid "client_models_channel_join" - msgstr "se ha unido" -msgstr "%s se ha ingresado" ++msgstr "se ha ingresado" #: msgid "client_models_channel_quit" diff --cc server/settingsgenerator.js index bf767fb,89d1d25..0f8b878 --- a/server/settingsgenerator.js +++ b/server/settingsgenerator.js @@@ -249,8 -243,13 +243,12 @@@ function addScripts(vars, debug) 'src/views/topicbar.js', 'src/views/userbox.js', 'src/views/channeltools.js', - 'src/views/channelinfo.js' - ], - [ + 'src/views/channelinfo.js', - 'src/views/texttheme.js' ++ 'src/views/texttheme.js', + 'src/applets/settings.js', + 'src/applets/chanlist.js', + 'src/applets/scripteditor.js', + 'src/applets/startup.js' ] ]); }