Browse Source

Merge branch 'translation'

j8
hristoterezov 10 years ago
parent
commit
f79651f806

+ 4
- 4
lang/main.json View File

95
         "less": "Show less",
95
         "less": "Show less",
96
         "more": "Show more",
96
         "more": "Show more",
97
         "address": "Address:",
97
         "address": "Address:",
98
-        "remoteports": "Remote ports:",
99
-        "localports": "Local ports:",
98
+        "remoteport_plural": "Remote ports:",
99
+        "localport_plural": "Local ports:",
100
         "remoteport": "Remote port:",
100
         "remoteport": "Remote port:",
101
         "localport": "Local port:",
101
         "localport": "Local port:",
102
         "localaddress": "Local address: ",
102
         "localaddress": "Local address: ",
103
-        "localaddresses": "Local addresses: ",
103
+        "localaddress_plural": "Local addresses: ",
104
         "remoteaddress": "Remote address: ",
104
         "remoteaddress": "Remote address: ",
105
-        "remoteaddresses": "Remote addresses: ",
105
+        "remoteaddress_plural": "Remote addresses: ",
106
         "transport": "Transport: ",
106
         "transport": "Transport: ",
107
         "bandwidth": "Estimated bandwidth:",
107
         "bandwidth": "Estimated bandwidth:",
108
         "na": "Come back here for connection information once the conference starts"
108
         "na": "Come back here for connection information once the conference starts"

+ 22
- 25
libs/app.bundle.js View File

6039
 
6039
 
6040
             }
6040
             }
6041
 
6041
 
6042
-            var local_address_key = "connectionindicator." +
6043
-                (data.localIP.length > 1? "localaddresses" : "localaddress");
6044
-            var remote_address_key = "connectionindicator." +
6045
-                (data.remoteIP.length > 1? "remoteaddresses" : "remoteaddress");
6042
+            var local_address_key = "connectionindicator.localaddress";
6043
+            var remote_address_key = "connectionindicator.remoteaddress";
6046
             var localTransport =
6044
             var localTransport =
6047
                 "<tr><td><span class='jitsipopover_blue' data-i18n='" +
6045
                 "<tr><td><span class='jitsipopover_blue' data-i18n='" +
6048
-                local_address_key +"'>" +
6049
-                    translate(local_address_key) + "</span></td><td> " +
6046
+                local_address_key +"' data-i18n-options='" +
6047
+                    JSON.stringify({count: data.localIP.length}) + "'>" +
6048
+                    translate(local_address_key, {count: data.localIP.length}) +
6049
+                    "</span></td><td> " +
6050
                 ConnectionIndicator.getStringFromArray(data.localIP) +
6050
                 ConnectionIndicator.getStringFromArray(data.localIP) +
6051
                 "</td></tr>";
6051
                 "</td></tr>";
6052
             transport =
6052
             transport =
6053
                 "<tr><td><span class='jitsipopover_blue' data-i18n='" +
6053
                 "<tr><td><span class='jitsipopover_blue' data-i18n='" +
6054
-                remote_address_key + "'>" +
6055
-                    translate(remote_address_key) + "</span></td><td> " +
6054
+                remote_address_key + "' data-i18n-options='" +
6055
+                    JSON.stringify({count: data.remoteIP.length}) + "'>" +
6056
+                    translate(remote_address_key,
6057
+                        {count: data.remoteIP.length}) +
6058
+                    "</span></td><td> " +
6056
                 ConnectionIndicator.getStringFromArray(data.remoteIP) +
6059
                 ConnectionIndicator.getStringFromArray(data.remoteIP) +
6057
                 "</td></tr>";
6060
                 "</td></tr>";
6058
 
6061
 
6059
-            var key_remote = "connectionindicator.",
6060
-                key_local = "connectionindicator.";
6061
-
6062
-            if(this.transport.length > 1)
6063
-            {
6064
-                key_remote += "remoteports";
6065
-                key_local += "localports";
6066
-            }
6067
-            else
6068
-            {
6069
-                key_remote += "remoteport";
6070
-                key_local += "localport";
6071
-            }
6062
+            var key_remote = "connectionindicator.remoteport",
6063
+                key_local = "connectionindicator.localport";
6072
 
6064
 
6073
             transport += "<tr>" +
6065
             transport += "<tr>" +
6074
                 "<td>" +
6066
                 "<td>" +
6075
                 "<span class='jitsipopover_blue' data-i18n='" + key_remote +
6067
                 "<span class='jitsipopover_blue' data-i18n='" + key_remote +
6076
-                "'>" +
6077
-                translate(key_remote) + "</span></td><td>";
6068
+                "' data-i18n-options='" +
6069
+                JSON.stringify({count: this.transport.length}) + "'>" +
6070
+                translate(key_remote, {count: this.transport.length}) +
6071
+                "</span></td><td>";
6078
             localTransport += "<tr>" +
6072
             localTransport += "<tr>" +
6079
                 "<td>" +
6073
                 "<td>" +
6080
                 "<span class='jitsipopover_blue' data-i18n='" + key_local +
6074
                 "<span class='jitsipopover_blue' data-i18n='" + key_local +
6081
-                "'>" +
6082
-                translate(key_local) + "</span></td><td>";
6075
+                "' data-i18n-options='" +
6076
+                JSON.stringify({count: this.transport.length}) + "'>" +
6077
+                translate(key_local, {count: this.transport.length}) +
6078
+                "</span></td><td>";
6083
 
6079
 
6084
             transport +=
6080
             transport +=
