Translate the context menus, Shift+Del shortcut and realtime object

This commit is contained in:
yflory
2016-11-16 17:11:48 +01:00
parent 7a035fa4a0
commit da19608269
7 changed files with 355 additions and 127 deletions

View File

@@ -42,17 +42,21 @@ define(['/customize/languageSelector.js',
});
};
var translateText = function (i, e) {
var $el = $(e);
var key = $el.data('localization');
$el.html(messages[key]);
};
var translateTitle = function (i, e) {
var $el = $(this);
var key = $el.data('localization-title');
$el.attr('title', messages[key]);
};
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]);
});
$('[data-localization]').each(translateText);
$('#pad-iframe').contents().find('[data-localization]').each(translateText);
$('[data-localization-title]').each(translateTitle);
$('#pad-iframe').contents().find('[data-localization-title]').each(translateTitle);
};
// Non translatable keys

View File

@@ -181,7 +181,15 @@ define(function () {
out.fm_unknownFolderError = "Le dossier sélectionné ou le dernier dossier visité n'existe plus. Ouverture du dossier parent...";
out.fm_contextMenuError = "Impossible d'ouvrir le menu contextuel pour cet élément. Si le problème persiste, essayez de rechercher la page.";
out.fm_selectError = "Impossible de sélectionner l'élément ciblé. Si le problème persiste, essayez de recharger la page.";
// File - Context menu
out.fc_newfolder = "Nouveau dossier";
out.fc_rename = "Renommer";
out.fc_open = "Ouvrir";
out.fc_delete = "Supprimer";
out.fc_restore = "Restaurer";
out.fc_remove = "Supprimer définitivement";
out.fc_empty = "Vider la corbeille";
// fileObject.js (logs)
out.fo_moveUnsortedError = "La liste des éléments non triés ne peut pas contenir de dossiers.";
out.fo_existingNameError = "Ce nom est déjà utilisé dans ce répertoire. Veuillez en choisir un autre.";
out.fo_moveFolderToChildError = "Vous ne pouvez pas déplacer un dossier dans un de ses descendants";

View File

@@ -181,7 +181,15 @@ define(function () {
out.fm_unknownFolderError = "The selected or last visited directory no longer exist. Opening the parent folder...";
out.fm_contextMenuError = "Unable to open the context menu for that element. If the problem persist, try to reload the page.";
out.fm_selectError = "Unable to select the targetted element. If the problem persist, try to reload the page.";
// File - Context menu
out.fc_newfolder = "New folder";
out.fc_rename = "Rename";
out.fc_open = "Open";
out.fc_delete = "Delete";
out.fc_restore = "Restore";
out.fc_remove = "Delete permanently";
out.fc_empty = "Empty the trash";
// fileObject.js (logs)
out.fo_moveUnsortedError = "You can't move a folder to the list of unsorted pads";
out.fo_existingNameError = "Name already used in that directory. Please choose another one.";
out.fo_moveFolderToChildError = "You can't move a folder into one of its descendants";