diff --git a/lang/main.json b/lang/main.json index 458e2f820..9dcf5a5a6 100644 --- a/lang/main.json +++ b/lang/main.json @@ -95,14 +95,14 @@ "less": "Show less", "more": "Show more", "address": "Address:", - "remoteports": "Remote ports:", - "localports": "Local ports:", + "remoteport_plural": "Remote ports:", + "localport_plural": "Local ports:", "remoteport": "Remote port:", "localport": "Local port:", "localaddress": "Local address: ", - "localaddresses": "Local addresses: ", + "localaddress_plural": "Local addresses: ", "remoteaddress": "Remote address: ", - "remoteaddresses": "Remote addresses: ", + "remoteaddress_plural": "Remote addresses: ", "transport": "Transport: ", "bandwidth": "Estimated bandwidth:", "na": "Come back here for connection information once the conference starts" diff --git a/libs/app.bundle.js b/libs/app.bundle.js index d679a1c16..1802f4dbd 100644 --- a/libs/app.bundle.js +++ b/libs/app.bundle.js @@ -6039,47 +6039,43 @@ ConnectionIndicator.prototype.generateText = function () { } - var local_address_key = "connectionindicator." + - (data.localIP.length > 1? "localaddresses" : "localaddress"); - var remote_address_key = "connectionindicator." + - (data.remoteIP.length > 1? "remoteaddresses" : "remoteaddress"); + var local_address_key = "connectionindicator.localaddress"; + var remote_address_key = "connectionindicator.remoteaddress"; var localTransport = "" + - translate(local_address_key) + " " + + local_address_key +"' data-i18n-options='" + + JSON.stringify({count: data.localIP.length}) + "'>" + + translate(local_address_key, {count: data.localIP.length}) + + " " + ConnectionIndicator.getStringFromArray(data.localIP) + ""; transport = "" + - translate(remote_address_key) + " " + + remote_address_key + "' data-i18n-options='" + + JSON.stringify({count: data.remoteIP.length}) + "'>" + + translate(remote_address_key, + {count: data.remoteIP.length}) + + " " + ConnectionIndicator.getStringFromArray(data.remoteIP) + ""; - var key_remote = "connectionindicator.", - key_local = "connectionindicator."; - - if(this.transport.length > 1) - { - key_remote += "remoteports"; - key_local += "localports"; - } - else - { - key_remote += "remoteport"; - key_local += "localport"; - } + var key_remote = "connectionindicator.remoteport", + key_local = "connectionindicator.localport"; transport += "" + "" + "" + - translate(key_remote) + ""; + "' data-i18n-options='" + + JSON.stringify({count: this.transport.length}) + "'>" + + translate(key_remote, {count: this.transport.length}) + + ""; localTransport += "" + "" + "" + - translate(key_local) + ""; + "' data-i18n-options='" + + JSON.stringify({count: this.transport.length}) + "'>" + + translate(key_local, {count: this.transport.length}) + + ""; transport += ConnectionIndicator.getStringFromArray(data.remotePort); @@ -11643,6 +11639,7 @@ var defaultOptions = { defaultValueFromContent: false, app: interfaceConfig.APP_NAME, getAsync: false, + defaultValueFromContent: false, customLoad: function(lng, ns, options, done) { var resPath = "lang/__ns__-__lng__.json"; if(lng === languages.EN) diff --git a/modules/UI/videolayout/ConnectionIndicator.js b/modules/UI/videolayout/ConnectionIndicator.js index 44033ee23..0da668b13 100644 --- a/modules/UI/videolayout/ConnectionIndicator.js +++ b/modules/UI/videolayout/ConnectionIndicator.js @@ -229,47 +229,43 @@ ConnectionIndicator.prototype.generateText = function () { } - var local_address_key = "connectionindicator." + - (data.localIP.length > 1? "localaddresses" : "localaddress"); - var remote_address_key = "connectionindicator." + - (data.remoteIP.length > 1? "remoteaddresses" : "remoteaddress"); + var local_address_key = "connectionindicator.localaddress"; + var remote_address_key = "connectionindicator.remoteaddress"; var localTransport = "" + - translate(local_address_key) + " " + + local_address_key +"' data-i18n-options='" + + JSON.stringify({count: data.localIP.length}) + "'>" + + translate(local_address_key, {count: data.localIP.length}) + + " " + ConnectionIndicator.getStringFromArray(data.localIP) + ""; transport = "" + - translate(remote_address_key) + " " + + remote_address_key + "' data-i18n-options='" + + JSON.stringify({count: data.remoteIP.length}) + "'>" + + translate(remote_address_key, + {count: data.remoteIP.length}) + + " " + ConnectionIndicator.getStringFromArray(data.remoteIP) + ""; - var key_remote = "connectionindicator.", - key_local = "connectionindicator."; - - if(this.transport.length > 1) - { - key_remote += "remoteports"; - key_local += "localports"; - } - else - { - key_remote += "remoteport"; - key_local += "localport"; - } + var key_remote = "connectionindicator.remoteport", + key_local = "connectionindicator.localport"; transport += "" + "" + "" + - translate(key_remote) + ""; + "' data-i18n-options='" + + JSON.stringify({count: this.transport.length}) + "'>" + + translate(key_remote, {count: this.transport.length}) + + ""; localTransport += "" + "" + "" + - translate(key_local) + ""; + "' data-i18n-options='" + + JSON.stringify({count: this.transport.length}) + "'>" + + translate(key_local, {count: this.transport.length}) + + ""; transport += ConnectionIndicator.getStringFromArray(data.remotePort); diff --git a/modules/translation/translation.js b/modules/translation/translation.js index 3e46e455d..25bbcd53d 100644 --- a/modules/translation/translation.js +++ b/modules/translation/translation.js @@ -26,6 +26,7 @@ var defaultOptions = { defaultValueFromContent: false, app: interfaceConfig.APP_NAME, getAsync: false, + defaultValueFromContent: false, customLoad: function(lng, ns, options, done) { var resPath = "lang/__ns__-__lng__.json"; if(lng === languages.EN)