From 401db8fce31aa2026c5603f00d80e258d14977cf Mon Sep 17 00:00:00 2001 From: Sebastian Castro <90scastro@gmail.com> Date: Fri, 15 Feb 2019 18:14:02 +0100 Subject: [PATCH] chat: Adds placeholder to input. Translate stick button --- src/locales/en.json | 2 ++ src/locales/es.json | 2 ++ src/locales/fr.json | 2 ++ src/locales/qqq.json | 2 ++ src/static/js/html10n.js | 3 ++- src/templates/pad.html | 4 ++-- 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index e438fa1b4..c8ef1a7ae 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -116,6 +116,8 @@ "pad.chat": "Chat", "pad.chat.title": "Open the chat for this pad.", "pad.chat.loadmessages": "Load more messages", + "pad.chat.stick.title": "Stick chat to screen", + "pad.chat.writeMessage.placeholder": "Write your message here", "timeslider.pageTitle": "{{appTitle}} Timeslider", "timeslider.toolbar.returnbutton": "Return to pad", diff --git a/src/locales/es.json b/src/locales/es.json index 747ec7bf5..c22803f3e 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -99,6 +99,8 @@ "pad.chat": "Chat", "pad.chat.title": "Abrir el chat para este pad.", "pad.chat.loadmessages": "Cargar más mensajes", + "pad.chat.stick.title": "Ampliar", + "pad.chat.writeMessage.placeholder": "Enviar un mensaje", "timeslider.pageTitle": "{{appTitle}} Línea de tiempo", "timeslider.toolbar.returnbutton": "Volver al pad", "timeslider.toolbar.authors": "Autores:", diff --git a/src/locales/fr.json b/src/locales/fr.json index b7f59885b..574858dd1 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -109,6 +109,8 @@ "pad.chat": "Clavardage", "pad.chat.title": "Ouvrir le clavardoir de ce pad.", "pad.chat.loadmessages": "Charger davantage de messages", + "pad.chat.stick.title": "Agrandir le chat", + "pad.chat.writeMessage.placeholder": "Entrez votre message ici", "timeslider.pageTitle": "Historique dynamique de {{appTitle}}", "timeslider.toolbar.returnbutton": "Retourner au pad", "timeslider.toolbar.authors": "Auteurs :", diff --git a/src/locales/qqq.json b/src/locales/qqq.json index 60d62b196..512ef6a31 100644 --- a/src/locales/qqq.json +++ b/src/locales/qqq.json @@ -83,6 +83,8 @@ "pad.chat": "Used as button text and as title of Chat window.\n{{Identical|Chat}}", "pad.chat.title": "Used as tooltip for the Chat button", "pad.chat.loadmessages": "chat messages", + "pad.chat.stick.title": "Tooltip for the stick chat button", + "pad.chat.writeMessage.placeholder": "Placeholder for the chat input", "timeslider.pageTitle": "{{doc-important|Please leave {{appTitle}} parameter untouched. It will be replaced by app title.}}\nInserted into HTML title tag.", "timeslider.toolbar.returnbutton": "Used as link title", "timeslider.toolbar.authors": "A list of Authors follows after the colon.\n{{Identical|Author}}", diff --git a/src/static/js/html10n.js b/src/static/js/html10n.js index 8dea84c28..8fbc6f643 100644 --- a/src/static/js/html10n.js +++ b/src/static/js/html10n.js @@ -854,7 +854,8 @@ window.html10n = (function(window, document, undefined) { , "value": 1 , "placeholder": 1 } - if (index > 0 && str.id.substr(index + 1) in attrList) { // an attribute has been specified + if (index > 0 && str.id.substr(index + 1) in attrList) { + // an attribute has been specified (example: "my_translation_key.placeholder") prop = str.id.substr(index + 1) } else { // no attribute: assuming text content by default prop = document.body.textContent ? 'textContent' : 'innerText' diff --git a/src/templates/pad.html b/src/templates/pad.html index c40116d3a..0e067113e 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -334,7 +334,7 @@
- █   + █  
@@ -342,7 +342,7 @@
- +