Add translation keys and remove/fix XXX
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -771,7 +771,7 @@ define([
|
||||
id: id
|
||||
};
|
||||
});
|
||||
var teamsList = UIElements.getFriendsList('Share with a team', { // XXX
|
||||
var teamsList = UIElements.getFriendsList(Messages.share_linkTeam, {
|
||||
common: common,
|
||||
noFilter: true,
|
||||
friends: teams
|
||||
@@ -1182,7 +1182,7 @@ define([
|
||||
var hasFriends = Object.keys(config.friends || {}).length !== 0;
|
||||
|
||||
if (!hasFriends) {
|
||||
return void UI.alert('No friend to invite'); // XXX
|
||||
return void UI.alert(Messages.team_noFriend);
|
||||
}
|
||||
var privateData = common.getMetadataMgr().getPrivateData();
|
||||
var team = privateData.teams[config.teamId];
|
||||
@@ -1203,7 +1203,7 @@ define([
|
||||
$btn.prop('disabled', 'disabled');
|
||||
}
|
||||
};
|
||||
var list = UIElements.getFriendsList('Pick the friends you want to invite to the team', { // XXX
|
||||
var list = UIElements.getFriendsList(Messages.team_pickFriends, {
|
||||
common: common,
|
||||
friends: config.friends,
|
||||
}, refreshButton);
|
||||
@@ -1217,7 +1217,7 @@ define([
|
||||
keys: [27]
|
||||
}, {
|
||||
className: 'primary',
|
||||
name: 'INVITE', // XXX
|
||||
name: Messages.team_inviteModalButton,
|
||||
onClick: function () {
|
||||
var $sel = $div.find('.cp-share-friend.cp-selected');
|
||||
var sel = $sel.toArray();
|
||||
@@ -2895,7 +2895,7 @@ define([
|
||||
'data-value': teamId,
|
||||
'href': '#'
|
||||
},
|
||||
content: 'TEAM: <b>' + t.name + '</b>' // XXX
|
||||
content: Messages._getKey('team_pcsSelectEntry', [Util.fixHTML(t.name)])
|
||||
};
|
||||
});
|
||||
teamOptions.unshift({
|
||||
@@ -2926,9 +2926,9 @@ define([
|
||||
$teamBlock.setValue(id);
|
||||
});
|
||||
team = h('div.cp-creation-team', [
|
||||
'Store in', // XXX
|
||||
Messages.team_pcsSelectLabel,
|
||||
$teamBlock[0],
|
||||
createHelper('#', "The pad will be stored in your team's drive. If this is an owned pad, it will be owned by the team.") // XXX
|
||||
createHelper('#', Messages.team_pcsSelectHelp)
|
||||
]);
|
||||
if (privateData.storeInTeam) {
|
||||
$teamBlock.setValue(privateData.storeInTeam);
|
||||
@@ -3717,8 +3717,7 @@ define([
|
||||
|
||||
var verified = UIElements.getVerifiedFriend(common, msg.author, name);
|
||||
|
||||
//var text = Messages._getKey('', [name, title]); // XXX
|
||||
var text = name + " has invited you to join the team <b>" + teamName +"</b>";
|
||||
var text = Messages._getKey('team_invitedToTeam', [name, teamName]);
|
||||
|
||||
var div = h('div', [
|
||||
UI.setHTML(h('p'), text),
|
||||
|
||||
@@ -716,7 +716,7 @@ define([
|
||||
if (room.isFriendChat) {
|
||||
$parentEl = $userlist.find('.cp-app-contacts-friends');
|
||||
} else if (room.isTeamChat) {
|
||||
$parentEl = $userlist.find('.cp-app-contacts-padchat'); // XXX
|
||||
$parentEl = $userlist.find('.cp-app-contacts-padchat');
|
||||
} else if (room.isPadChat) {
|
||||
$parentEl = $userlist.find('.cp-app-contacts-padchat');
|
||||
} else {
|
||||
@@ -829,7 +829,7 @@ define([
|
||||
return void console.error('Invalid team chat');
|
||||
}
|
||||
var room = rooms[0];
|
||||
room.name = 'TEAMS'; // XXX
|
||||
room.name = Messages.type.team;
|
||||
rooms.forEach(initializeRoom);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -261,8 +261,7 @@ define([
|
||||
var name = Util.fixHTML(msg.content.user.displayName) || Messages.anonymous;
|
||||
var teamName = Util.fixHTML(Util.find(msg, ['content', 'team', 'metadata', 'name']) || '');
|
||||
content.getFormatText = function () {
|
||||
var text = name + " has invited you to join the team <b>" + teamName +"</b>";
|
||||
// XXX
|
||||
var text = Messages._getKey('team_invitedToTeam', [name, teamName]);
|
||||
return text;
|
||||
};
|
||||
if (!content.archived) {
|
||||
@@ -280,8 +279,7 @@ define([
|
||||
var name = Util.fixHTML(msg.content.user.displayName) || Messages.anonymous;
|
||||
var teamName = Util.fixHTML(Util.find(msg, ['content', 'teamName']) || '');
|
||||
content.getFormatText = function () {
|
||||
var text = name + " has kicked you from join the team <b>" + teamName +"</b>";
|
||||
// XXX
|
||||
var text = Messages._getKey('team_kickedFromTeam', [name, teamName]);
|
||||
return text;
|
||||
};
|
||||
if (!content.archived) {
|
||||
@@ -296,10 +294,9 @@ define([
|
||||
// Display the notification
|
||||
var name = Util.fixHTML(msg.content.user.displayName) || Messages.anonymous;
|
||||
var teamName = Util.fixHTML(Util.find(msg, ['content', 'team', 'metadata', 'name']) || '');
|
||||
//var key = 'owner_request_' + (msg.content.answer ? 'accepted' : 'declined');
|
||||
var key = 'team_' + (msg.content.answer ? 'accept' : 'decline') + 'Invitation';
|
||||
content.getFormatText = function () {
|
||||
//return Messages._getKey(key, [name, title]); // XXX
|
||||
return name +' has ' + (msg.content.answer ? 'accepted' : 'declined') + ' your offer to join the team <b>' + teamName + '</b>';
|
||||
return Messages._getKey(key, [name, teamName]);
|
||||
};
|
||||
if (!content.archived) {
|
||||
content.dismissHandler = defaultDismiss(common, data);
|
||||
|
||||
@@ -446,7 +446,7 @@ var factory = function (Util, Hash, CPNetflux, Sortify, nThen, Crypto) {
|
||||
// deleted while you are open
|
||||
// emit an event
|
||||
var onChannelError = function (info) {
|
||||
if (!ready) { return void cb(info); } // XXX make sure we don't reconnect
|
||||
if (!ready) { return void cb(info); }
|
||||
console.error("CHANNEL_ERROR", info);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user