Add translation keys

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

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

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

Loading…
Cancel
Save