Complete the French translation
This commit is contained in:
@@ -12,13 +12,17 @@ define(['/customize/languageSelector.js',
|
||||
|
||||
var language = LS.getLanguage();
|
||||
|
||||
if (!language || language === defaultLanguage || language === 'default' || !map[language]) { return Default; }
|
||||
|
||||
var messages;
|
||||
|
||||
// Add the missing translated keys to the returned object
|
||||
messages = $.extend(true, {}, Default, map[language]);
|
||||
if (!language || language === defaultLanguage || language === 'default' || !map[language]) {
|
||||
messages = Default;
|
||||
}
|
||||
else {
|
||||
// Add the translated keys to the returned object
|
||||
messages = $.extend(true, {}, Default, map[language]);
|
||||
}
|
||||
|
||||
// Get keys with parameters
|
||||
messages._getKey = function (key, argArray) {
|
||||
if (!messages[key]) { return '?'; }
|
||||
var text = messages[key];
|
||||
@@ -27,5 +31,43 @@ define(['/customize/languageSelector.js',
|
||||
});
|
||||
};
|
||||
|
||||
messages._applyTranslation = function () {
|
||||
$('[data-localization]').each(function (i, e) {
|
||||
var $el = $(this);
|
||||
var key = $el.data('localization');
|
||||
$el.html(messages[key]);
|
||||
});
|
||||
$('[data-localization-title]').each(function (i, e) {
|
||||
var $el = $(this);
|
||||
var key = $el.data('localization-title');
|
||||
$el.attr('title', messages[key]);
|
||||
});
|
||||
};
|
||||
|
||||
// Non translatable keys
|
||||
messages.initialState = [
|
||||
'<p>',
|
||||
'This is <strong>CryptPad</strong>, the zero knowledge realtime collaborative editor.',
|
||||
'<br>',
|
||||
'What you type here is encrypted so only people who have the link can access it.',
|
||||
'<br>',
|
||||
'Even the server cannot see what you type.',
|
||||
'</p>',
|
||||
'<p>',
|
||||
'<small>',
|
||||
'<i>What you see here, what you hear here, when you leave here, let it stay here</i>',
|
||||
'</small>',
|
||||
'</p>',
|
||||
].join('');
|
||||
|
||||
messages.codeInitialState = [
|
||||
'/*\n',
|
||||
' This is CryptPad, the zero knowledge realtime collaborative editor.\n',
|
||||
' What you type here is encrypted so only people who have the link can access it.\n',
|
||||
' Even the server cannot see what you type.\n',
|
||||
' What you see here, what you hear here, when you leave here, let it stay here.\n',
|
||||
'*/'
|
||||
].join('');
|
||||
|
||||
return messages;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user