Add translations for the markdown preview button title

pull/1/head
yflory 8 years ago
parent 51bd41d4e8
commit 620f4dc512

@ -95,6 +95,8 @@ define(function () {
out.templateSaved = "Modèle enregistré !"; out.templateSaved = "Modèle enregistré !";
out.selectTemplate = "Sélectionner un modèle ou appuyer sur Échap"; out.selectTemplate = "Sélectionner un modèle ou appuyer sur Échap";
out.previewButtonTitle = "Afficher ou cacher la prévisualisation de Markdown";
out.presentButtonTitle = "Entrer en mode présentation"; out.presentButtonTitle = "Entrer en mode présentation";
out.presentSuccess = 'Appuyer sur Échap pour quitter le mode présentation'; out.presentSuccess = 'Appuyer sur Échap pour quitter le mode présentation';

@ -97,6 +97,8 @@ define(function () {
out.templateSaved = "Template saved!"; out.templateSaved = "Template saved!";
out.selectTemplate = "Select a template or press escape"; out.selectTemplate = "Select a template or press escape";
out.previewButtonTitle = "Display or hide the Markdown preview mode";
out.presentButtonTitle = "Enter presentation mode"; out.presentButtonTitle = "Enter presentation mode";
out.presentSuccess = 'Hit ESC to exit presentation mode'; out.presentSuccess = 'Hit ESC to exit presentation mode';

@ -223,7 +223,7 @@ define([
var $previewButton = APP.$previewButton = Cryptpad.createButton(null, true); var $previewButton = APP.$previewButton = Cryptpad.createButton(null, true);
$previewButton.removeClass('fa-question').addClass('fa-eye'); $previewButton.removeClass('fa-question').addClass('fa-eye');
$previewButton.attr('title', 'TODO Preview'); //TODO $previewButton.attr('title', Messages.previewButtonTitle);
$previewButton.click(function () { $previewButton.click(function () {
var $codeMirror = $iframe.find('.CodeMirror'); var $codeMirror = $iframe.find('.CodeMirror');
if (CodeMirror.highlightMode !== 'markdown') { if (CodeMirror.highlightMode !== 'markdown') {
@ -239,7 +239,9 @@ define([
$rightside.append($previewButton); $rightside.append($previewButton);
if (!readOnly) { if (!readOnly) {
CodeMirror.configureLanguage(CodeMirror.configureTheme, onModeChanged); CodeMirror.configureTheme(function () {
CodeMirror.configureLanguage(null, onModeChanged);
});
} }
else { else {
CodeMirror.configureTheme(); CodeMirror.configureTheme();

@ -158,10 +158,10 @@ define([
}); });
if ($rightside) { $rightside.append($block); } if ($rightside) { $rightside.append($block); }
cb(); if (cb) { cb(); }
}; };
exp.configureTheme = function () { exp.configureTheme = function (cb) {
/* Remember the user's last choice of theme using localStorage */ /* Remember the user's last choice of theme using localStorage */
var themeKey = 'CRYPTPAD_CODE_THEME'; var themeKey = 'CRYPTPAD_CODE_THEME';
var lastTheme = localStorage.getItem(themeKey) || 'default'; var lastTheme = localStorage.getItem(themeKey) || 'default';
@ -195,6 +195,7 @@ define([
}); });
if ($rightside) { $rightside.append($block); } if ($rightside) { $rightside.append($block); }
if (cb) { cb(); }
}; };
exp.exportText = function () { exp.exportText = function () {

Loading…
Cancel
Save