Commit 96d904f3 authored by JC Brand's avatar JC Brand

Merge branch 'master' into skeleton

parents 768dcbda 35a542da
......@@ -8,6 +8,7 @@
.svn/
.project
.pydevproject
analytics.js
# Ruby/Sass/Bundler
.bundle
......
......@@ -55,6 +55,7 @@ cssmin:
grunt cssmin
release:
sed -i s/Project-Id-Version:\ Converse\.js\ [0-9]\.[0-9]\.[0-9]/Project-Id-Version:\ Converse.js\ $(VERSION)/ locale/converse.pot
sed -i s/\"version\":\ \"[0-9]\.[0-9]\.[0-9]\"/\"version\":\ \"$(VERSION)\"/ bower.json
sed -i s/\"version\":\ \"[0-9]\.[0-9]\.[0-9]\"/\"version\":\ \"$(VERSION)\"/ package.json
sed -i s/v[0-9]\.[0-9]\.[0-9]\.zip/v$(VERSION)\.zip/ index.html
......@@ -64,6 +65,7 @@ release:
sed -i "s/(Unreleased)/(`date +%Y-%m-%d`)/" docs/CHANGES.rst
make pot
make po
make po2json
make build
########################################################################
......
......@@ -33,7 +33,7 @@ It has the following features:
* Messages appear in all connnected chat clients `XEP 280 <http://xmpp.org/extensions/xep-0280.html>`_
* Typing and chat state notifications `XEP 85 <http://xmpp.org/extensions/xep-0085.html>`_
* Third person messages (/me )
* Translated into 14 languages
* Translated into 15 languages
* Off-the-record encryption
-----------
......
{
"name": "converse",
"version": "0.8.5",
"version": "0.8.6",
"devDependencies": {
"jasmine": "https://github.com/jcbrand/jasmine.git#1_3_x",
"otr": "0.2.12",
......
......@@ -13139,7 +13139,15 @@ var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments
with(obj||{}){
__p+='<form id="converse-register">\n <span class="reg-feedback"></span>\n <label>'+
((__t=(label_domain))==null?'':__t)+
'</label>\n <input type="text" name="domain" placeholder=" e.g. conversejs.org">\n <p class="form-help">Tip: A list of public XMPP providers is available <a href="https://xmpp.net/directory.php" class="url" target="_blank">here</a>.</p>\n <input class="submit" type="submit" value="'+
'</label>\n <input type="text" name="domain" placeholder="'+
((__t=(domain_placeholder))==null?'':__t)+
'">\n <p class="form-help">'+
((__t=(help_providers))==null?'':__t)+
' <a href="'+
((__t=(href_providers))==null?'':__t)+
'" class="url" target="_blank">'+
((__t=(help_providers_link))==null?'':__t)+
'</a>.</p>\n <input class="submit" type="submit" value="'+
((__t=(label_register))==null?'':__t)+
'">\n</form>\n';
}
......@@ -27926,21 +27934,26 @@ define("converse-dependencies", [
bosh_service_url: undefined, // The BOSH connection manager URL.
cache_otr_key: false,
debug: false,
domain_placeholder: " e.g. conversejs.org", // Placeholder text shown in the domain input on the registration form
default_box_height: 400, // The default height, in pixels, for the control box, chat boxes and chatrooms.
expose_rid_and_sid: false,
forward_messages: false,
hide_muc_server: false,
hide_offline_users: false,
i18n: locales.en,
jid: undefined,
keepalive: false,
message_carbons: false,
no_trimming: false, // Set to true for phantomjs tests (where browser apparently has no width)
play_sounds: false,
prebind: false,
providers_link: 'https://xmpp.net/directory.php', // Link to XMPP providers shown on registration page
rid: undefined,
roster_groups: false,
show_controlbox_by_default: false,
show_only_online_users: false,
show_toolbar: true,
sid: undefined,
storage: 'session',
use_otr_by_default: false,
use_vcards: true,
......@@ -30099,17 +30112,18 @@ define("converse-dependencies", [
var $form= this.$el.find('form.chatroom-form'),
$stanza = $(stanza),
$fields = $stanza.find('field'),
title = $stanza.find('title').text();
title = $stanza.find('title').text(),
instructions = $stanza.find('instructions').text();
$form.find('span.spinner').remove();
$form.append($('<legend>').text(title));
if (instructions != title) {
$form.append($('<p class="instructions">').text(this.instructions));
if (instructions && instructions != title) {
$form.append($('<p class="instructions">').text(instructions));
}
_.each($fields, function (field) {
$form.append(utils.xForm2webForm(field));
$form.append(utils.xForm2webForm($(field), $stanza));
});
$form.append('<input type="submit" value="'+__('Save')+'"/>');
$form.append('<input type="button" value="'+__('Cancel')+'"/>');
$form.append('<input type="submit" class="save-submit" value="'+__('Save')+'"/>');
$form.append('<input type="button" class="cancel-submit" value="'+__('Cancel')+'"/>');
$form.on('submit', $.proxy(this.saveConfiguration, this));
$form.find('input[type=button]').on('click', $.proxy(this.cancelConfiguration, this));
},
......@@ -32174,7 +32188,11 @@ define("converse-dependencies", [
this.$parent.append(this.$el.html(
converse.templates.register_panel({
'label_domain': __("Your XMPP provider's domain name:"),
'label_register': __('Fetch registration form')
'label_register': __('Fetch registration form'),
'help_providers': __('Tip: A list of public XMPP providers is available'),
'help_providers_link': __('here'),
'href_providers': converse.providers_link,
'domain_placeholder': converse.domain_placeholder
})
));
this.$tabs.append(converse.templates.register_tab({label_register: __('Register')}));
......@@ -32579,6 +32597,9 @@ define("converse-dependencies", [
render: function () {
this.$tabs.append(converse.templates.login_tab({label_sign_in: __('Sign in')}));
this.$el.find('input#jid').focus();
if (!this.$el.is(':visible')) {
this.$el.show();
}
return this;
},
......@@ -32624,7 +32645,6 @@ define("converse-dependencies", [
converse.connection.connect(jid, password, converse.onConnect);
},
remove: function () {
this.$tabs.empty();
this.$el.parent().empty();
This diff is collapsed.
......@@ -13139,7 +13139,15 @@ var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments
with(obj||{}){
__p+='<form id="converse-register">\n <span class="reg-feedback"></span>\n <label>'+
((__t=(label_domain))==null?'':__t)+
'</label>\n <input type="text" name="domain" placeholder=" e.g. conversejs.org">\n <p class="form-help">Tip: A list of public XMPP providers is available <a href="https://xmpp.net/directory.php" class="url" target="_blank">here</a>.</p>\n <input class="submit" type="submit" value="'+
'</label>\n <input type="text" name="domain" placeholder="'+
((__t=(domain_placeholder))==null?'':__t)+
'">\n <p class="form-help">'+
((__t=(help_providers))==null?'':__t)+
' <a href="'+
((__t=(href_providers))==null?'':__t)+
'" class="url" target="_blank">'+
((__t=(help_providers_link))==null?'':__t)+
'</a>.</p>\n <input class="submit" type="submit" value="'+
((__t=(label_register))==null?'':__t)+
'">\n</form>\n';
}
......@@ -34683,21 +34691,26 @@ define("converse-dependencies", [
bosh_service_url: undefined, // The BOSH connection manager URL.
cache_otr_key: false,
debug: false,
domain_placeholder: " e.g. conversejs.org", // Placeholder text shown in the domain input on the registration form
default_box_height: 400, // The default height, in pixels, for the control box, chat boxes and chatrooms.
expose_rid_and_sid: false,
forward_messages: false,
hide_muc_server: false,
hide_offline_users: false,
i18n: locales.en,
jid: undefined,
keepalive: false,
message_carbons: false,
no_trimming: false, // Set to true for phantomjs tests (where browser apparently has no width)
play_sounds: false,
prebind: false,
providers_link: 'https://xmpp.net/directory.php', // Link to XMPP providers shown on registration page
rid: undefined,
roster_groups: false,
show_controlbox_by_default: false,
show_only_online_users: false,
show_toolbar: true,
sid: undefined,
storage: 'session',
use_otr_by_default: false,
use_vcards: true,
......@@ -36856,17 +36869,18 @@ define("converse-dependencies", [
var $form= this.$el.find('form.chatroom-form'),
$stanza = $(stanza),
$fields = $stanza.find('field'),
title = $stanza.find('title').text();
title = $stanza.find('title').text(),
instructions = $stanza.find('instructions').text();
$form.find('span.spinner').remove();
$form.append($('<legend>').text(title));
if (instructions != title) {
$form.append($('<p class="instructions">').text(this.instructions));
if (instructions && instructions != title) {
$form.append($('<p class="instructions">').text(instructions));
}
_.each($fields, function (field) {
$form.append(utils.xForm2webForm(field));
$form.append(utils.xForm2webForm($(field), $stanza));
});
$form.append('<input type="submit" value="'+__('Save')+'"/>');
$form.append('<input type="button" value="'+__('Cancel')+'"/>');
$form.append('<input type="submit" class="save-submit" value="'+__('Save')+'"/>');
$form.append('<input type="button" class="cancel-submit" value="'+__('Cancel')+'"/>');
$form.on('submit', $.proxy(this.saveConfiguration, this));
$form.find('input[type=button]').on('click', $.proxy(this.cancelConfiguration, this));
},
......@@ -38931,7 +38945,11 @@ define("converse-dependencies", [
this.$parent.append(this.$el.html(
converse.templates.register_panel({
'label_domain': __("Your XMPP provider's domain name:"),
'label_register': __('Fetch registration form')
'label_register': __('Fetch registration form'),
'help_providers': __('Tip: A list of public XMPP providers is available'),
'help_providers_link': __('here'),
'href_providers': converse.providers_link,
'domain_placeholder': converse.domain_placeholder
})
));
this.$tabs.append(converse.templates.register_tab({label_register: __('Register')}));
......@@ -39336,6 +39354,9 @@ define("converse-dependencies", [
render: function () {
this.$tabs.append(converse.templates.login_tab({label_sign_in: __('Sign in')}));
this.$el.find('input#jid').focus();
if (!this.$el.is(':visible')) {
this.$el.show();
}
return this;
},
......@@ -39381,7 +39402,6 @@ define("converse-dependencies", [
converse.connection.connect(jid, password, converse.onConnect);
},
remove: function () {
this.$tabs.empty();
this.$el.parent().empty();
This diff is collapsed.
......@@ -13139,7 +13139,15 @@ var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments
with(obj||{}){
__p+='<form id="converse-register">\n <span class="reg-feedback"></span>\n <label>'+
((__t=(label_domain))==null?'':__t)+
'</label>\n <input type="text" name="domain" placeholder=" e.g. conversejs.org">\n <p class="form-help">Tip: A list of public XMPP providers is available <a href="https://xmpp.net/directory.php" class="url" target="_blank">here</a>.</p>\n <input class="submit" type="submit" value="'+
'</label>\n <input type="text" name="domain" placeholder="'+
((__t=(domain_placeholder))==null?'':__t)+
'">\n <p class="form-help">'+
((__t=(help_providers))==null?'':__t)+
' <a href="'+
((__t=(href_providers))==null?'':__t)+
'" class="url" target="_blank">'+
((__t=(help_providers_link))==null?'':__t)+
'</a>.</p>\n <input class="submit" type="submit" value="'+
((__t=(label_register))==null?'':__t)+
'">\n</form>\n';
}
......@@ -42280,21 +42288,26 @@ define("converse-dependencies", [
bosh_service_url: undefined, // The BOSH connection manager URL.
cache_otr_key: false,
debug: false,
domain_placeholder: " e.g. conversejs.org", // Placeholder text shown in the domain input on the registration form
default_box_height: 400, // The default height, in pixels, for the control box, chat boxes and chatrooms.
expose_rid_and_sid: false,
forward_messages: false,
hide_muc_server: false,
hide_offline_users: false,
i18n: locales.en,
jid: undefined,
keepalive: false,
message_carbons: false,
no_trimming: false, // Set to true for phantomjs tests (where browser apparently has no width)
play_sounds: false,
prebind: false,
providers_link: 'https://xmpp.net/directory.php', // Link to XMPP providers shown on registration page
rid: undefined,
roster_groups: false,
show_controlbox_by_default: false,
show_only_online_users: false,
show_toolbar: true,
sid: undefined,
storage: 'session',
use_otr_by_default: false,
use_vcards: true,
......@@ -44453,17 +44466,18 @@ define("converse-dependencies", [
var $form= this.$el.find('form.chatroom-form'),
$stanza = $(stanza),
$fields = $stanza.find('field'),
title = $stanza.find('title').text();
title = $stanza.find('title').text(),
instructions = $stanza.find('instructions').text();
$form.find('span.spinner').remove();
$form.append($('<legend>').text(title));
if (instructions != title) {
$form.append($('<p class="instructions">').text(this.instructions));
if (instructions && instructions != title) {
$form.append($('<p class="instructions">').text(instructions));
}
_.each($fields, function (field) {
$form.append(utils.xForm2webForm(field));
$form.append(utils.xForm2webForm($(field), $stanza));
});
$form.append('<input type="submit" value="'+__('Save')+'"/>');
$form.append('<input type="button" value="'+__('Cancel')+'"/>');
$form.append('<input type="submit" class="save-submit" value="'+__('Save')+'"/>');
$form.append('<input type="button" class="cancel-submit" value="'+__('Cancel')+'"/>');
$form.on('submit', $.proxy(this.saveConfiguration, this));
$form.find('input[type=button]').on('click', $.proxy(this.cancelConfiguration, this));
},
......@@ -46528,7 +46542,11 @@ define("converse-dependencies", [
this.$parent.append(this.$el.html(
converse.templates.register_panel({
'label_domain': __("Your XMPP provider's domain name:"),
'label_register': __('Fetch registration form')
'label_register': __('Fetch registration form'),
'help_providers': __('Tip: A list of public XMPP providers is available'),
'help_providers_link': __('here'),
'href_providers': converse.providers_link,
'domain_placeholder': converse.domain_placeholder
})
));
this.$tabs.append(converse.templates.register_tab({label_register: __('Register')}));
......@@ -46933,6 +46951,9 @@ define("converse-dependencies", [
render: function () {
this.$tabs.append(converse.templates.login_tab({label_sign_in: __('Sign in')}));
this.$el.find('input#jid').focus();
if (!this.$el.is(':visible')) {
this.$el.show();
}
return this;
},
......@@ -46978,7 +46999,6 @@ define("converse-dependencies", [
converse.connection.connect(jid, password, converse.onConnect);
},
remove: function () {
this.$tabs.empty();
this.$el.parent().empty();
This diff is collapsed.
......@@ -2805,7 +2805,15 @@ var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments
with(obj||{}){
__p+='<form id="converse-register">\n <span class="reg-feedback"></span>\n <label>'+
((__t=(label_domain))==null?'':__t)+
'</label>\n <input type="text" name="domain" placeholder=" e.g. conversejs.org">\n <p class="form-help">Tip: A list of public XMPP providers is available <a href="https://xmpp.net/directory.php" class="url" target="_blank">here</a>.</p>\n <input class="submit" type="submit" value="'+
'</label>\n <input type="text" name="domain" placeholder="'+
((__t=(domain_placeholder))==null?'':__t)+
'">\n <p class="form-help">'+
((__t=(help_providers))==null?'':__t)+
' <a href="'+
((__t=(href_providers))==null?'':__t)+
'" class="url" target="_blank">'+
((__t=(help_providers_link))==null?'':__t)+
'</a>.</p>\n <input class="submit" type="submit" value="'+
((__t=(label_register))==null?'':__t)+
'">\n</form>\n';
}
......@@ -31946,21 +31954,26 @@ define("converse-dependencies", [
bosh_service_url: undefined, // The BOSH connection manager URL.
cache_otr_key: false,
debug: false,
domain_placeholder: " e.g. conversejs.org", // Placeholder text shown in the domain input on the registration form
default_box_height: 400, // The default height, in pixels, for the control box, chat boxes and chatrooms.
expose_rid_and_sid: false,
forward_messages: false,
hide_muc_server: false,
hide_offline_users: false,
i18n: locales.en,
jid: undefined,
keepalive: false,
message_carbons: false,
no_trimming: false, // Set to true for phantomjs tests (where browser apparently has no width)
play_sounds: false,
prebind: false,
providers_link: 'https://xmpp.net/directory.php', // Link to XMPP providers shown on registration page
rid: undefined,
roster_groups: false,
show_controlbox_by_default: false,
show_only_online_users: false,
show_toolbar: true,
sid: undefined,
storage: 'session',
use_otr_by_default: false,
use_vcards: true,
......@@ -34119,17 +34132,18 @@ define("converse-dependencies", [
var $form= this.$el.find('form.chatroom-form'),
$stanza = $(stanza),
$fields = $stanza.find('field'),
title = $stanza.find('title').text();
title = $stanza.find('title').text(),
instructions = $stanza.find('instructions').text();
$form.find('span.spinner').remove();
$form.append($('<legend>').text(title));
if (instructions != title) {
$form.append($('<p class="instructions">').text(this.instructions));
if (instructions && instructions != title) {
$form.append($('<p class="instructions">').text(instructions));
}
_.each($fields, function (field) {
$form.append(utils.xForm2webForm(field));
$form.append(utils.xForm2webForm($(field), $stanza));
});
$form.append('<input type="submit" value="'+__('Save')+'"/>');
$form.append('<input type="button" value="'+__('Cancel')+'"/>');
$form.append('<input type="submit" class="save-submit" value="'+__('Save')+'"/>');
$form.append('<input type="button" class="cancel-submit" value="'+__('Cancel')+'"/>');
$form.on('submit', $.proxy(this.saveConfiguration, this));
$form.find('input[type=button]').on('click', $.proxy(this.cancelConfiguration, this));
},
......@@ -36194,7 +36208,11 @@ define("converse-dependencies", [
this.$parent.append(this.$el.html(
converse.templates.register_panel({
'label_domain': __("Your XMPP provider's domain name:"),
'label_register': __('Fetch registration form')
'label_register': __('Fetch registration form'),
'help_providers': __('Tip: A list of public XMPP providers is available'),
'help_providers_link': __('here'),
'href_providers': converse.providers_link,
'domain_placeholder': converse.domain_placeholder
})
));
this.$tabs.append(converse.templates.register_tab({label_register: __('Register')}));
......@@ -36599,6 +36617,9 @@ define("converse-dependencies", [
render: function () {
this.$tabs.append(converse.templates.login_tab({label_sign_in: __('Sign in')}));
this.$el.find('input#jid').focus();
if (!this.$el.is(':visible')) {
this.$el.show();
}
return this;
},
......@@ -36644,7 +36665,6 @@ define("converse-dependencies", [
converse.connection.connect(jid, password, converse.onConnect);
},
remove: function () {
this.$tabs.empty();
this.$el.parent().empty();
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -608,7 +608,15 @@ var __t, __p = '', __e = _.escape;
with (obj) {
__p += '<form id="converse-register">\n <span class="reg-feedback"></span>\n <label>' +
((__t = (label_domain)) == null ? '' : __t) +
'</label>\n <input type="text" name="domain" placeholder=" e.g. conversejs.org">\n <p class="form-help">Tip: A list of public XMPP providers is available <a href="https://xmpp.net/directory.php" class="url" target="_blank">here</a>.</p>\n <input class="submit" type="submit" value="' +
'</label>\n <input type="text" name="domain" placeholder="' +
((__t = (domain_placeholder)) == null ? '' : __t) +
'">\n <p class="form-help">' +
((__t = (help_providers)) == null ? '' : __t) +
' <a href="' +
((__t = (href_providers)) == null ? '' : __t) +
'" class="url" target="_blank">' +
((__t = (help_providers_link)) == null ? '' : __t) +
'</a>.</p>\n <input class="submit" type="submit" value="' +
((__t = (label_register)) == null ? '' : __t) +
'">\n</form>\n';
......
......@@ -164,9 +164,7 @@
// Logging
Strophe.log = function (level, msg) { console.log(level+' '+msg); };
Strophe.error = function (msg) {
console.log('ERROR: '+msg);
};
Strophe.error = function (msg) { console.log('ERROR: '+msg); };
// Add Strophe Namespaces
Strophe.addNamespace('REGISTER', 'jabber:iq:register');
......@@ -216,6 +214,11 @@
var OPENED = 'opened';
var CLOSED = 'closed';
// Translation machinery
// ---------------------
var __ = $.proxy(utils.__, this);
var ___ = utils.___;
// Default configuration values
// ----------------------------
var default_settings = {
......@@ -232,7 +235,7 @@
bosh_service_url: undefined, // The BOSH connection manager URL.
cache_otr_key: false,
debug: false,
domain_placeholder: " e.g. conversejs.org", // Placeholder text shown in the domain input on the registration form
domain_placeholder: __(" e.g. conversejs.org"), // Placeholder text shown in the domain input on the registration form
default_box_height: 400, // The default height, in pixels, for the control box, chat boxes and chatrooms.
expose_rid_and_sid: false,
forward_messages: false,
......@@ -286,10 +289,6 @@
// Only use OTR by default if allow OTR is enabled to begin with
this.use_otr_by_default = this.use_otr_by_default && this.allow_otr;
// Translation machinery
// ---------------------
var __ = $.proxy(utils.__, this);
var ___ = utils.___;
// Translation aware constants
// ---------------------------
var OTR_CLASS_MAPPING = {};
......@@ -3091,7 +3090,7 @@
this.model.messages.off('add',null,this);
this.remove();
this.model.maximize();
}, 200)
}, 200, true)
});
this.MinimizedChats = Backbone.Overview.extend({
......@@ -3230,10 +3229,13 @@
showInRoster: function () {
var chatStatus = this.get('chat_status');
if (converse.show_only_online_users && chatStatus !== 'online')
return false;
if (converse.hide_offline_users && chatStatus === 'offline')
if ((converse.show_only_online_users && chatStatus !== 'online') || (converse.hide_offline_users && chatStatus === 'offline')) {
// If pending or requesting, show
if ((this.get('ask') === 'subscribe') || (this.get('subscription') === 'from') || (this.get('requesting') === true)) {
return true;
}
return false;
}
return true;
}
});
......
This diff is collapsed.
Changelog
=========
0.8.6 (Unreleased)
0.8.8 (Unreleased)
------------------
* Norwegian Bokmål translations. [Andreas Lorentsen]
* Updated Afrikaans translations. [jcbrand]
0.8.6 (2014-12-07)
------------------
* Bugfix. Login panel didn't appear under certain conditions. [jcbrand]
......
......@@ -48,9 +48,9 @@ copyright = u'2014, JC Brand'
# built documents.
#
# The short X.Y version.
version = '0.8.5'
version = '0.8.6'
# The full version, including alpha/beta/rc tags.
release = '0.8.5'
release = '0.8.6'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -8,12 +8,9 @@ Setup and integration
.. _what-you-will-need:
------------------
What you will need
------------------
--------------
An XMPP server
==============
--------------
*Converse.js* implements `XMPP <http://xmpp.org/about-xmpp/>`_ as its
messaging protocol, and therefore needs to connect to an XMPP/Jabber
......@@ -26,8 +23,9 @@ You can find a list of public XMPP servers/providers on `xmpp.net <http://xmpp.n
servers that you can set up yourself on `xmpp.org <http://xmpp.org/xmpp-software/servers/>`_.
-------------------------
A BOSH Connection Manager
=========================
-------------------------
Your website and *Converse.js* use `HTTP <https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol>`_
as protocol to communicate with the webserver. HTTP connections are stateless and usually shortlived.
......@@ -53,7 +51,7 @@ The demo on the `Converse.js homepage <http://conversejs.org>`_ uses a connectio
This connection manager is available for testing purposes only, please don't use it in production.
Overcoming cross-domain request restrictions
--------------------------------------------
============================================
Lets say your domain is *example.org*, but the domain of your connection
manager is *example.com*.
......@@ -78,7 +76,7 @@ Apache/Nginx which serves the connection manager under the same domain as your
website. This will remove the need for any cross-domain XHR support.
For example:
~~~~~~~~~~~~
------------
Assuming your site is accessible on port ``80`` for the domain ``mysite.com``
and your connection manager manager is running at ``someothersite.com/http-bind``.
......@@ -90,7 +88,7 @@ the cross-domain restriction is ``mysite.com/http-bind`` and not
Your ``nginx`` or ``apache`` configuration will look as follows:
Nginx
~~~~~
-----
.. code-block:: nginx
......@@ -105,7 +103,7 @@ Nginx
}
Apache
~~~~~~
------
.. code-block:: apache
......@@ -116,13 +114,14 @@ Apache
</VirtualHost>
Server-side authentication
==========================
.. _`session-support`:
Prebinding and Single Session Support
-------------------------------------
----------------------
Single Session Support
----------------------
Server-side authentication
==========================
It's possible to enable single-site login, whereby users already
authenticated in your website will also automatically be logged in on the chat server,
......@@ -196,7 +195,7 @@ These values are then passed to converse.js's ``initialize`` method.
Example code for server-side prebinding
---------------------------------------
=======================================
* PHP:
See `xmpp-prebind-php <https://github.com/candy-chat/xmpp-prebind-php>`_ by
......
......@@ -14,26 +14,36 @@ Translations
./locale/locales.js those which you don't need. Remember to rebuild the
minified file afterwards.
The gettext POT file located in ./locale/converse.pot is the template
containing all translations and from which for each language an individual PO
----------------------------------------------
Updating the translations template (.pot file)
----------------------------------------------
The gettext `.pot` file located in
`./locale/converse.pot <https://github.com/jcbrand/converse.js/blob/master/locale/converse.pot>`_
is the template containing all translations and from which for each language an individual PO
file is generated.
The POT file contains all translateable strings extracted from converse.js.
The `.pot` file contains all translateable strings extracted from converse.js.
To make a user facing string translateable, wrap it in the double underscore helper
To make a user-facing string translateable, wrap it in the double underscore helper
function like so:
.. code-block:: javascript
__('This string will be translated at runtime');
After adding the string, you'll need to regenerate the POT file, like so:
After adding the string, you'll need to regenerate the POT file:
::
make pot
To create a new PO file for a language in which converse.js is not yet
-------------------------------------------
Making translations file for a new language
-------------------------------------------
To create a new translations file for a language in which converse.js is not yet
translated into, do the following
.. note:: In this example we use Polish (pl), you need to substitute 'pl' to your own language's code.
......@@ -43,7 +53,22 @@ translated into, do the following
mkdir -p ./locale/pl/LC_MESSAGES
msginit -i ./locale/converse.pot -o ./locale/pl/LC_MESSAGES/converse.po -l pl
You can then create or update the PO file for a specific language by doing the following:
Please make sure to add the following attributes at the top of the file (under
*Content-Transfer-Encoding*). They are required as configuration settings for Jed,
the Javascript translations library that we're using.
.. code-block:: po
"domain: converse\n"
"lang: pl\n"
"plural_forms: nplurals=2; plural=(n != 1);\n"
--------------------------------------
Updating an existing translations file
--------------------------------------
You can update the `.po` file for a specific language by doing the following:
.. note:: In this example we use German (de), you need to substitute 'de' to your own language's code.
......@@ -57,23 +82,17 @@ To do this for ALL languages, run:
make po
The resulting PO file is then what gets translated.
If you've created a new PO file, please make sure to add the following
attributes at the top of the file (under *Content-Transfer-Encoding*). They are
required as configuration settings for Jed, the Javascript translations library
that we're using.
The resulting `.po` file is then what gets translated.
.. code-block:: po
"domain: converse\n"
"lang: de\n"
"plural_forms: nplurals=2; plural=(n != 1);\n"
-----------------------------------------------------
Generating a Javascript file from a translations file
-----------------------------------------------------
Unfortunately `Jed <http://slexaxton.github.io/Jed>`_ cannot use the PO files directly. We have to generate from it
a file in JSON format and then put that in a .js file for the specific
language.
Unfortunately `Jed <http://slexaxton.github.io/Jed>`_, which we use for
translations in converse.js cannot use the `.po` files directly. We have
to generate from it a file in JSON format and then put that in a `.js` file
for the specific language.
To generate JSON from a PO file, you'll need po2json for node.js. Run the
following command to install it (npm being the node.js package manager):
......@@ -86,7 +105,7 @@ You can then convert the translations into JSON format:
::
po2json locale/de/LC_MESSAGES/converse.po locale/de/LC_MESSAGES/converse.json
po2json -p -f jed -d converse locale/de/LC_MESSAGES/converse.po locale/de/LC_MESSAGES/converse.json
Now from converse.json paste the data as a value for the "locale_data" key in the
object in the language's .js file.
......
......@@ -12,8 +12,15 @@
<link type="text/css" rel="stylesheet" media="screen" href="components/bootstrap/dist/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" media="screen" href="components/fontawesome/css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css/theme.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css/converse.css" />
<script data-main="main" src="components/requirejs/require.js"></script>
<link type="text/css" rel="stylesheet" media="screen" href="css/converse.min.css" />
<script type="text/javascript" src="analytics.js"></script>
<!-- Only for development: <script data-main="main" src="components/requirejs/require.js"></script> -->
<![if gte IE 9]>
<script src="builds/converse.website.min.js"></script>
<![endif]>
<!--[if lt IE 9]>
<script src="builds/converse.website-no-otr.min.js"></script>
<![endif]-->
</head>
<body id="page-top" data-spy="scroll" data-target=".navbar-custom">
......@@ -145,7 +152,7 @@
<li>Custom status messages</li>
<li>Typing notifications</li>
<li>Third person messages (/me )</li>
<li>Translated into 14 languages</li>
<li>Translated into 15 languages</li>
<li>Off-the-record encryption
</ul>
</div>
......@@ -205,6 +212,7 @@
<li>Follow me on <a href="http://twitter.com/jcopkode" target="_blank">Twitter</a>.</li>
<li>Chat with me via XMPP: <a href="xmpp:jc@opkode.com" class="xmpp JSnocheck" title="XMPP/Jabber">jc@opkode.com</a>.</li>
<li>For technical support, please write to the mailing list: <a href="mailto:conversejs@librelist.com">conversejs@librelist.com</a>.</li>
<li>Or ask in the Converse.js chat room: <a href="xmpp:discuss@conference.conversejs.org" class="xmpp JSnocheck" title="Converse.js chat room">discuss@conference.conversejs.org</a>.</li>
<li>Also check out the <a href="http://librelist.com/browser/conversejs" target="_blank">mailing list archives</a>.</li>
<li>Please file <a target="_blank" href="https://github.com/jcbrand/converse.js/issues">bugs on Github</a>.</li>
<li>I'm available for features and <a href="http://opkode.com/contact" target="_blank">consulting</a>.</li>
......@@ -216,12 +224,6 @@
</section>
</body>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">try { var pageTracker = _gat._getTracker("UA-2128260-8"); pageTracker._trackPageview(); } catch(err) {}</script>
<script>
require(['converse'], function (converse) {
(function () {
......@@ -246,7 +248,6 @@
event.preventDefault();
});
})();
converse.initialize({
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
i18n: locales['en'], // Refer to ./locale/locales.js to see which locales are supported
......@@ -255,7 +256,6 @@
play_sounds: true,
roster_groups: true,
show_controlbox_by_default: true,
debug: true,
xhr_user_search: false
});
});
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -18,11 +18,12 @@
'id',
'it',
'ja',
'nb',
'nl',
'pt_BR',
'ru',
'zh'
], function (jed, af, de, en, es, fr, he, hu, id, it, ja, nl, pt_BR, ru, zh) {
], function (jed, af, de, en, es, fr, he, hu, id, it, ja, nb, nl, pt_BR, ru, zh) {
root.locales = {
'af': af,
'de': de,
......@@ -34,6 +35,7 @@
'id': id,
'it': it,
'ja': ja,
'nb': nb,
'nl': nl,
'pt-br': pt_BR,
'ru': ru,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -68,6 +68,7 @@ require.config({
"id": "locale/id/LC_MESSAGES/id",
"it": "locale/it/LC_MESSAGES/it",
"ja": "locale/ja/LC_MESSAGES/ja",
"nb": "locale/nb/LC_MESSAGES/nb",
"nl": "locale/nl/LC_MESSAGES/nl",
"pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR",
"ru": "locale/ru/LC_MESSAGES/ru",
......
{
"name": "converse.js",
"version": "0.8.5",
"version": "0.8.6",
"description": "Browser based XMPP instant messaging client",
"main": "main.js",
"directories": {
......
......@@ -410,6 +410,44 @@
}, converse));
}, converse));
it("are shown in the roster when show_only_online_users", $.proxy(function () {
converse.show_only_online_users = true;
runs(function () {
_addContacts();
});
waits(50);
spyOn(this.rosterview, 'update').andCallThrough();
runs($.proxy(function () {
expect(this.rosterview.$el.is(':visible')).toEqual(true);
expect(this.rosterview.update).toHaveBeenCalled();
}, converse));
waits(300); // Needed, due to debounce
runs ($.proxy(function () {
expect(this.rosterview.$el.find('dd:visible').length).toBe(3);
expect(this.rosterview.$el.find('dt:visible').length).toBe(1);
}, converse));
converse.show_only_online_users = false;
}, converse));
it("are shown in the roster when hide_offline_users", $.proxy(function () {
converse.hide_offline_users = true;
runs(function () {
_addContacts();
});
waits(50);
spyOn(this.rosterview, 'update').andCallThrough();
runs($.proxy(function () {
expect(this.rosterview.$el.is(':visible')).toEqual(true);
expect(this.rosterview.update).toHaveBeenCalled();
}, converse));
waits(300); // Needed, due to debounce
runs ($.proxy(function () {
expect(this.rosterview.$el.find('dd:visible').length).toBe(3);
expect(this.rosterview.$el.find('dt:visible').length).toBe(1);
}, converse));
converse.hide_offline_users = false;
}, converse));
it("can be removed by the user", $.proxy(function () {
runs($.proxy(function () {
_addContacts();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment