annotate unusual translation keys so our script recognizes them

pull/1/head
ansuz 4 years ago
parent fcfe63925b
commit c8a3a0bd16

@ -25,7 +25,7 @@ define([
].join('');
var built = false;
var types = ['less', 'drive', 'migrate', 'sf', 'team', 'pad', 'end'];
var types = ['less', 'drive', 'migrate', 'sf', 'team', 'pad', 'end']; // Msg.loading_state_0, loading_state_1, loading_state_2, loading_state_3, loading_state_4, loading_state_5
var current, progress;
var makeList = function (data) {
var c = types.indexOf(data.type);

@ -13,7 +13,7 @@ var ignoreLines = function (source, pattern) {
};
var GENERATED_PATTERNS = [
/(admin|settings)_.*(Hint|Title|Button)/,
/(team|admin|settings|support)_.*(Hint|Title|Button)/,
/settings_colortheme/,
/loading_(state|drive|pad)_/,
/(admin|notifications|support|team|settings)_cat_/,
@ -75,7 +75,7 @@ var grep = function (pattern, cb) {
if (/data\-localization/.test(stdout)) {
return cb(void 0, true, "DATA_LOCALIZATION", stdout);
}
if (/(Messages|Msg|messages)\./.test(stdout)) {
if (/(Messages|Msg|messages)\./.test(stdout) || /(footLink|footerCol)/.test(stdout)) {
return cb(void 0, false);
}

@ -911,18 +911,22 @@ define([
};
var actions = {
'bold': {
// Msg.mdToolbar_bold
expr: '**{0}**',
icon: 'fa-bold'
},
'italic': {
// Msg.mdToolbar_italic
expr: '_{0}_',
icon: 'fa-italic'
},
'strikethrough': {
// Msg.mdToolbar_strikethrough
expr: '~~{0}~~',
icon: 'fa-strikethrough'
},
'heading': {
// Msg.mdToolbar_heading
apply: function (str) {
return '\n'+clean(str).split('\n').map(function (line) {
return '# '+line;
@ -931,10 +935,12 @@ define([
icon: 'fa-header'
},
'link': {
// Msg.mdToolbar_link
expr: '[{0}](http://)',
icon: 'fa-link'
},
'quote': {
// Msg.mdToolbar_quote
apply: function (str) {
return '\n\n'+str.split('\n').map(function (line) {
return '> '+line;
@ -943,6 +949,7 @@ define([
icon: 'fa-quote-right'
},
'nlist': {
// Msg.mdToolbar_nlist
apply: function (str) {
return '\n'+clean(str).split('\n').map(function (line) {
return '1. '+line;
@ -951,6 +958,7 @@ define([
icon: 'fa-list-ol'
},
'list': {
// Msg.mdToolbar_list
apply: function (str) {
return '\n'+clean(str).split('\n').map(function (line) {
return '* '+line;
@ -959,6 +967,7 @@ define([
icon: 'fa-list-ul'
},
'check': {
// Msg.mdToolbar_check
apply: function (str) {
return '\n' + clean(str).split('\n').map(function (line) {
return '* [ ] ' + line;
@ -967,6 +976,7 @@ define([
icon: 'fa-check-square-o'
},
'code': {
// Msg.mdToolbar_code
apply: function (str) {
if (str.indexOf('\n') !== -1) {
return '\n```\n' + clean(str) + '\n```\n';
@ -976,6 +986,7 @@ define([
icon: 'fa-code'
},
'toc': {
// Msg.mdToolbar_toc
expr: '[TOC]',
icon: 'fa-newspaper-o'
}

@ -310,18 +310,18 @@ define([
cache: cache
};
var filesData = data.sharedFolderId && ctx.sf[data.sharedFolderId] ? ctx.sf[data.sharedFolderId].filesData : ctx.data.filesData;
progress('reading', -1);
progress('reading', -1); // Msg.settings_export_reading
nThen(function (waitFor) {
ctx.waitFor = waitFor;
var zipRoot = ctx.zip.folder(data.name || Messages.fm_rootName);
makeFolder(ctx, ctx.folder || ctx.data.root, zipRoot, filesData);
progress('download', {});
progress('download', {}); // Msg.settings_export_download
}).nThen(function () {
console.log(ctx.zip);
console.log(ctx.errors);
progress('compressing', -1);
progress('compressing', -1); // Msg.settings_export_compressing
ctx.zip.generateAsync({type: 'blob'}).then(function (content) {
progress('done', -1);
progress('done', -1); // Msg.settings_export_done
cb(content, ctx.errors);
});
});

@ -86,9 +86,9 @@ define([
var content = data.content;
var msg = content.msg;
var type = Hash.parsePadUrl(msg.content.href).type;
var key = type === 'drive' ? 'notification_folderShared' :
(type === 'file' ? 'notification_fileShared' :
'notification_padShared');
var key = type === 'drive' ? 'notification_folderShared' : // Msg.notification_folderShared
(type === 'file' ? 'notification_fileShared' : // Msg.notification_fileShared
'notification_padShared'); // Msg.notification_padShared
var teamNotification = /^team-/.test(data.type) && Number(data.type.slice(5));
var teamName = '';
@ -260,7 +260,7 @@ define([
// Display the notification
var name = Util.fixHTML(msg.content.user.displayName) || Messages.anonymous;
var title = Util.fixHTML(msg.content.title);
var key = 'owner_removed' + (msg.content.pending ? 'Pending' : '');
var key = 'owner_removed' + (msg.content.pending ? 'Pending' : ''); // Msg.owner_removed, owner_removedPending
content.getFormatText = function() {
return Messages._getKey(key, [name, title]);
};

@ -940,9 +940,9 @@ MessengerUI, Messages) {
var todo = function (e, overLimit) {
if (e) { return void console.error("Unable to get the pinned usage", e); }
if (overLimit) {
var key = 'pinLimitReachedAlert';
var key = 'pinLimitReachedAlert'; // Msg.pinLimitReachedAlert
if (!ApiConfig.allowSubscriptions) {
key = 'pinLimitReachedAlertNoAccounts';
key = 'pinLimitReachedAlertNoAccounts'; // Msg.pinLimitReachedAlertNoAccounts
}
$limit.show().click(function () {
UI.alert(Messages._getKey(key, [encodeURIComponent(l.hostname)]), null, true);

Loading…
Cancel
Save