annotate generated translation keys to suppress warnings

pull/1/head
ansuz 4 years ago
parent 3457ae31cd
commit 6dcc471c81

@ -44,26 +44,26 @@ define([
var SPECIAL_GROUP_ITEMS = {}; var SPECIAL_GROUP_ITEMS = {};
SPECIAL_GROUP_ITEMS.storage0 = function (f) { SPECIAL_GROUP_ITEMS.storage0 = function (f) {
return groupItemTemplate( return groupItemTemplate(
Msg['features_f_' + f], Msg['features_f_' + f], // .features_f_storage0
Msg._getKey('features_f_' + f + '_note', [Config.inactiveTime]) Msg._getKey('features_f_' + f + '_note', [Config.inactiveTime]) // .features_f_storage0_note
); );
}; };
SPECIAL_GROUP_ITEMS.file1 = function (f) { SPECIAL_GROUP_ITEMS.file1 = function (f) {
return groupItemTemplate( return groupItemTemplate(
Msg['features_f_' + f], Msg['features_f_' + f], // .features_f_file1
Msg._getKey('features_f_' + f + '_note', [Config.maxUploadSize / 1024 / 1024]) Msg._getKey('features_f_' + f + '_note', [Config.maxUploadSize / 1024 / 1024]) // .features_f_file1_note
); );
}; };
SPECIAL_GROUP_ITEMS.storage1 = function (f) { SPECIAL_GROUP_ITEMS.storage1 = function (f) {
return groupItemTemplate( return groupItemTemplate(
Msg._getKey('features_f_' + f, [Util.getPrettySize(Config.defaultStorageLimit, Msg)]), Msg._getKey('features_f_' + f, [Util.getPrettySize(Config.defaultStorageLimit, Msg)]), // .features_f_storage1
Msg['features_f_' + f + '_note'] Msg['features_f_' + f + '_note'] // .features_f_storage1_note
); );
}; };
SPECIAL_GROUP_ITEMS.storage2 = function (f) { SPECIAL_GROUP_ITEMS.storage2 = function (f) {
return groupItemTemplate( return groupItemTemplate(
Msg['features_f_' + f], Msg['features_f_' + f], // .features_f_storage2
Msg._getKey('features_f_' + f + '_note', [Config.premiumUploadSize / 1024 / 1024]) Msg._getKey('features_f_' + f + '_note', [Config.premiumUploadSize / 1024 / 1024]) // .features_f_storage2_note
); );
}; };
@ -81,7 +81,13 @@ define([
h('div.text-center', '0€'), h('div.text-center', '0€'),
h('div.text-center', Msg.features_noData), h('div.text-center', Msg.features_noData),
]), ]),
h('ul.list-group.list-group-flush', ['apps', 'file0', 'core', 'cryptdrive0', 'storage0'].map(groupItem)), h('ul.list-group.list-group-flush', [
'apps',
'file0', // Msg.features_f_file0, .features_f_file0_note
'core', // Msg.features_f_core, Msg.features_f_core_note
'cryptdrive0', // Msg.features_f_cryptdrive0, .features_f_cryptdrive0_note
'storage0'
].map(groupItem)),
]), ]),
]); ]);
@ -95,7 +101,14 @@ define([
h('div.text-center', '0€'), h('div.text-center', '0€'),
h('div.text-center', Msg.features_noData), h('div.text-center', Msg.features_noData),
]), ]),
h('ul.list-group.list-group-flush', ['anon', 'social', 'file1', 'cryptdrive1', 'devices', 'storage1'].map(groupItem)), h('ul.list-group.list-group-flush', [
'anon', // Msg.features_f_anon, .features_f_anon_note
'social', // Msg.features_f_social, .features_f_social_note
'file1',
'cryptdrive1', // Msg.features_f_cryptdrive1, .features_f_cryptdrive1_note
'devices', // Msg.features_f_devices, .features_f_devices_note
'storage1' // Msg.features_f_storage1, .features_f_storage1_note
].map(groupItem)),
h('div.card-body',[ h('div.card-body',[
h('div.cp-features-register#cp-features-register', [ h('div.cp-features-register#cp-features-register', [
h('a', { h('a', {
@ -118,7 +131,12 @@ define([
}, Msg._getKey('features_pricing', ['5', '10', '15']))), }, Msg._getKey('features_pricing', ['5', '10', '15']))),
h('div.text-center', Msg.features_emailRequired), h('div.text-center', Msg.features_emailRequired),
]), ]),
h('ul.list-group.list-group-flush', ['reg', 'storage2', 'support', 'supporter'].map(groupItem)), h('ul.list-group.list-group-flush', [
'reg', // Msg.features_f_reg, .features_f_reg_note
'storage2',
'support', // Msg.features_f_support, .features_f_support_note
'supporter' // Msg.features_f_supporter, .features_f_supporter_note
].map(groupItem)),
h('div.card-body',[ h('div.card-body',[
h('div.cp-features-register#cp-features-subscribe', [ h('div.cp-features-register#cp-features-subscribe', [
premiumButton premiumButton

@ -40,20 +40,20 @@ define([
var sFrameChan; var sFrameChan;
var categories = { var categories = {
'general': [ 'general': [ // Msg.admin_cat_general
'cp-admin-flush-cache', 'cp-admin-flush-cache',
'cp-admin-update-limit', 'cp-admin-update-limit',
'cp-admin-archive', 'cp-admin-archive',
'cp-admin-unarchive', 'cp-admin-unarchive',
// 'cp-admin-registration', // 'cp-admin-registration',
], ],
'quota': [ 'quota': [ // Msg.admin_cat_quota
'cp-admin-defaultlimit', 'cp-admin-defaultlimit',
'cp-admin-setlimit', 'cp-admin-setlimit',
'cp-admin-getquota', 'cp-admin-getquota',
'cp-admin-getlimits', 'cp-admin-getlimits',
], ],
'stats': [ 'stats': [ // Msg.admin_cat_stats
'cp-admin-refresh-stats', 'cp-admin-refresh-stats',
'cp-admin-active-sessions', 'cp-admin-active-sessions',
'cp-admin-active-pads', 'cp-admin-active-pads',
@ -61,11 +61,11 @@ define([
'cp-admin-registered', 'cp-admin-registered',
'cp-admin-disk-usage', 'cp-admin-disk-usage',
], ],
'support': [ 'support': [ // Msg.admin_cat_support
'cp-admin-support-list', 'cp-admin-support-list',
'cp-admin-support-init' 'cp-admin-support-init'
], ],
'performance': [ 'performance': [ // Msg.admin_cat_performance
'cp-admin-refresh-performance', 'cp-admin-refresh-performance',
'cp-admin-performance-profiling', 'cp-admin-performance-profiling',
] ]
@ -73,7 +73,7 @@ define([
var create = {}; var create = {};
var makeBlock = function (key, addButton) { var makeBlock = function (key, addButton) { // Title, Hint, maybeButton
// Convert to camlCase for translation keys // Convert to camlCase for translation keys
var safeKey = key.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); }); var safeKey = key.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });
@ -90,7 +90,7 @@ define([
}; };
create['update-limit'] = function () { create['update-limit'] = function () {
var key = 'update-limit'; var key = 'update-limit';
var $div = makeBlock(key, true); var $div = makeBlock(key, true); // Msg.admin_updateLimitHint, .admin_updateLimitTitle, .admin_updateLimitButton
$div.find('button').click(function () { $div.find('button').click(function () {
sFrameChan.query('Q_UPDATE_LIMIT', null, function (e, res) { sFrameChan.query('Q_UPDATE_LIMIT', null, function (e, res) {
if (e || (res && res.error)) { return void console.error(e || res.error); } if (e || (res && res.error)) { return void console.error(e || res.error); }
@ -101,7 +101,7 @@ define([
}; };
create['flush-cache'] = function () { create['flush-cache'] = function () {
var key = 'flush-cache'; var key = 'flush-cache';
var $div = makeBlock(key, true); var $div = makeBlock(key, true); // Msg.admin_flushCacheHint, .admin_flushCacheTitle, .admin_flushCacheButton
var called = false; var called = false;
$div.find('button').click(function () { $div.find('button').click(function () {
if (called) { return; } if (called) { return; }
@ -225,14 +225,14 @@ define([
create['archive'] = function () { create['archive'] = function () {
var key = 'archive'; var key = 'archive';
var $div = makeBlock(key, true); var $div = makeBlock(key, true); // Msg.admin_archiveHint, .admin_archiveTitle, .admin_archiveButton
var $button = $div.find('button'); var $button = $div.find('button');
archiveForm(true, $div, $button); archiveForm(true, $div, $button);
return $div; return $div;
}; };
create['unarchive'] = function () { create['unarchive'] = function () {
var key = 'unarchive'; var key = 'unarchive';
var $div = makeBlock(key, true); var $div = makeBlock(key, true); // Msg.admin_unarchiveHint, .admin_unarchiveTitle, .admin_unarchiveButton
var $button = $div.find('button'); var $button = $div.find('button');
archiveForm(false, $div, $button); archiveForm(false, $div, $button);
return $div; return $div;
@ -240,7 +240,7 @@ define([
create['registration'] = function () { create['registration'] = function () {
var key = 'registration'; var key = 'registration';
var $div = makeBlock(key, true); var $div = makeBlock(key, true); // Msg.admin_registrationHint, .admin_registrationTitle, .admin_registrationButton
var $button = $div.find('button'); var $button = $div.find('button');
var state = APP.instanceStatus.restrictRegistration; var state = APP.instanceStatus.restrictRegistration;
if (state) { if (state) {
@ -282,7 +282,7 @@ define([
create['defaultlimit'] = function () { create['defaultlimit'] = function () {
var key = 'defaultlimit'; var key = 'defaultlimit';
var $div = makeBlock(key); var $div = makeBlock(key); // Msg.admin_defaultlimitHint, .admin_defaultlimitTitle
var _limit = APP.instanceStatus.defaultStorageLimit; var _limit = APP.instanceStatus.defaultStorageLimit;
var _limitMB = Util.bytesToMegabytes(_limit); var _limitMB = Util.bytesToMegabytes(_limit);
var limit = getPrettySize(_limit); var limit = getPrettySize(_limit);
@ -322,7 +322,7 @@ define([
}; };
create['getlimits'] = function () { create['getlimits'] = function () {
var key = 'getlimits'; var key = 'getlimits';
var $div = makeBlock(key); var $div = makeBlock(key); // Msg.admin_getlimitsHint, .admin_getlimitsTitle
APP.refreshLimits = function () { APP.refreshLimits = function () {
sFrameChan.query('Q_ADMIN_RPC', { sFrameChan.query('Q_ADMIN_RPC', {
cmd: 'GET_LIMITS', cmd: 'GET_LIMITS',
@ -385,7 +385,7 @@ define([
create['setlimit'] = function () { create['setlimit'] = function () {
var key = 'setlimit'; var key = 'setlimit';
var $div = makeBlock(key); var $div = makeBlock(key); // Msg.admin_setlimitHint, .admin_setlimitTitle
var user = h('input.cp-setlimit-key'); var user = h('input.cp-setlimit-key');
var $key = $(user); var $key = $(user);
@ -471,7 +471,7 @@ define([
create['getquota'] = function () { create['getquota'] = function () {
var key = 'getquota'; var key = 'getquota';
var $div = makeBlock(key, true); var $div = makeBlock(key, true); // Msg.admin_getquotaHint, .admin_getquotaTitle, .admin_getquotaButton
var input = h('input#cp-admin-getquota', { var input = h('input#cp-admin-getquota', {
type: 'text' type: 'text'
@ -521,7 +521,7 @@ define([
create['active-sessions'] = function () { create['active-sessions'] = function () {
var key = 'active-sessions'; var key = 'active-sessions';
var $div = makeBlock(key); var $div = makeBlock(key); // Msg.admin_activeSessionsHint, .admin_activeSessionsTitle
var onRefresh = function () { var onRefresh = function () {
$div.find('pre').remove(); $div.find('pre').remove();
sFrameChan.query('Q_ADMIN_RPC', { sFrameChan.query('Q_ADMIN_RPC', {
@ -539,7 +539,7 @@ define([
}; };
create['active-pads'] = function () { create['active-pads'] = function () {
var key = 'active-pads'; var key = 'active-pads';
var $div = makeBlock(key); var $div = makeBlock(key); // Msg.admin_activePadsHint, .admin_activePadsTitle
var onRefresh = function () { var onRefresh = function () {
$div.find('pre').remove(); $div.find('pre').remove();
sFrameChan.query('Q_ADMIN_RPC', { sFrameChan.query('Q_ADMIN_RPC', {
@ -556,7 +556,7 @@ define([
}; };
create['open-files'] = function () { create['open-files'] = function () {
var key = 'open-files'; var key = 'open-files';
var $div = makeBlock(key); var $div = makeBlock(key); // Msg.admin_openFilesHint, .admin_openFilesTitle
var onRefresh = function () { var onRefresh = function () {
$div.find('pre').remove(); $div.find('pre').remove();
sFrameChan.query('Q_ADMIN_RPC', { sFrameChan.query('Q_ADMIN_RPC', {
@ -573,7 +573,7 @@ define([
}; };
create['registered'] = function () { create['registered'] = function () {
var key = 'registered'; var key = 'registered';
var $div = makeBlock(key); var $div = makeBlock(key); // Msg.admin_registeredHint, .admin_registeredTitle
var onRefresh = function () { var onRefresh = function () {
$div.find('pre').remove(); $div.find('pre').remove();
sFrameChan.query('Q_ADMIN_RPC', { sFrameChan.query('Q_ADMIN_RPC', {
@ -590,7 +590,7 @@ define([
}; };
create['disk-usage'] = function () { create['disk-usage'] = function () {
var key = 'disk-usage'; var key = 'disk-usage';
var $div = makeBlock(key, true); var $div = makeBlock(key, true); // Msg.admin_diskUsageHint, .admin_diskUsageTitle, .admin_diskUsageButton
var called = false; var called = false;
$div.find('button').click(function () { $div.find('button').click(function () {
$div.find('button').hide(); $div.find('button').hide();
@ -628,7 +628,7 @@ define([
var supportKey = ApiConfig.supportMailbox; var supportKey = ApiConfig.supportMailbox;
create['support-list'] = function () { create['support-list'] = function () {
if (!supportKey || !APP.privateKey) { return; } if (!supportKey || !APP.privateKey) { return; }
var $container = makeBlock('support-list'); var $container = makeBlock('support-list'); // Msg.admin_supportListHint, .admin_supportListTitle
var $div = $(h('div.cp-support-container')).appendTo($container); var $div = $(h('div.cp-support-container')).appendTo($container);
var catContainer = h('div.cp-dropdown-container'); var catContainer = h('div.cp-dropdown-container');
@ -893,7 +893,7 @@ define([
}; };
create['support-init'] = function () { create['support-init'] = function () {
var $div = makeBlock('support-init'); var $div = makeBlock('support-init'); // Msg.admin_supportInitHint, .admin_supportInitTitle
if (!supportKey) { if (!supportKey) {
$div.append(h('p', Messages.admin_supportInitHelp)); $div.append(h('p', Messages.admin_supportInitHelp));
return $div; return $div;
@ -945,7 +945,7 @@ define([
}; };
create['performance-profiling'] = function () { create['performance-profiling'] = function () {
var $div = makeBlock('performance-profiling'); var $div = makeBlock('performance-profiling'); // Msg.admin_performanceProfilingHint, .admin_performanceProfilingTitle
var onRefresh = function () { var onRefresh = function () {
var body = h('tbody'); var body = h('tbody');

@ -32,16 +32,16 @@ define([
var sFrameChan; var sFrameChan;
var categories = { var categories = {
'all': [ 'all': [ // Msg.notifications_cat_all
'cp-notifications-all', 'cp-notifications-all',
], ],
'friends': [ 'friends': [ // Msg.notifications_cat_friends
'cp-notifications-friends', 'cp-notifications-friends',
], ],
'pads': [ 'pads': [ // Msg.notifications_cat_pads
'cp-notifications-pads', 'cp-notifications-pads',
], ],
'archived': [ 'archived': [ // Msg.notifications_cat_archived
'cp-notifications-archived', 'cp-notifications-archived',
], ],
}; };

@ -46,7 +46,7 @@ define([
var sframeChan; var sframeChan;
var categories = { var categories = {
'account': [ 'account': [ // Msg.settings_cat_account
'cp-settings-own-drive', 'cp-settings-own-drive',
'cp-settings-info-block', 'cp-settings-info-block',
'cp-settings-displayname', 'cp-settings-displayname',
@ -55,14 +55,14 @@ define([
'cp-settings-change-password', 'cp-settings-change-password',
'cp-settings-delete' 'cp-settings-delete'
], ],
'security': [ 'security': [ // Msg.settings_cat_security
'cp-settings-logout-everywhere', 'cp-settings-logout-everywhere',
'cp-settings-autostore', 'cp-settings-autostore',
'cp-settings-safe-links', 'cp-settings-safe-links',
'cp-settings-userfeedback', 'cp-settings-userfeedback',
'cp-settings-cache', 'cp-settings-cache',
], ],
'style': [ 'style': [ // Msg.settings_cat_style
'cp-settings-colortheme', 'cp-settings-colortheme',
'cp-settings-custom-theme', 'cp-settings-custom-theme',
], ],
@ -75,24 +75,24 @@ define([
'cp-settings-trim-history' 'cp-settings-trim-history'
//'cp-settings-drive-reset' //'cp-settings-drive-reset'
], ],
'cursor': [ 'cursor': [ // Msg.settings_cat_cursor
'cp-settings-cursor-color', 'cp-settings-cursor-color',
'cp-settings-cursor-share', 'cp-settings-cursor-share',
'cp-settings-cursor-show', 'cp-settings-cursor-show',
], ],
'pad': [ 'pad': [ // Msg.settings_cat_pad
'cp-settings-pad-width', 'cp-settings-pad-width',
'cp-settings-pad-spellcheck', 'cp-settings-pad-spellcheck',
'cp-settings-pad-notif', 'cp-settings-pad-notif',
], ],
'code': [ 'code': [ // Msg.settings_cat_code
'cp-settings-code-indent-unit', 'cp-settings-code-indent-unit',
'cp-settings-code-indent-type', 'cp-settings-code-indent-type',
'cp-settings-code-brackets', 'cp-settings-code-brackets',
'cp-settings-code-font-size', 'cp-settings-code-font-size',
'cp-settings-code-spellcheck', 'cp-settings-code-spellcheck',
], ],
'kanban': [ 'kanban': [ // Msg.settings_cat_kanban
'cp-settings-kanban-tags', 'cp-settings-kanban-tags',
], ],
'subscription': { 'subscription': {
@ -364,7 +364,7 @@ define([
return $div; return $div;
}; };
makeBlock('cache', function (cb) { makeBlock('cache', function (cb) { // Msg.settings_cacheHint, .settings_cacheTitle
var store = window.cryptpadStore; var store = window.cryptpadStore;
var $cbox = $(UI.createCheckbox('cp-settings-cache', var $cbox = $(UI.createCheckbox('cp-settings-cache',
@ -412,10 +412,15 @@ define([
]); ]);
}, true); }, true);
makeBlock('colortheme', function (cb) { makeBlock('colortheme', function (cb) { // Msg.settings_colorthemeHint .settings_colorthemeTitle
var theme = window.cryptpadStore.store['colortheme'] || 'default'; var theme = window.cryptpadStore.store['colortheme'] || 'default';
var os = window.cryptpadStore.store['colortheme_default'] || 'light'; var os = window.cryptpadStore.store['colortheme_default'] || 'light';
var values = ['default', 'light', 'dark'/*, 'custom'*/]; var values = [
'default', // Msg.settings_colortheme_default
'light', // Msg.settings_colortheme_light
'dark', // Msg.settings_colortheme_dark
/* 'custom'*/ // Msg.settings_colortheme_custom
];
var defaultTheme = Messages['settings_colortheme_'+os]; var defaultTheme = Messages['settings_colortheme_'+os];
var opts = h('div.cp-settings-radio-container', [ var opts = h('div.cp-settings-radio-container', [
@ -626,7 +631,7 @@ define([
return $div; return $div;
}; };
makeBlock('own-drive', function(cb, $div) { makeBlock('own-drive', function(cb, $div) { // Msg.settings_ownDriveHint, .settings_ownDriveTitle
if (privateData.isDriveOwned || !common.isLoggedIn()) { if (privateData.isDriveOwned || !common.isLoggedIn()) {
return void cb(false); return void cb(false);
} }
@ -681,7 +686,7 @@ define([
cb(form); cb(form);
}, true); }, true);
makeBlock('mediatag-size', function(cb) { makeBlock('mediatag-size', function(cb) { // Msg.settings_mediatagSizeHint, .settings_mediatagSizeTitle
var $inputBlock = $('<div>', { var $inputBlock = $('<div>', {
'class': 'cp-sidebarlayout-input-block', 'class': 'cp-sidebarlayout-input-block',
}); });
@ -735,7 +740,7 @@ define([
// Security // Security
makeBlock('safe-links', function(cb) { makeBlock('safe-links', function(cb) { // Msg.settings_safeLinksTitle
var $cbox = $(UI.createCheckbox('cp-settings-safe-links', var $cbox = $(UI.createCheckbox('cp-settings-safe-links',
Messages.settings_safeLinksCheckbox, Messages.settings_safeLinksCheckbox,
@ -1059,7 +1064,7 @@ define([
$div.find('#cp-settings-trim-container').remove(); $div.find('#cp-settings-trim-container').remove();
cb(content); cb(content);
}; };
makeBlock('trim-history', function(cb, $div) { makeBlock('trim-history', function(cb, $div) { // Msg.settings_trimHistoryHint, .settings_trimHistoryTitle
if (!common.isLoggedIn()) { return void cb(false); } if (!common.isLoggedIn()) { return void cb(false); }
redrawTrimHistory(cb, $div); redrawTrimHistory(cb, $div);
}, true); }, true);
@ -1295,7 +1300,7 @@ define([
return $div; return $div;
}; };
makeBlock('pad-notif', function(cb) { makeBlock('pad-notif', function(cb) { // Msg.settings_padNotifHint, .settings_padNotifTitle
var $cbox = $(UI.createCheckbox('cp-settings-pad-notif', var $cbox = $(UI.createCheckbox('cp-settings-pad-notif',
Messages.settings_padNotifCheckbox, Messages.settings_padNotifCheckbox,
false, { label: { class: 'noTitle' } })); false, { label: { class: 'noTitle' } }));
@ -1487,7 +1492,7 @@ define([
}; };
makeBlock('kanban-tags', function(cb) { makeBlock('kanban-tags', function(cb) { // Msg.settings_kanbanTagsHint, .settings_kanbanTagsTitle
var opt1 = UI.createRadio('cp-settings-kanban-tags', 'cp-settings-kanban-tags-and', var opt1 = UI.createRadio('cp-settings-kanban-tags', 'cp-settings-kanban-tags-and',
Messages.settings_kanbanTagsAnd, false, { Messages.settings_kanbanTagsAnd, false, {

@ -39,10 +39,10 @@ define([
var privateData; var privateData;
var categories = { var categories = {
'tickets': [ 'tickets': [ // Msg.support_cat_tickets
'cp-support-list', 'cp-support-list',
], ],
'new': [ 'new': [ // Msg.support_cat_new
'cp-support-language', 'cp-support-language',
'cp-support-form', 'cp-support-form',
], ],
@ -86,7 +86,7 @@ define([
// List existing (open?) tickets // List existing (open?) tickets
create['list'] = function () { create['list'] = function () {
var key = 'list'; var key = 'list';
var $div = makeBlock(key); var $div = makeBlock(key); // Msg.support_listHint, .support_listTitle
$div.addClass('cp-support-container'); $div.addClass('cp-support-container');
var hashesById = {}; var hashesById = {};
@ -166,7 +166,7 @@ define([
// Create a new tickets // Create a new tickets
create['form'] = function () { create['form'] = function () {
var key = 'form'; var key = 'form';
var $div = makeBlock(key, true); var $div = makeBlock(key, true); // Msg.support_formHint, .support_formTitle, .support_formButton
var form = APP.support.makeForm(); var form = APP.support.makeForm();
@ -192,7 +192,7 @@ define([
// Support is disabled... // Support is disabled...
create['disabled'] = function () { create['disabled'] = function () {
var key = 'disabled'; var key = 'disabled';
var $div = makeBlock(key); var $div = makeBlock(key); // Msg.support_disabledHint, .support_disabledTitle
return $div; return $div;
}; };

@ -124,8 +124,13 @@ define([
}; };
var makeCategoryDropdown = function (ctx, container, onChange, all) { var makeCategoryDropdown = function (ctx, container, onChange, all) {
var categories = ['account', 'data', 'bug', 'other']; var categories = [
if (all) { categories.push('all'); } 'account', // Msg.support_cat_account
'data', // Msg.support_cat_data
'bug', // Msg.support_cat_bug
'other' // Msg.support_cat_other
];
if (all) { categories.push('all'); } // Msg.support_cat_all
categories = categories.map(function (key) { categories = categories.map(function (key) {
return { return {
tag: 'a', tag: 'a',

@ -148,37 +148,37 @@ define([
}; };
var mainCategories = { var mainCategories = {
'list': [ 'list': [ // Msg.team_cat_list
'cp-team-list', 'cp-team-list',
], ],
'create': [ 'create': [
'cp-team-create', 'cp-team-create',
], ],
'general': [ 'general': [ // Msg.team_cat_general
'cp-team-info', 'cp-team-info',
], ],
'link': [ 'link': [ // Msg.team_cat_link
'cp-team-link', 'cp-team-link',
], ],
}; };
var teamCategories = { var teamCategories = {
'back': { 'back': { // Msg.team_cat_back
onClick: function (common) { onClick: function (common) {
closeTeam(common); closeTeam(common);
} }
}, },
'drive': [ 'drive': [ // Msg.team_cat_drive
'cp-team-drive' 'cp-team-drive'
], ],
'members': [ 'members': [ // Msg.team_cat_members
'cp-team-offline', 'cp-team-offline',
'cp-team-roster' 'cp-team-roster'
], ],
'chat': [ 'chat': [ // Msg.team_cat_chat
'cp-team-offline', 'cp-team-offline',
'cp-team-chat' 'cp-team-chat'
], ],
'admin': [ 'admin': [ // Msg.team_cat_admin
'cp-team-offline', 'cp-team-offline',
'cp-team-edpublic', 'cp-team-edpublic',
'cp-team-name', 'cp-team-name',
@ -996,7 +996,7 @@ define([
cb(content); cb(content);
}); });
makeBlock('name', function (common, cb) { makeBlock('name', function (common, cb) { // Msg.team_nameHint, .team_nameTitle
var $inputBlock = $('<div>', {'class': 'cp-sidebarlayout-input-block'}); var $inputBlock = $('<div>', {'class': 'cp-sidebarlayout-input-block'});
var $input = $('<input>', { var $input = $('<input>', {
'type': 'text', 'type': 'text',
@ -1055,7 +1055,7 @@ define([
}); });
}, true); }, true);
makeBlock('avatar', function (common, cb) { makeBlock('avatar', function (common, cb) { // Msg.team_avatarHint, .team_avatarTitle
// Upload // Upload
var avatar = h('div.cp-team-avatar.cp-avatar'); var avatar = h('div.cp-team-avatar.cp-avatar');
var $avatar = $(avatar); var $avatar = $(avatar);
@ -1110,7 +1110,7 @@ define([
}); });
}, true); }, true);
makeBlock('export', function (common, cb) { makeBlock('export', function (common, cb) { // Msg.team_exportHint, .team_exportTitle
// Backup all the pads // Backup all the pads
var sframeChan = common.getSframeChannel(); var sframeChan = common.getSframeChannel();
var privateData = common.getMetadataMgr().getPrivateData(); var privateData = common.getMetadataMgr().getPrivateData();
@ -1152,7 +1152,7 @@ define([
cb(button); cb(button);
}, true); }, true);
makeBlock('delete', function (common, cb, $div) { makeBlock('delete', function (common, cb, $div) { // Msg.team_deleteHint, .team_deleteTitle
$div.addClass('cp-online'); $div.addClass('cp-online');
var deleteTeam = h('button.btn.btn-danger', Messages.team_deleteButton); 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();

Loading…
Cancel
Save