6085
                 ConnectionIndicator.getStringFromArray(data.remotePort);
6081
                 ConnectionIndicator.getStringFromArray(data.remotePort);
11643
     defaultValueFromContent: false,
11639
     defaultValueFromContent: false,
11644
     app: interfaceConfig.APP_NAME,
11640
     app: interfaceConfig.APP_NAME,
11645
     getAsync: false,
11641
     getAsync: false,
11642
+    defaultValueFromContent: false,
11646
     customLoad: function(lng, ns, options, done) {
11643
     customLoad: function(lng, ns, options, done) {
11647
         var resPath = "lang/__ns__-__lng__.json";
11644
         var resPath = "lang/__ns__-__lng__.json";
11648
         if(lng === languages.EN)
11645
         if(lng === languages.EN)

+ 21
- 25
modules/UI/videolayout/ConnectionIndicator.js View File

229
 
229
 
230
             }
230
             }
231
 
231
 
232
-            var local_address_key = "connectionindicator." +
233
-                (data.localIP.length > 1? "localaddresses" : "localaddress");
234
-            var remote_address_key = "connectionindicator." +
235
-                (data.remoteIP.length > 1? "remoteaddresses" : "remoteaddress");
232
+            var local_address_key = "connectionindicator.localaddress";
233
+            var remote_address_key = "connectionindicator.remoteaddress";
236
             var localTransport =
234
             var localTransport =
237
                 "<tr><td><span class='jitsipopover_blue' data-i18n='" +
235
                 "<tr><td><span class='jitsipopover_blue' data-i18n='" +
238
-                local_address_key +"'>" +
239
-                    translate(local_address_key) + "</span></td><td> " +
236
+                local_address_key +"' data-i18n-options='" +
237
+                    JSON.stringify({count: data.localIP.length}) + "'>" +
238
+                    translate(local_address_key, {count: data.localIP.length}) +
239
+                    "</span></td><td> " +
240
                 ConnectionIndicator.getStringFromArray(data.localIP) +
240
                 ConnectionIndicator.getStringFromArray(data.localIP) +
241
                 "</td></tr>";
241
                 "</td></tr>";
242
             transport =
242
             transport =
243
                 "<tr><td><span class='jitsipopover_blue' data-i18n='" +
243
                 "<tr><td><span class='jitsipopover_blue' data-i18n='" +
244
-                remote_address_key + "'>" +
245
-                    translate(remote_address_key) + "</span></td><td> " +
244
+                remote_address_key + "' data-i18n-options='" +
245
+                    JSON.stringify({count: data.remoteIP.length}) + "'>" +
246
+                    translate(remote_address_key,
247
+                        {count: data.remoteIP.length}) +
248
+                    "</span></td><td> " +
246
                 ConnectionIndicator.getStringFromArray(data.remoteIP) +
249
                 ConnectionIndicator.getStringFromArray(data.remoteIP) +
247
                 "</td></tr>";
250
                 "</td></tr>";
248
 
251
 
249
-            var key_remote = "connectionindicator.",
250
-                key_local = "connectionindicator.";
251
-
252
-            if(this.transport.length > 1)
253
-            {
254
-                key_remote += "remoteports";
255
-                key_local += "localports";
256
-            }
257
-            else
258
-            {
259
-                key_remote += "remoteport";
260
-                key_local += "localport";
261
-            }
252
+            var key_remote = "connectionindicator.remoteport",
253
+                key_local = "connectionindicator.localport";
262
 
254
 
263
             transport += "<tr>" +
255
             transport += "<tr>" +
264
                 "<td>" +
256
                 "<td>" +
265
                 "<span class='jitsipopover_blue' data-i18n='" + key_remote +
257
                 "<span class='jitsipopover_blue' data-i18n='" + key_remote +
266
-                "'>" +
267
-                translate(key_remote) + "</span></td><td>";
258
+                "' data-i18n-options='" +
259
+                JSON.stringify({count: this.transport.length}) + "'>" +
260
+                translate(key_remote, {count: this.transport.length}) +
261
+                "</span></td><td>";
268
             localTransport += "<tr>" +
262
             localTransport += "<tr>" +
269
                 "<td>" +
263
                 "<td>" +
270
                 "<span class='jitsipopover_blue' data-i18n='" + key_local +
264
                 "<span class='jitsipopover_blue' data-i18n='" + key_local +
271
-                "'>" +
272
-                translate(key_local) + "</span></td><td>";
265
+                "' data-i18n-options='" +
266
+                JSON.stringify({count: this.transport.length}) + "'>" +
267
+                translate(key_local, {count: this.transport.length}) +
268
+                "</span></td><td>";
273
 
269
 
274
             transport +=
270
             transport +=
275
                 ConnectionIndicator.getStringFromArray(data.remotePort);
271
                 ConnectionIndicator.getStringFromArray(data.remotePort);

+ 1
- 0
modules/translation/translation.js View File

26
     defaultValueFromContent: false,
26
     defaultValueFromContent: false,
27
     app: interfaceConfig.APP_NAME,
27
     app: interfaceConfig.APP_NAME,
28
     getAsync: false,
28
     getAsync: false,
29
+    defaultValueFromContent: false,
29
     customLoad: function(lng, ns, options, done) {
30
     customLoad: function(lng, ns, options, done) {
30
         var resPath = "lang/__ns__-__lng__.json";
31
         var resPath = "lang/__ns__-__lng__.json";
31
         if(lng === languages.EN)
32
         if(lng === languages.EN)

Loading…
Cancel
Save