Add translation keys

pull/1/head
yflory 5 years ago
parent 01a7430833
commit 72ba9ab999

@ -250,7 +250,7 @@ define([
delete teamsData[id]; delete teamsData[id];
} }
}); });
var teamsList = UIElements.getUserGrid('Or a team?', { // XXX var teamsList = UIElements.getUserGrid(Messages.owner_addTeamText, {
common: common, common: common,
noFilter: true, noFilter: true,
data: teamsData data: teamsData
@ -3796,8 +3796,7 @@ define([
var name = Util.fixHTML(msg.content.user.displayName) || Messages.anonymous; var name = Util.fixHTML(msg.content.user.displayName) || Messages.anonymous;
var title = Util.fixHTML(msg.content.title); var title = Util.fixHTML(msg.content.title);
//var text = Messages._getKey('owner_team_add', [name, title]); // XXX var text = Messages._getKey('owner_team_add', [name, title]);
var text = name + ' wants you to be an owner of the team ' + title; // XXX
var div = h('div', [ var div = h('div', [
UI.setHTML(h('p'), text), UI.setHTML(h('p'), text),

@ -1217,7 +1217,6 @@ define([
} }
if (data.owned && data.team && data.team.edPublic) { if (data.owned && data.team && data.team.edPublic) {
rtConfig.metadata.owners = [data.team.edPublic]; rtConfig.metadata.owners = [data.team.edPublic];
// XXX Teams mailbox
} else if (data.owned) { } else if (data.owned) {
rtConfig.metadata.owners = [edPublic]; rtConfig.metadata.owners = [edPublic];
rtConfig.metadata.mailbox = {}; rtConfig.metadata.mailbox = {};

@ -448,11 +448,11 @@ define([
// If they're an admin and I am an owner, I can promote them to owner // If they're an admin and I am an owner, I can promote them to owner
if (!isMe && myRole > theirRole && theirRole === 1 && !data.pending) { if (!isMe && myRole > theirRole && theirRole === 1 && !data.pending) {
var promoteOwner = h('span.fa.fa-angle-double-up', { var promoteOwner = h('span.fa.fa-angle-double-up', {
title: "Offer ownership" // XXX title: Messages.team_rosterPromoteOwner
}); });
$(promoteOwner).click(function () { $(promoteOwner).click(function () {
$(promoteOwner).hide(); $(promoteOwner).hide();
UI.confirm("Are you sure???", function (yes) { // XXX UI.confirm(Messages.team_ownerConfirm, function (yes) {
if (!yes) { return; } if (!yes) { return; }
APP.module.execCommand('OFFER_OWNERSHIP', { APP.module.execCommand('OFFER_OWNERSHIP', {
teamId: APP.team, teamId: APP.team,
@ -462,7 +462,7 @@ define([
console.error(obj.error); console.error(obj.error);
return void UI.warn(Messages.error); return void UI.warn(Messages.error);
} }
UI.log("DONE"); // XXX UI.log(Messags.sent);
}); });
}); });
}); });
@ -504,6 +504,8 @@ define([
}); });
$(remove).click(function () { $(remove).click(function () {
$(remove).hide(); $(remove).hide();
UI.confirm(Messages._getKey('team_kickConfirm', [Util.fixHTML(data.displayName)]), function (yes) {
if (!yes) { return; }
APP.module.execCommand('REMOVE_USER', { APP.module.execCommand('REMOVE_USER', {
pending: data.pending, pending: data.pending,
teamId: APP.team, teamId: APP.team,
@ -516,6 +518,7 @@ define([
redrawRoster(common); redrawRoster(common);
}); });
}); });
});
$actions.append(remove); $actions.append(remove);
} }
@ -612,6 +615,8 @@ define([
$header.append(leave); $header.append(leave);
} }
var noPending = pending.length ? '' : '.cp-hidden';
return [ return [
header, header,
h('h3', Messages.team_owner), h('h3', Messages.team_owner),
@ -620,8 +625,8 @@ define([
h('div', admins), h('div', admins),
h('h3', Messages.team_members), h('h3', Messages.team_members),
h('div', members), h('div', members),
h('h3', Messages.team_pending || 'PENDING'), // XXX h('h3'+noPending, Messages.team_pending),
h('div', pending) h('div'+noPending, pending)
]; ];
}; };
makeBlock('roster', function (common, cb) { makeBlock('roster', function (common, cb) {
@ -750,15 +755,15 @@ define([
}); });
}, true); }, true);
makeBlock('delete', function (common, cb) { // XXX makeBlock keys makeBlock('delete', function (common, cb) {
var deleteTeam = h('button.btn.btn-danger', Messages.team_delete || "DELETE"); // XXX var deleteTeam = h('button.btn.btn-danger', Messages.team_deleteButton);
var $ok = $('<span>', {'class': 'fa fa-check', title: Messages.saved}).hide(); var $ok = $('<span>', {'class': 'fa fa-check', title: Messages.saved}).hide();
var $spinner = $('<span>', {'class': 'fa fa-spinner fa-pulse'}).hide(); var $spinner = $('<span>', {'class': 'fa fa-spinner fa-pulse'}).hide();
var deleting = false; var deleting = false;
$(deleteTeam).click(function () { $(deleteTeam).click(function () {
if (deleting) { return; } if (deleting) { return; }
UI.confirm("Are you sure", function (yes) { // XXX UI.confirm(Messages.team_deleteConfirm, function (yes) {
if (!yes) { return; } if (!yes) { return; }
if (deleting) { return; } if (deleting) { return; }
deleting = true; deleting = true;
@ -772,7 +777,7 @@ define([
return void UI.warn(obj.error); return void UI.warn(obj.error);
} }
$ok.show(); $ok.show();
UI.log('DELETED'); // XXX UI.log(Messages.deleted);
}); });
}); });
}); });

Loading…
Cancel
Save