diff --git a/customize.dist/BottomBar.html b/customize.dist/BottomBar.html index e5aeb9d3f..70eb8ee86 100644 --- a/customize.dist/BottomBar.html +++ b/customize.dist/BottomBar.html @@ -2,38 +2,21 @@
-

- - Made with - - in - - - - - +

+ + +
-

- - An - XWiki SAS Labs Project with the support of - OpenPaaS-ng - - +

diff --git a/customize.dist/DecorateToolbar.js b/customize.dist/DecorateToolbar.js index 3b5251805..bee23e500 100644 --- a/customize.dist/DecorateToolbar.js +++ b/customize.dist/DecorateToolbar.js @@ -3,8 +3,9 @@ */ define([ '/customize/languageSelector.js', + '/customize/messages.js', '/bower_components/jquery/dist/jquery.min.js' -], function (LS) { +], function (LS, Messages) { var $ = window.jQuery; var main = function () { $.ajax({ @@ -17,6 +18,7 @@ define([ href: '/customize/main.css' })); LS.main(); + Messages._applyTranslation(); } }); }; diff --git a/customize.dist/main.css b/customize.dist/main.css index 5511f5ae2..fc7a13de9 100644 --- a/customize.dist/main.css +++ b/customize.dist/main.css @@ -147,8 +147,13 @@ tr { margin-top: 12px; margin-bottom: 12px; white-space: nowrap; +} +.create { display: none; } +.action { + display: inline-block; +} /* Tables */ table { border-collapse: collapse; diff --git a/customize.dist/main.js b/customize.dist/main.js index d51f5b26f..3e9eab3b5 100644 --- a/customize.dist/main.js +++ b/customize.dist/main.js @@ -28,10 +28,10 @@ define([ Cryptpad.styleAlerts(); var padTypes = { - '/pad/': 'Pad', - '/code/': 'Code', - '/poll/': 'Poll', - '/slide/': 'Presentation', + '/pad/': Messages.type.pad, + '/code/': Messages.type.code, + '/poll/': Messages.type.poll, + '/slide/': Messages.type.slide, }; var $table = $('table.scroll'); @@ -85,7 +85,7 @@ define([ var $remove = $('', { 'class': 'remove', - title: "forget '"+shortTitle + "'" + title: Messages.forget + " '"+shortTitle + "'" }).text('✖').click(function () { Cryptpad.confirm(Messages.forgetPrompt + ' (' + Cryptpad.fixHTML(shortTitle) + ')', function (yes) { if (!yes) { return; } diff --git a/customize.dist/messages.js b/customize.dist/messages.js index 309ad35d0..1b21b9835 100644 --- a/customize.dist/messages.js +++ b/customize.dist/messages.js @@ -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 = [ + '

', + 'This is CryptPad, the zero knowledge realtime collaborative editor.', + '
', + 'What you type here is encrypted so only people who have the link can access it.', + '
', + 'Even the server cannot see what you type.', + '

', + '

', + '', + 'What you see here, what you hear here, when you leave here, let it stay here', + '', + '

', + ].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; }); diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index 4d808c90b..4ddd2a2f6 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -1,15 +1,20 @@ define(function () { var out = {}; + out.main_title = "Cryptpad: Editeur collaboratif en temps réel, zero knowledge"; + + out.errorBox_errorType_disconnected = 'Connexion perdue'; out.errorBox_errorExplanation_disconnected = [ 'La connexion au serveur a été perdue. Vous pouvez essayer de vous reconnecter en rechargeant la page', 'ou vous pouvez revoir votre travail en fermant cette boîte de dialogue.', ].join(''); - out.editingAlone = 'Edition seul(e)'; - out.editingWithOneOtherPerson = 'Edition avec une autre personne'; - out.editingWith = 'Edition avec'; + out.common_connectionLost = 'Connexion au serveur perdue'; + + out.editingAlone = 'Pas d\'autre participant'; + out.editingWithOneOtherPerson = 'Édition avec une autre personne'; + out.editingWith = 'Édition avec'; out.otherPeople = 'autres personnes'; out.disconnected = 'Déconnecté'; out.synchronizing = 'Synchronisation'; @@ -24,7 +29,7 @@ define(function () { out.exportPrompt = 'Comment souhaitez-vous nommer ce fichier ?'; out.back = '⇐ Retour'; - out.backToCryptpad = '⇐ Retour vers Cryptpad'; + out.backToCryptpad = '⇐ Retour vers Cryptpad'; out.changeNameButton = 'Changer de nom'; out.changeNamePrompt = 'Changer votre nom : '; @@ -38,6 +43,17 @@ define(function () { out.forgetButtonTitle = 'Enlever ce document de la liste en page d\'accueil'; out.forgetPrompt = 'Cliquer sur OK supprimera l\'URL de ce document de la mémoire de votre navigateur (localStorage), êtes-vous sûr ?'; + out.shareButton = 'PARTAGER'; + out.shareButtonTitle = "Copier l'URL dans le presse-papiers"; + out.shareSuccess = 'URL copiée dans le presse-papiers'; + out.shareFailed = "Échec de la copie de l'URL dans le presse-papiers"; + + out.presentButton = 'PRÉSENTER'; + out.presentButtonTitle = "Entrer en mode présentation"; + out.presentSuccess = 'Appuyer sur Échap pour quitter le mode présentation'; + + out.commitButton = 'VALIDER'; + out.disconnectAlert = 'Perte de la connexion au réseau !'; out.tryIt = 'Essayez-le !'; @@ -46,11 +62,6 @@ define(function () { out.okButton = 'OK (Entrée)'; out.cancelButton = 'Annuler (Echap)'; - /* We don't want to change the initial states since they may interfere with Chainpad - * out.initialState = ''; - * out.codeInitialState = ''; - */ - out.loginText = '

Votre nom d\'utilisateur et votre mot de passe sont utilisés pour générer une clé unique qui reste inconnue de notre serveur.

\n' + '

Faites attention de ne pas oublier vos identifiants puisqu\'ils seront impossible à récupérer.

'; @@ -60,9 +71,55 @@ define(function () { out.type.poll = 'Sondage'; out.type.slide = 'Présentation'; - out.main_title = "Cryptpad: Editeur collaboratif en temps réel, zero knowledge"; - - out.main_p1 = 'CryptPad l\'éditeur collaboratif en temps réel zero knowledge. Le cryptage est effectué depuis votre navigateur, ce qui protège les données contre le serveur, le cloud, et la NSA. La clé de cryptage est stockée dans l\'identifieur de fragment de l\'URL qui n\'est jamais envoyée au serveur mais est accessible depuis javascript, de sorte qu\'en partageant l\'URL, vous donner l\'accès au pad à ceux qui souhaitent participer.'; + out.forget = "Oublier"; + + // Polls + + out.poll_title = "Sélecteur de date Zero Knowledge"; + out.poll_subtitle = "Planification de rendez-vous et sondages en temps-réel et Zero Knowledge"; + + out.poll_p_save = "Vos modifications sont mises à jour instantanément, donc vous n'avez jamais besoin de sauver le contenu."; + out.poll_p_encryption = "Tout ce que vous entrez est crypté donc seules les personnes possédant le lien du sondage y ont accès. Même le serveur ne peut pas voir le contenu."; + out.poll_p_howtouse = "Entrez votre nom dans le champ ci-dessous et cochez les cases lorsque les options vous conviennent."; + + out.promptName = "Quel est votre nom ?"; + + out.wizardButton = 'ASSISTANT'; + out.wizardLog = "Cliquez sur le bouton dans le coin supérieur gauche pour retourner au sondage"; + out.wizardTitle = "Utiliser l'assistant pour créer votre sondage"; + out.wizardConfirm = "Êtes-vous vraiment prêt à ajouter ces options au sondage ?"; + + out.poll_closeWizardButton = "Fermer l'assistant"; + out.poll_closeWizardButtonTitle = "Fermer l'assistant"; + out.poll_wizardComputeButton = "Générer les options"; + out.poll_wizardClearButton = "Vider le tableau"; + out.poll_wizardDescription = "Créer automatiquement des options en entrant des dates et des horaires correspondant"; + out.poll_wizardAddDateButton = "+ Dates"; + out.poll_wizardAddTimeButton = "+ Horaires"; + + out.poll_addUserButton = "+ Utilisateurs"; + out.poll_addUserButtonTitle = "Cliquer pour ajouter un utilisateur"; + out.poll_addOptionButton = "+ Options"; + out.poll_addOptionButtonTitle = "Cliquer pour ajouter une option"; + out.poll_addOption = "Indiquer la nouvelle option"; + out.poll_optionPlaceholder = "Option"; + out.poll_addUser = "Entrer un nom"; + out.poll_userPlaceholder = "Votre nom"; + out.poll_removeOption = "Êtes-vous sûr de vouloir supprimer cette option ?"; + out.poll_removeOptionTitle = "Supprimer la ligne"; + out.poll_removeUser = "Êtes-vous sûr de vouloir supprimer cet utilisateur ?"; + out.poll_removeUserTitle = "Supprimer la colonne"; + out.poll_editOption = "Êtes-vous sûr de vouloir éditer cette option ?"; + out.poll_editOptionTitle = "Éditer la ligne"; + out.poll_editUser = "Êtes-vous sûr de vouloir éditer les choix de cet utilisateur ?"; + out.poll_editUserTitle = "Éditer la colonne"; + + out.poll_titleHint = "Titre"; + out.poll_descriptionHint = "Description"; + + // index.html + + out.main_p1 = 'CryptPad est l\'éditeur collaboratif en temps réel zero knowledge. Le cryptage est effectué depuis votre navigateur, ce qui protège les données contre le serveur, le cloud, et la NSA. La clé de cryptage est stockée dans l\'identifieur de fragment de l\'URL qui n\'est jamais envoyée au serveur mais est accessible depuis javascript, de sorte qu\'en partageant l\'URL, vous donner l\'accès au pad à ceux qui souhaitent participer.'; out.main_p2 = 'Ce projet utilise l\'éditeur visuel (WYSIWYG) CKEditor, l\'éditeur de code source CodeMirror, et le moteur temps-réel ChainPad.'; out.main_howitworks = 'Comment ça fonctionne'; out.main_howitworks_p1 = 'CryptPad utilise une variante de l\'algorithme d\'Operational transformation qui est capable de trouver un consensus distribué en utilisant une chaîne de bloc Nakamoto, un outil popularisé par le Bitcoin. De cette manière, l\'algorithme évite la nécessité d\'utiliser un serveur central pour résoudre les conflits d\'édition de l\'Operational Transformation, et sans ce besoin de résolution des conflits le serveur peut rester ignorant du contenu qui est édité dans le pad.'; @@ -81,6 +138,8 @@ define(function () { out.button_newpoll = 'CRÉER UN SONDAGE'; out.button_newslide = 'CRÉER UNE PRÉSENTATION'; + // privacy.html + out.policy_title = 'Politique de confidentialité de Cryptpad'; out.policy_whatweknow = 'Ce que nous savons de vous'; out.policy_whatweknow_p1 = 'En tant qu\'application hébergée sur le web, Cryptpad a accès aux meta-données exposées par le protocole HTTP. Ceci inclus votre adresse IP et d\'autres en-têtes HTTP qui peuvent être utilisées pour identifier votre propre navigateur. Vous pouvez voir quelles informations votre navigateur partage en visitant WhatIsMyBrowser.com.'; @@ -100,6 +159,8 @@ define(function () { out.policy_choices_vpn = 'Si vous souhaitez utiliser notre instance hébergée (cryptpad.fr) mais que vous ne souhaitez pas exposer votre adresse IP, vous pouvez la protéger en utilisant le navigateur Tor, ou un VPN.'; out.policy_choices_ads = 'Si vous souhaitez uniquement bloquer notre plateforme d\'analytique, vous pouvez utiliser un bloqueur de publicités tel que Privacy Badger.'; + // terms.html + out.tos_title = "Conditions d'utilisation de Cryptpad"; out.tos_legal = "Veuillez ne pas être malveillant, abusif, ou faire quoi que ce soit d'illégal."; out.tos_availability = "Nous espérons que vous trouvez ce service utile, mais nous ne pouvons garantir ses performances et disponibilités. Nous vous recommandons d'exporter vos données régurlièrement."; @@ -107,5 +168,10 @@ define(function () { out.tos_logs = "Les meta-données fournies par votre navigateur au serveur peuvent être enregistrées dans le but de maintenir le service."; out.tos_3rdparties = "Nous ne fournissons aucune donnée individuelle à des tierces parties à moins d'y être contraints par la loi."; + // BottomBar.html + + out.bottom_love = 'Fait avec en '; + out.bottom_support = 'Un projet XWiki SAS Labs avec le soutien de OpenPaaS-ng'; + return out; }); diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index d1fd3a29f..3a43d9209 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -1,12 +1,17 @@ define(function () { var out = {}; + out.main_title = "Cryptpad: Zero Knowledge, Collaborative Real Time Editing"; + + out.errorBox_errorType_disconnected = 'Connection Lost'; out.errorBox_errorExplanation_disconnected = [ 'Lost connection to server, you may reconnect by reloading the page or review your work ', 'by clicking outside of this box.' ].join(''); + out.common_connectionLost = 'Server Connection Lost'; + out.editingAlone = 'Editing alone'; out.editingWithOneOtherPerson = 'Editing with one other person'; out.editingWith = 'Editing with'; @@ -24,7 +29,7 @@ define(function () { out.exportPrompt = 'What would you like to name your file?'; out.back = '⇐ Back'; - out.backToCryptpad = '⇐ Back to Cryptpad'; + out.backToCryptpad = '⇐ Back to Cryptpad'; out.changeNameButton = 'Change name'; out.changeNamePrompt = 'Change your name: '; @@ -38,48 +43,82 @@ define(function () { out.forgetButtonTitle = 'remove this document from your home page listings'; out.forgetPrompt = 'Clicking OK will remove the URL for this pad from localStorage, are you sure?'; + out.shareButton = 'SHARE'; + out.shareButtonTitle = "Copy URL to clipboard"; + out.shareSuccess = 'Copied URL to clipboard'; + out.shareFailed = "Failed to copy URL to clipboard"; + + out.presentButton = 'PRESENT'; + out.presentButtonTitle = "Enter presentation mode"; + out.presentSuccess = 'Hit ESC to exit presentation mode'; + + out.commitButton = 'COMMIT'; + out.disconnectAlert = 'Network connection lost!'; - out.tryIt = 'Try it out!'; + out.tryIt = ' out!'; out.recentPads = 'Your recent pads (stored only in your browser)'; out.okButton = 'OK (enter)'; out.cancelButton = 'Cancel (esc)'; - out.initialState = [ - '

', - 'This is CryptPad, the zero knowledge realtime collaborative editor.', - '
', - 'What you type here is encrypted so only people who have the link can access it.', - '
', - 'Even the server cannot see what you type.', - '

', - '

', - '', - 'What you see here, what you hear here, when you leave here, let it stay here', - '', - '

', - ].join(''); - - out.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(''); - out.loginText = '

Your username and password are used to generate a unique key which is never known by our server.

\n' + '

Be careful not to forget your credentials, as they are impossible to recover

'; + // TODO : move at the beginning out.type = {}; out.type.pad = 'Pad'; out.type.code = 'Code'; out.type.poll = 'Poll'; out.type.slide = 'Presentation'; - out.main_title = "Cryptpad: Zero Knowledge, Collaborative Real Time Editing"; + out.forget = "Forget"; + + // Polls + + out.poll_title = "Zero Knowledge Date Picker"; + out.poll_subtitle = "Zero Knowledge, realtime scheduling"; + + out.poll_p_save = "Your settings are updated instantly, so you never need to save."; + out.poll_p_encryption = "All your input is encrypted so only people who have the link can access it. Even the server cannot see what you change."; + out.poll_p_howtouse = "Enter your name in the input field below and check the box for times when you are available"; + + out.promptName = "What is you name ?"; + + out.wizardButton = 'WIZARD'; + out.wizardLog = "Click the button in the top left to return to your poll"; + out.wizardTitle = "Use the wizard to create your poll"; + out.wizardConfirm = "Are you really ready to add these options to your poll?"; + + out.poll_closeWizardButton = "Close wizard"; + out.poll_closeWizardButtonTitle = "Close wizard"; + out.poll_wizardComputeButton = "Compute Options"; + out.poll_wizardClearButton = "Clear Table"; + out.poll_wizardDescription = "Automatically create a number of options by entering any number of dates and times segments"; + out.poll_wizardAddDateButton = "+ Dates"; + out.poll_wizardAddTimeButton = "+ Times"; + + out.poll_addUserButton = "+ Users"; + out.poll_addUserButtonTitle = "Click to add a user"; + out.poll_addOptionButton = "+ Options"; + out.poll_addOptionButtonTitle = "Click to add an option"; + out.poll_addOption = "Propose an option"; + out.poll_optionPlaceholder = "Option"; + out.poll_addUser = "Enter a name"; + out.poll_userPlaceholder = "Your name"; + out.poll_removeOption = "Are you sure you'd like to remove this option?"; + out.poll_removeOptionTitle = "Remove the row"; + out.poll_removeUser = "Are you sure you'd like to remove this user?"; + out.poll_removeUserTitle = "Remove the column"; + out.poll_editOption = "Are you sure you'd like to edit this option?"; + out.poll_editOptionTitle = "Edit the row"; + out.poll_editUser = "Are you sure you'd like to edit this user?"; + out.poll_editUserTitle = "Edit the column"; + + out.poll_titleHint = "Title"; + out.poll_descriptionHint = "Description"; + + // index.html out.main_p1 = 'CryptPad is the zero knowledge realtime collaborative editor. Encryption carried out in your web browser protects the data from the server, the cloud, and the NSA. The secret encryption key is stored in the URL fragment identifier which is never sent to the server but is available to javascript so by sharing the URL, you give authorization to others who want to participate.'; out.main_p2 = 'This project uses the CKEditor Visual Editor, CodeMirror, and the ChainPad realtime engine.'; @@ -100,6 +139,8 @@ define(function () { out.button_newpoll = 'CREATE NEW POLL'; out.button_newslide = 'CREATE NEW PRESENTATION'; + // privacy.html + out.policy_title = 'Cryptpad Privacy Policy'; out.policy_whatweknow = 'What we know about you'; out.policy_whatweknow_p1 = 'As an application that is hosted on the web, Cryptpad has access to metadata exposed by the HTTP protocol. This includes your IP address, and various other HTTP headers that can be used to identify your particular browser. You can see what information your browser is sharing by visiting WhatIsMyBrowser.com.'; @@ -119,6 +160,8 @@ define(function () { out.policy_choices_vpn = 'If you want to use our hosted instance, but don\'t want to expose your IP address, you can protect your IP using the Tor browser bundle, or a VPN.'; out.policy_choices_ads = 'If you just want to block our analytics platform, you can use adblocking tools like Privacy Badger.'; + // terms.html + out.tos_title = "Cryptpad Terms of Service"; out.tos_legal = "Please don't be malicious, abusive, or do anything illegal."; out.tos_availability = "We hope you find this service useful, but availability or performance cannot be guaranteed. Please export your data regularly."; @@ -126,5 +169,10 @@ define(function () { out.tos_logs = "Metadata provided by your browser to the server may be logged for the purpose of maintaining the service."; out.tos_3rdparties = "We do not provide individualized data to third parties unless required to by law."; + // BottomBar.html + + out.bottom_love = 'Made with in '; + out.bottom_support = 'An XWiki SAS Labs Project with the support of OpenPaaS-ng'; + return out; }); diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 2fd171ffc..b740f9585 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -716,11 +716,7 @@ define([ }; }; - $('[data-localization]').each(function (i, e) { - var $el = $(this); - var key = $el.data('localization'); - $el.html(Messages[key]); - }); + Messages._applyTranslation(); return common; }); diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 956defc4d..954b6f499 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -224,7 +224,7 @@ define([ return { failed: function () { connected = false; - userListElement.textContent = 'Disconnected'; + userListElement.textContent = Messages.disconnected; lagElement.textContent = ''; }, reconnecting: function (userId) { diff --git a/www/poll/index.html b/www/poll/index.html index 49d487487..9981f28b8 100644 --- a/www/poll/index.html +++ b/www/poll/index.html @@ -3,7 +3,7 @@ - Zero Knowledge Date Picker + Zero Knowledge Date Picker

CryptPoll

-

Zero Knowledge, realtime scheduling

+

-

Your settings are updated instantly, so you never need to save.

-

All your input is encrypted so only people who have the link can access it. Even the server cannot see what you change.

+

+



@@ -53,7 +53,7 @@
-

Enter your name in the input field below and check the box for times when you are available

+

@@ -62,7 +62,7 @@ @@ -70,7 +70,7 @@ @@ -82,28 +82,28 @@
-
+ Users
+
-
+ Options
+
diff --git a/www/poll/main.js b/www/poll/main.js index 9636beb4a..3ef0292e7 100644 --- a/www/poll/main.js +++ b/www/poll/main.js @@ -67,8 +67,8 @@ define([ module.Wizard = Wizard; // special UI elements - var $title = $('#title').attr('placeholder', Messages.dateTitleHint || 'title'); - var $description = $('#description').attr('placeholder', Messages.dateDescription || 'description'); + var $title = $('#title').attr('placeholder', Messages.poll_titleHint || 'title'); + var $description = $('#description').attr('placeholder', Messages.poll_descriptionHint || 'description'); var items = [$title, $description]; @@ -231,7 +231,7 @@ define([ 'class': 'save action', 'for': id, }) - .text('COMMIT') // TODO translate + .text(Messages.commitButton) .click(function () { module.activeColumn = ''; makeUserEditable(id, false); @@ -254,7 +254,7 @@ define([ var $user = Input({ id: id, type: 'text', - placeholder: 'your name', + placeholder: Messages.poll_userPlaceholder, disabled: true, }).on('keyup change', function () { proxy.table.cols[id] = $user.val() || ""; @@ -262,10 +262,10 @@ define([ var $edit = $('', { 'class': 'edit', - title: 'edit column', // TODO translate + title: Messages.poll_editUserTitle, }).click(function () { if ($edit.hasClass('editable')) { return; } - Cryptpad.confirm("Are you sure you'd like to edit this user?", + Cryptpad.confirm(Messages.poll_editUser, function (yes) { if (!yes) { return; } makeUserEditable(id, true); @@ -277,9 +277,9 @@ define([ var $remove = $('', { 'class': 'remove', - 'title': 'remove column', // TODO translate + 'title': Messages.poll_removeUserTitle, }).text('✖').click(function () { - Cryptpad.confirm("Are you sure you'd like to remove this user?", // TODO translate + Cryptpad.confirm(Messages.poll_removeUser, function (yes) { if (!yes) { return; } // remove commit button, and anything else... @@ -329,7 +329,7 @@ define([ var makeOption = function (proxy, id, value) { var $option = Input({ type: 'text', - placeholder: 'option', + placeholder: Messages.optionPlaceholder, id: id, }).on('keyup change', function () { proxy.table.rows[id] = $option.val(); @@ -337,11 +337,11 @@ define([ var $edit = $('', { 'class': 'edit', - title: 'edit option', // TODO translate + title: Messages.poll_editOptionTitle, }) .click(function () { if ($edit.hasClass('editable')) { return; } - Cryptpad.confirm("Are you sure you'd like to edit this option?", + Cryptpad.confirm(Messages.poll_editOption, function (yes) { if (!yes) { return; } makeOptionEditable(id, true); @@ -353,10 +353,9 @@ define([ var $remove = $('', { 'class': 'remove', - 'title': 'remove row', // TODO translate + 'title': Messages.poll_removeOptionTitle, }).text('✖').click(function () { - // TODO translate - var msg = "Are you sure you'd like to remove this option?"; + var msg = Messages.poll_removeOption; Cryptpad.confirm(msg, function (yes) { if (!yes) { return; } removeRow(proxy, id); @@ -384,7 +383,7 @@ define([ if (!module.isEditable) { return; } var id = coluid(); - var msg = "Enter a name"; // TODO translate + var msg = Messages.poll_addUser; Cryptpad.prompt(msg, "", function (name) { if (name === null) { return; } makeUser(module.rt.proxy, id, name).val(name); @@ -396,7 +395,7 @@ define([ if (!module.isEditable) { return; } var id = rowuid(); - var msg = "Propose an option"; + var msg = Messages.poll_addOption; Cryptpad.prompt(msg, "", function (option) { if (option === null || !option) { return; } makeOption(module.rt.proxy, id, option).val(option).focus(); @@ -405,7 +404,7 @@ define([ }); Wizard.$getOptions.click(function () { - Cryptpad.confirm("Are you really ready to add these options to your poll?", function (yes) { + Cryptpad.confirm(Messages.wizardConfirm, function (yes) { if (!yes) { return; } var options = Wizard.computeSlots(function (a, b) { return a + ' ('+ b + ')'; @@ -652,7 +651,7 @@ define([ var $toolbar = $('#toolbar'); - $toolbar.find('sub a').text('⇐ back to Cryptpad'); + $toolbar.find('sub a').text(Messages.backToCryptpad); var Button = function (opt) { return $('
-
+ Dates
+
-
+ Times
+