Fixes some translation issues.
This commit is contained in:
parent
3747251821
commit
d2f95f3c81
2
Makefile
2
Makefile
|
@ -21,4 +21,4 @@ clean:
|
|||
|
||||
deploy:
|
||||
@mkdir -p $(DEPLOY_DIR) && cp $(OUTPUT_DIR)/*.bundle.js $(DEPLOY_DIR)
|
||||
|
||||
scp $(DEPLOY_DIR)/app.bundle.js hristo.jitsi.net:/srv/web/hristo.jitsi.net/$(DEPLOY_DIR)
|
||||
|
|
1
app.js
1
app.js
|
@ -14,6 +14,7 @@ var APP =
|
|||
this.xmpp = require("./modules/xmpp/xmpp");
|
||||
this.keyboardshortcut = require("./modules/keyboardshortcut/keyboardshortcut");
|
||||
this.translation = require("./modules/translation/translation");
|
||||
this.settings = require("./modules/settings/Settings");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
18
config.js
18
config.js
|
@ -1,9 +1,10 @@
|
|||
var config = {
|
||||
hosts: {
|
||||
domain: 'jitsi-meet.example.com',
|
||||
domain: 'hristo.jitsi.net',
|
||||
//anonymousdomain: 'guest.example.com',
|
||||
muc: 'conference.jitsi-meet.example.com', // FIXME: use XEP-0030
|
||||
bridge: 'jitsi-videobridge.jitsi-meet.example.com', // FIXME: use XEP-0030
|
||||
// anonymousdomain: 'guest.hristo.jitsi.net',
|
||||
muc: 'conference.hristo.jitsi.net', // FIXME: use XEP-0030
|
||||
bridge: 'jitsi-videobridge.hristo.jitsi.net', // FIXME: use XEP-0030
|
||||
//jirecon: 'jirecon.jitsi-meet.example.com',
|
||||
//call_control: 'callcontrol.jitsi-meet.example.com',
|
||||
//focus: 'focus.jitsi-meet.example.com' - defaults to 'focus.jitsi-meet.example.com'
|
||||
|
@ -12,11 +13,12 @@ var config = {
|
|||
// useStunTurn: true, // use XEP-0215 to fetch STUN and TURN server
|
||||
// useIPv6: true, // ipv6 support. use at your own risk
|
||||
useNicks: false,
|
||||
bosh: '//jitsi-meet.example.com/http-bind', // FIXME: use xep-0156 for that
|
||||
bosh: '//hristo.jitsi.net/http-bind', // FIXME: use xep-0156 for that
|
||||
clientNode: 'http://jitsi.org/jitsimeet', // The name of client node advertised in XEP-0115 'c' stanza
|
||||
//focusUserJid: 'focus@auth.jitsi-meet.example.com', // The real JID of focus participant - can be overridden here
|
||||
//defaultSipNumber: '', // Default SIP number
|
||||
defaultSipNumber: '123', // Default SIP number
|
||||
desktopSharing: 'ext', // Desktop sharing method. Can be set to 'ext', 'webrtc' or false to disable.
|
||||
// resolution: "1080",
|
||||
chromeExtensionId: 'diibjkoicjeejcmhdnailmkgecihlobk', // Id of desktop streamer Chrome extension
|
||||
desktopSharingSources: ['screen', 'window'],
|
||||
minChromeExtVersion: '0.1', // Required version of Chrome extension
|
||||
|
@ -26,9 +28,9 @@ var config = {
|
|||
channelLastN: -1, // The default value of the channel attribute last-n.
|
||||
adaptiveLastN: false,
|
||||
adaptiveSimulcast: false,
|
||||
useRtcpMux: true,
|
||||
useBundle: true,
|
||||
enableRecording: false,
|
||||
useRtcpMux: false,
|
||||
useBundle: false,
|
||||
enableRecording: true,
|
||||
enableWelcomePage: true,
|
||||
enableSimulcast: false,
|
||||
enableFirefoxSupport: false, //firefox support is still experimental, only one-to-one conferences with chrome focus
|
||||
|
|
|
@ -99,5 +99,7 @@
|
|||
width: 90px;
|
||||
height: 16px;
|
||||
padding-top: 4px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin: 15px auto 0px auto;
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
}
|
||||
|
||||
#settingsmenu button {
|
||||
width: 36%;
|
||||
left: 32%;
|
||||
width: 45%;
|
||||
left: 26%;
|
||||
padding: 0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
|
||||
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
|
||||
<script src="interface_config.js?v=5"></script>
|
||||
<script src="libs/app.bundle.js?v=31"></script>
|
||||
<script src="libs/app.bundle.js?v=32"></script>
|
||||
<script src="analytics.js?v=1"></script><!-- google analytics plugin -->
|
||||
<link rel="stylesheet" href="css/font.css?v=6"/>
|
||||
<link rel="stylesheet" href="css/toastr.css?v=1">
|
||||
|
|
|
@ -5,7 +5,7 @@ var interfaceConfig = {
|
|||
INITIAL_TOOLBAR_TIMEOUT: 20000,
|
||||
TOOLBAR_TIMEOUT: 4000,
|
||||
DEFAULT_REMOTE_DISPLAY_NAME: "Fellow Jitster",
|
||||
DEFAULT_DOMINANT_SPEAKER_DISPLAY_NAME: "Speaker",
|
||||
DEFAULT_DOMINANT_SPEAKER_DISPLAY_NAME: "speaker",
|
||||
DEFAULT_LOCAL_DISPLAY_NAME: "me",
|
||||
SHOW_JITSI_WATERMARK: true,
|
||||
JITSI_WATERMARK_LINK: "http://jitsi.org",
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
"connectionsettings": "Connection Settings",
|
||||
"poweredby": "powered by",
|
||||
"downloadlogs": "Download logs",
|
||||
"roomUrlDefaultMsg": "Your conference is currently being created...",
|
||||
"participant": "Participant",
|
||||
"me": "me",
|
||||
"speaker": "Speaker",
|
||||
"defaultNickname": "ex. __name__",
|
||||
"defaultPreziLink": "e.g. __url__",
|
||||
"welcomepage":{
|
||||
"go": "GO",
|
||||
"roomname": "Enter room name",
|
||||
|
@ -60,8 +66,8 @@
|
|||
},
|
||||
"bottomtoolbar": {
|
||||
"chat": "Open / close chat",
|
||||
"filmstrip": "Open / close contact list",
|
||||
"contactlist": "Show / hide film strip"
|
||||
"filmstrip": "Show / hide film strip",
|
||||
"contactlist": "Open / close contact list"
|
||||
},
|
||||
"chat":{
|
||||
"nickname": {
|
||||
|
@ -182,6 +188,11 @@
|
|||
"password": "password",
|
||||
"userPassword": "user password",
|
||||
"token": "token"
|
||||
|
||||
},
|
||||
"email":
|
||||
{
|
||||
"sharedKey": "This conference is password protected. Please use the following pin when joining:%0D%0A%0D%0A __sharedKey__ %0D%0A%0D%0A",
|
||||
"subject": "Invitation to a __appName__ (__conferenceName__)",
|
||||
"body": "Hey there, I%27d like to invite you to a __appName__ conference I%27ve just set up.%0D%0A%0D%0APlease click on the following link in order to join the conference.%0D%0A%0D%0A __roomUrl__%0D%0A%0D%0A__sharedKeyText__ Note that __appName__ is currently only supported by Chromium, Google Chrome and Opera, so you need to be using one of these browsers.%0D%0A%0D%0ATalk to you in a sec!"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -393,9 +393,8 @@ function updateChatConversation(from, displayName, message) {
|
|||
|
||||
function onMucJoined(jid, info) {
|
||||
Toolbar.updateRoomUrl(window.location.href);
|
||||
document.getElementById('localNick').appendChild(
|
||||
document.createTextNode(Strophe.getResourceFromJid(jid) + ' (me)')
|
||||
);
|
||||
var meHTML = APP.translation.generateTranslatonHTML("me");
|
||||
$("#localNick").html(Strophe.getResourceFromJid(jid) + " (" + meHTML + ")");
|
||||
|
||||
var settings = Settings.getSettings();
|
||||
// Add myself to the contact list.
|
||||
|
@ -408,7 +407,7 @@ function onMucJoined(jid, info) {
|
|||
? info.displayName : Strophe.getResourceFromJid(jid);
|
||||
|
||||
if (displayName)
|
||||
onDisplayNameChanged('localVideoContainer', displayName + ' (me)');
|
||||
onDisplayNameChanged('localVideoContainer', displayName);
|
||||
}
|
||||
|
||||
function initEtherpad(name) {
|
||||
|
|
|
@ -73,12 +73,15 @@ var Prezi = {
|
|||
buttons1.button2 = {title: backButton, value: true};
|
||||
var linkError = APP.translation.generateTranslatonHTML(
|
||||
"dialog.preziLinkError");
|
||||
var defaultUrl = APP.translation.translateString("defaultPreziLink",
|
||||
{url: "http://prezi.com/wz7vhjycl7e6/my-prezi"});
|
||||
var openPreziState = {
|
||||
state0: {
|
||||
html: '<h2>' + html + '</h2>' +
|
||||
'<input id="preziUrl" type="text" ' +
|
||||
'placeholder="e.g. ' +
|
||||
'http://prezi.com/wz7vhjycl7e6/my-prezi" autofocus>',
|
||||
'data-i18n="[placeholder]defaultPreziLink" data-i18n-options=\'' +
|
||||
JSON.stringify({"url": "http://prezi.com/wz7vhjycl7e6/my-prezi"}) +
|
||||
'\' placeholder="' + defaultUrl + '" autofocus>',
|
||||
persistent: false,
|
||||
buttons: buttons,
|
||||
defaultButton: 1,
|
||||
|
|
|
@ -38,9 +38,15 @@ function createAvatar(id) {
|
|||
*
|
||||
* @param displayName the display name to set
|
||||
*/
|
||||
function createDisplayNameParagraph(displayName) {
|
||||
function createDisplayNameParagraph(key, displayName) {
|
||||
var p = document.createElement('p');
|
||||
if(displayName)
|
||||
p.innerText = displayName;
|
||||
else if(key)
|
||||
{
|
||||
p.setAttribute("data-i18n",key);
|
||||
p.innerText = APP.translation.translateString(key);
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
@ -106,7 +112,7 @@ var ContactList = {
|
|||
};
|
||||
|
||||
newContact.appendChild(createAvatar(id));
|
||||
newContact.appendChild(createDisplayNameParagraph("Participant"));
|
||||
newContact.appendChild(createDisplayNameParagraph("participant"));
|
||||
|
||||
var clElement = contactlist.get(0);
|
||||
|
||||
|
|
|
@ -197,25 +197,16 @@ function inviteParticipants() {
|
|||
var sharedKeyText = "";
|
||||
if (sharedKey && sharedKey.length > 0) {
|
||||
sharedKeyText =
|
||||
"This conference is password protected. Please use the " +
|
||||
"following pin when joining:%0D%0A%0D%0A" +
|
||||
sharedKey + "%0D%0A%0D%0A";
|
||||
APP.translation.translateString("email.sharedKey",
|
||||
{sharedKey: sharedKey});
|
||||
}
|
||||
|
||||
var conferenceName = roomUrl.substring(roomUrl.lastIndexOf('/') + 1);
|
||||
var subject = "Invitation to a " + interfaceConfig.APP_NAME + " (" + conferenceName + ")";
|
||||
var body = "Hey there, I%27d like to invite you to a " + interfaceConfig.APP_NAME +
|
||||
" conference I%27ve just set up.%0D%0A%0D%0A" +
|
||||
"Please click on the following link in order" +
|
||||
" to join the conference.%0D%0A%0D%0A" +
|
||||
roomUrl +
|
||||
"%0D%0A%0D%0A" +
|
||||
sharedKeyText +
|
||||
"Note that " + interfaceConfig.APP_NAME + " is currently" +
|
||||
" only supported by Chromium," +
|
||||
" Google Chrome and Opera, so you need" +
|
||||
" to be using one of these browsers.%0D%0A%0D%0A" +
|
||||
"Talk to you in a sec!";
|
||||
var subject = APP.translation.translateString("email.subject",
|
||||
{appName:interfaceConfig.APP_NAME, conferenceName: conferenceName});
|
||||
var body = APP.translation.translateString("email.body",
|
||||
{appName:interfaceConfig.APP_NAME, sharedKeyText: sharedKeyText,
|
||||
roomUrl: roomUrl});
|
||||
|
||||
if (window.localStorage.displayname) {
|
||||
body += "%0D%0A%0D%0A" + window.localStorage.displayname;
|
||||
|
@ -409,16 +400,18 @@ var Toolbar = (function (my) {
|
|||
* Opens the invite link dialog.
|
||||
*/
|
||||
my.openLinkDialog = function () {
|
||||
var inviteLink;
|
||||
var inviteAttreibutes;
|
||||
|
||||
if (roomUrl === null) {
|
||||
inviteLink = "Your conference is currently being created...";
|
||||
inviteAttreibutes = 'data-i18n="[value]roomUrlDefaultMsg" value="' +
|
||||
APP.translation.translateString("roomUrlDefaultMsg") + '"';
|
||||
} else {
|
||||
inviteLink = encodeURI(roomUrl);
|
||||
inviteAttreibutes = "value=\"" + encodeURI(roomUrl) + "\"";
|
||||
}
|
||||
messageHandler.openTwoButtonDialog("dialog.shareLink",
|
||||
null, null,
|
||||
'<input id="inviteLinkRef" type="text" value="' +
|
||||
inviteLink + '" onclick="this.select();" readonly>',
|
||||
'<input id="inviteLinkRef" type="text" ' +
|
||||
inviteAttreibutes + ' onclick="this.select();" readonly>',
|
||||
false,
|
||||
"dialog.Invite",
|
||||
function (e, v) {
|
||||
|
|
|
@ -191,9 +191,10 @@ function getCameraVideoSize(videoWidth,
|
|||
/**
|
||||
* Sets the display name for the given video span id.
|
||||
*/
|
||||
function setDisplayName(videoSpanId, displayName) {
|
||||
function setDisplayName(videoSpanId, displayName, key) {
|
||||
var nameSpan = $('#' + videoSpanId + '>span.displayname');
|
||||
var defaultLocalDisplayName = interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME;
|
||||
var defaultLocalDisplayName = APP.translation.generateTranslatonHTML(
|
||||
interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
|
||||
|
||||
// If we already have a display name for this video.
|
||||
if (nameSpan.length > 0) {
|
||||
|
@ -202,14 +203,25 @@ function setDisplayName(videoSpanId, displayName) {
|
|||
if (nameSpanElement.id === 'localDisplayName' &&
|
||||
$('#localDisplayName').text() !== displayName) {
|
||||
if (displayName && displayName.length > 0)
|
||||
$('#localDisplayName').html(displayName + ' (me)');
|
||||
{
|
||||
var meHTML = APP.translation.generateTranslatonHTML("me");
|
||||
$('#localDisplayName').html(displayName + ' (' + meHTML + ')');
|
||||
}
|
||||
else
|
||||
$('#localDisplayName').text(defaultLocalDisplayName);
|
||||
$('#localDisplayName').html(defaultLocalDisplayName);
|
||||
} else {
|
||||
if (displayName && displayName.length > 0)
|
||||
{
|
||||
$('#' + videoSpanId + '_name').html(displayName);
|
||||
}
|
||||
else if (key && key.length > 0)
|
||||
{
|
||||
var nameHtml = APP.translation.generateTranslatonHTML(key);
|
||||
$('#' + videoSpanId + '_name').html(nameHtml);
|
||||
}
|
||||
else
|
||||
$('#' + videoSpanId + '_name').text(interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME);
|
||||
$('#' + videoSpanId + '_name').text(
|
||||
interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME);
|
||||
}
|
||||
} else {
|
||||
var editButton = null;
|
||||
|
@ -220,15 +232,22 @@ function setDisplayName(videoSpanId, displayName) {
|
|||
|
||||
if (videoSpanId === 'localVideoContainer') {
|
||||
editButton = createEditDisplayNameButton();
|
||||
nameSpan.innerText = defaultLocalDisplayName;
|
||||
if (displayName && displayName.length > 0) {
|
||||
var meHTML = APP.translation.generateTranslatonHTML("me");
|
||||
nameSpan.innerHTML = displayName + meHTML;
|
||||
}
|
||||
else
|
||||
nameSpan.innerHTML = defaultLocalDisplayName;
|
||||
}
|
||||
else {
|
||||
if (displayName && displayName.length > 0) {
|
||||
|
||||
nameSpan.innerText = displayName;
|
||||
}
|
||||
else
|
||||
nameSpan.innerText = interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME;
|
||||
}
|
||||
|
||||
if (displayName && displayName.length > 0) {
|
||||
nameSpan.innerText = displayName;
|
||||
}
|
||||
|
||||
if (!editButton) {
|
||||
nameSpan.id = videoSpanId + '_name';
|
||||
|
@ -245,11 +264,18 @@ function setDisplayName(videoSpanId, displayName) {
|
|||
|
||||
if (displayName && displayName.length) {
|
||||
editableText.value
|
||||
= displayName.substring(0, displayName.indexOf(' (me)'));
|
||||
= displayName;
|
||||
}
|
||||
|
||||
var defaultNickname = APP.translation.translateString(
|
||||
"defaultNickname", {name: "Jane Pink"});
|
||||
editableText.setAttribute('style', 'display:none;');
|
||||
editableText.setAttribute('placeholder', 'ex. Jane Pink');
|
||||
editableText.setAttribute('data-18n',
|
||||
'[placeholder]defaultNickname');
|
||||
editableText.setAttribute("data-i18n-options",
|
||||
JSON.stringify({name: "Jane Pink"}));
|
||||
editableText.setAttribute("placeholder", defaultNickname);
|
||||
|
||||
$('#' + videoSpanId)[0].appendChild(editableText);
|
||||
|
||||
$('#localVideoContainer .displayname')
|
||||
|
@ -1270,10 +1296,17 @@ var VideoLayout = (function (my) {
|
|||
|
||||
if (!$('#localDisplayName').is(":visible")) {
|
||||
if (NicknameHandler.getNickname())
|
||||
$('#localDisplayName').text(NicknameHandler.getNickname() + " (me)");
|
||||
{
|
||||
var meHTML = APP.translation.generateTranslatonHTML("me");
|
||||
$('#localDisplayName').html(NicknameHandler.getNickname() + " (" + meHTML + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
var defaultHTML = APP.translation.generateTranslatonHTML(
|
||||
interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
|
||||
$('#localDisplayName')
|
||||
.text(interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
|
||||
.html(defaultHTML);
|
||||
}
|
||||
$('#localDisplayName').show();
|
||||
}
|
||||
|
||||
|
@ -1796,17 +1829,20 @@ var VideoLayout = (function (my) {
|
|||
=== APP.xmpp.myResource())
|
||||
return;
|
||||
|
||||
var members = APP.xmpp.getMembers();
|
||||
// Update the current dominant speaker.
|
||||
if (resourceJid !== currentDominantSpeaker) {
|
||||
var oldSpeakerVideoSpanId = "participant_" + currentDominantSpeaker,
|
||||
newSpeakerVideoSpanId = "participant_" + resourceJid;
|
||||
if($("#" + oldSpeakerVideoSpanId + ">span.displayname").text() ===
|
||||
interfaceConfig.DEFAULT_DOMINANT_SPEAKER_DISPLAY_NAME) {
|
||||
var currentJID = APP.xmpp.findJidFromResource(currentDominantSpeaker);
|
||||
var newJID = APP.xmpp.findJidFromResource(resourceJid);
|
||||
if(currentDominantSpeaker && (!members || !members[currentJID] ||
|
||||
!members[currentJID].displayName)) {
|
||||
setDisplayName(oldSpeakerVideoSpanId, null);
|
||||
}
|
||||
if($("#" + newSpeakerVideoSpanId + ">span.displayname").text() ===
|
||||
interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME) {
|
||||
setDisplayName(newSpeakerVideoSpanId,
|
||||
if(resourceJid && (!members || !members[newJID] ||
|
||||
!members[newJID].displayName)) {
|
||||
setDisplayName(newSpeakerVideoSpanId, null,
|
||||
interfaceConfig.DEFAULT_DOMINANT_SPEAKER_DISPLAY_NAME);
|
||||
}
|
||||
currentDominantSpeaker = resourceJid;
|
||||
|
|
Loading…
Reference in New Issue