From a779d043ca3d41dba2c0ba09789ab34aa36cae46 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 13 Aug 2021 15:10:43 +0530 Subject: [PATCH 1/8] standardize capitalization of CryptPad in translated strings and fix some typos --- www/common/translations/messages.es.json | 8 ++++---- www/common/translations/messages.fi.json | 2 +- www/common/translations/messages.fr.json | 2 +- www/common/translations/messages.it.json | 6 +++--- www/common/translations/messages.json | 2 +- www/common/translations/messages.nl.json | 2 +- www/common/translations/messages.pl.json | 6 +++--- www/common/translations/messages.pt-br.json | 6 +++--- www/common/translations/messages.ro.json | 2 +- www/common/translations/messages.zh.json | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/www/common/translations/messages.es.json b/www/common/translations/messages.es.json index 01e398ef2..2c6c4e98a 100644 --- a/www/common/translations/messages.es.json +++ b/www/common/translations/messages.es.json @@ -1,5 +1,5 @@ { - "main_title": "Cryptpad: Zero Knowledge, Editor Colaborativo en Tiempo Real", + "main_title": "CryptPad: Zero Knowledge, Editor Colaborativo en Tiempo Real", "type": { "pad": "Texto enriquecido", "code": "Código", @@ -52,10 +52,10 @@ "button_newcode": "Crear nuevo pad de código", "button_newpoll": "Crear nueva encuesta", "button_newslide": "Crear nueva presentación", - "tos_title": "Condiciones de servicio Cryptpad", + "tos_title": "Condiciones de servicio CryptPad", "tos_legal": "Por favor, no seas malicioso, abusivo o hagas algo ilegal.", "tos_availability": "Esperamos que este servicio te parezca útil, pero nuestra disponibilidad o rendimiento no pueden ser garantizados. Por favor, exporta tus datos regularmente.", - "tos_e2ee": "Los documentos Cryptpad pueden ser leídos o modificados por cualquiera que pueda adivinar o que pueda tener el enlace. Recomendamos que utilices mensajes cifrados de punto a punto (e2ee) para compartir URLs, no asumimos ninguna responsabilidad en el evento de alguna fuga.", + "tos_e2ee": "Los documentos CryptPad pueden ser leídos o modificados por cualquiera que pueda adivinar o que pueda tener el enlace. Recomendamos que utilices mensajes cifrados de punto a punto (e2ee) para compartir URLs, no asumimos ninguna responsabilidad en el evento de alguna fuga.", "tos_logs": "Los metadatos entregados por el navegador al servidor pueden ser almacenados para la mantenencia del servicio.", "tos_3rdparties": "No proveemos datos individualizados a terceros a menos de ser obligados por la ley.", "header_logoTitle": "Volver a tu CryptDrive", @@ -468,7 +468,7 @@ "register_emailWarning1": "Puedes hacerlo si usted quiere, pero no se enviara a nuestros servidores.", "register_emailWarning2": "No podrá restablecer su contraseña utilizando su correo electrónico como puede hacerlo con muchos otros servicios.", "register_emailWarning3": "Si de todos modos entiende y desea utilizar su correo electrónico para su nombre de usuario, haga clic en Aceptar.", - "settings_autostoreHint": " Automático Todos los pads que visita se almacenan en su CryptDrive.
Manual (siempre pregunte) Si aún no ha guardado un pad, se le preguntará si desea para almacenarlos en su CryptDrive.
Manual (nunca preguntar) Los Pads no se almacenan automáticamente en su Cryptpad. La opción para almacenarlos estará oculta.", + "settings_autostoreHint": " Automático Todos los pads que visita se almacenan en su CryptDrive.
Manual (siempre pregunte) Si aún no ha guardado un pad, se le preguntará si desea para almacenarlos en su CryptDrive.
Manual (nunca preguntar) Los Pads no se almacenan automáticamente en su CryptDrive. La opción para almacenarlos estará oculta.", "settings_driveDuplicateTitle": "Pads de propiedad duplicadas", "settings_driveDuplicateHint": "Cuando mueve sus propias Pads a una carpeta compartida, se guarda una copia en su CryptDrive para asegurarse de que conserva su control sobre ella. Puedes ocultar archivos duplicados. Solo la versión compartida será visible, a menos que se elimine, en cuyo caso el original se mostrará en su ubicación anterior.", "settings_padWidthHint": "Cambia entre el modo de página (por defecto) que limita el ancho del editor de texto, y el uso del ancho total de la pantalla.", diff --git a/www/common/translations/messages.fi.json b/www/common/translations/messages.fi.json index c25ae8cda..5ea9f24df 100644 --- a/www/common/translations/messages.fi.json +++ b/www/common/translations/messages.fi.json @@ -503,7 +503,7 @@ "mdToolbar_check": "Tehtävälista", "mdToolbar_code": "Koodi", "mdToolbar_toc": "Sisällysluettelo", - "home_host": "Tämä on itsenäinen yhteisön ylläpitämä Cryptpad-instanssi.", + "home_host": "Tämä on itsenäinen yhteisön ylläpitämä CryptPad-instanssi.", "main_catch_phrase": "Kollaboraatioalusta
päästä päähän -salattu ja avoin lähdekoodi", "footer_aboutUs": "Tietoa meistä", "about": "Tietoa meistä", diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index 3cac83e9a..d5ac1f62e 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -1258,7 +1258,7 @@ "admin_consentToContactTitle": "Consentement à la prise de contact", "admin_checkupButton": "Exécuter le diagnostic", "admin_updateAvailableTitle": "Nouvelles versions", - "admin_updateAvailableHint": "Une nouvelle version de Cryptpad est disponible", + "admin_updateAvailableHint": "Une nouvelle version de CryptPad est disponible", "admin_checkupHint": "CryptPad est doté d'une page qui diagnostique automatiquement les problèmes de configuration courants et suggère comment les corriger si nécessaire.", "admin_checkupTitle": "Valider la configuration de l'instance", "admin_updateAvailableButton": "Lire les notes de mise à jour", diff --git a/www/common/translations/messages.it.json b/www/common/translations/messages.it.json index 06e79f80a..a6dde7de1 100644 --- a/www/common/translations/messages.it.json +++ b/www/common/translations/messages.it.json @@ -550,7 +550,7 @@ "settings_anonymous": "Non sei connesso. Queste impostazioni sono specifiche per questo browser.", "settings_deleted": "Il tuo account utente è stato cancellato. Premi OK per tornare alla home page.", "settings_deleteModal": "Condividi le seguenti informazioni con il tuo amministratore CryptPad per far rimuovere i tuoi dati dal server.", - "settings_autostoreHint": "Automatico Tutti i pad che visiti sono conservati nel tuo CryptDrive.
Manuale (chiedi sempre) Se non hai ancora conservato alcun pad ti verrà chiesto se vuoi conservarli nel tuo CryptDrive.
Manuale (non chiedere mai) I pads non sono conservati automaticamente nel tuo Cryptpad. L'opzione di conservarli sarà nascosta.", + "settings_autostoreHint": "Automatico Tutti i pad che visiti sono conservati nel tuo CryptDrive.
Manuale (chiedi sempre) Se non hai ancora conservato alcun pad ti verrà chiesto se vuoi conservarli nel tuo CryptDrive.
Manuale (non chiedere mai) I pads non sono conservati automaticamente nel tuo CryptDrive. L'opzione di conservarli sarà nascosta.", "settings_autostoreNo": "Manuale (non chiedere mai)", "settings_autostoreYes": "Automatico", "settings_autostoreTitle": "Conservazione pad nel CryptDrive", @@ -669,9 +669,9 @@ "adminPage": "Amministrazione", "admin_cat_stats": "Statistiche", "admin_cat_general": "Generale", - "survey": "Sondaggio Cryptpad", + "survey": "Sondaggio CryptPad", "crowdfunding_popup_no": "Non ora", - "crowdfunding_button": "Supporta Cryptpad", + "crowdfunding_button": "Supporta CryptPad", "autostore_pad": "pad", "autostore_sf": "cartella", "autostore_file": "file", diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index ce2f0ab57..9b4020fc4 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -404,7 +404,7 @@ "settings_importConfirm": "Are you sure you want to import recent pads from this browser to your user account's CryptDrive?", "settings_importDone": "Import completed", "settings_autostoreTitle": "Pad storage in CryptDrive", - "settings_autostoreHint": "Automatic All the pads you visit are stored in your CryptDrive.
Manual (always ask) If you have not stored a pad yet, you will be asked if you want to store them in your CryptDrive.
Manual (never ask) Pads are not stored automatically in your Cryptpad. The option to store them will be hidden.", + "settings_autostoreHint": "Automatic All the pads you visit are stored in your CryptDrive.
Manual (always ask) If you have not stored a pad yet, you will be asked if you want to store them in your CryptDrive.
Manual (never ask) Pads are not stored automatically in your CryptDrive. The option to store them will be hidden.", "settings_autostoreYes": "Automatic", "settings_autostoreNo": "Manual (never ask)", "settings_autostoreMaybe": "Manual (always ask)", diff --git a/www/common/translations/messages.nl.json b/www/common/translations/messages.nl.json index abc163cd7..36bdb7051 100644 --- a/www/common/translations/messages.nl.json +++ b/www/common/translations/messages.nl.json @@ -324,7 +324,7 @@ "settings_autostoreMaybe": "Handmatig (altijd vragen)", "settings_autostoreNo": "Handmatig (nooit vragen)", "settings_autostoreYes": "Automatisch", - "settings_autostoreHint": "Automatisch Alle geopende werkomgevingen worden automatisch opgeslagen in uw CryptDrive.
Handmatig (altijd vragen) Als u een werkomgeving nog niet hebt opgeslagen, zult u gevraagd worden of u het in uw CryptDrive wilt opslaan.
Handmatig (nooit vragen) Werkomgevingen worden niet automatisch opgeslagen in uw Cryptpad. The optie om op te slaan wordt verborgen.", + "settings_autostoreHint": "Automatisch Alle geopende werkomgevingen worden automatisch opgeslagen in uw CryptDrive.
Handmatig (altijd vragen) Als u een werkomgeving nog niet hebt opgeslagen, zult u gevraagd worden of u het in uw CryptDrive wilt opslaan.
Handmatig (nooit vragen) Werkomgevingen worden niet automatisch opgeslagen in uw CryptDrive. The optie om op te slaan wordt verborgen.", "settings_autostoreTitle": "Opslag van werkomgevingen in CryptDrive", "settings_importDone": "Importeren voltooid", "settings_importConfirm": "Weet u zeker dat u de recente pads van uw browser in uw geregistreerde CryptDrive wilt importeren?", diff --git a/www/common/translations/messages.pl.json b/www/common/translations/messages.pl.json index 9d92f4b65..9056405cf 100644 --- a/www/common/translations/messages.pl.json +++ b/www/common/translations/messages.pl.json @@ -1,5 +1,5 @@ { - "main_title": "Cryptpad: Wspólne edytowanie w czasie rzeczywistym, bez wiedzy specjalistycznej", + "main_title": "CryptPad: Wspólne edytowanie w czasie rzeczywistym, bez wiedzy specjalistycznej", "type": { "pad": "Pad", "code": "Kod", @@ -46,10 +46,10 @@ "button_newcode": "STWÓRZ PAD DO KODU", "button_newpoll": "STWÓRZ GŁOSOWANIE", "button_newslide": "STWÓRZ PREZENTACJĘ", - "tos_title": "Warunki korzystania z usług Cryptpad", + "tos_title": "Warunki korzystania z usług CryptPad", "tos_legal": "Prosimy abyś nie był złośliwy, obelżywy i nie wykorzystywał tego oprogramowania do celow niezgodnych z prawem.", "tos_availability": "Mamy nadzieję iż uznasz tę usługę za przydatną, lecz dostępność i wydajność nie mogą być przez nas gwarantowane. Prosimy, abyś eksportował swoje dane regularnie.", - "tos_e2ee": "Dokumenty Cryptpad mogą być odczytywane i modyfikowane przez każdego kto może zgadnąć lub w inny sposób uzyskać identyfikator dokumentu. Polecamy korzystania z oprogramowania szyfrującego end-to-end (e2ee) do udostępniania linków URL. Nie będziesz rościł sobie żadnych wierzytelności w wypadku gdy taki URL dostanie się w niepowołane ręce.", + "tos_e2ee": "Dokumenty CryptPad mogą być odczytywane i modyfikowane przez każdego kto może zgadnąć lub w inny sposób uzyskać identyfikator dokumentu. Polecamy korzystania z oprogramowania szyfrującego end-to-end (e2ee) do udostępniania linków URL. Nie będziesz rościł sobie żadnych wierzytelności w wypadku gdy taki URL dostanie się w niepowołane ręce.", "tos_logs": "Metadane dostarczane przez twoją przeglądarkę do serwera mogą być zapisywane i przechowywane w celu utrzymywania serwisu.", "tos_3rdparties": "Nie dostarczamy indywidualizowanych danych do osób trzecich, poza sytuacjami dyktowanymi prawnie.", "header_logoTitle": "Przejdź na stronę główną" diff --git a/www/common/translations/messages.pt-br.json b/www/common/translations/messages.pt-br.json index a84f312bf..16a65ff73 100644 --- a/www/common/translations/messages.pt-br.json +++ b/www/common/translations/messages.pt-br.json @@ -1,5 +1,5 @@ { - "main_title": "Cryptpad: Zero Knowledge, Edição Colaborativa em Tempo Real", + "main_title": "CryptPad: Zero Knowledge, Edição Colaborativa em Tempo Real", "type": { "pad": "Notas", "code": "Código", @@ -212,7 +212,7 @@ "contact": "Contact", "terms": "ToS", "blog": "Blog", - "tos_title": "Termos de serviço doCryptpad", + "tos_title": "Termos de serviço do CryptPad", "tos_legal": "Pedimos encarecidamente que, como usuário desta plataforma, você evite a prática de quaisquer atos ilegais e que evite a utilização maliciosa e/ou abusiva desta plataforma.", "tos_availability": "Nós esperamos que você ache este serviço útil, porém nós não podemos garantir a disponibilidade constante ou a alta performance do mesmo. Por favor, mantenha um backup dos seus dados como forma de segurança adicional.", "tos_e2ee": "Os documentos do CryptPad podem ser modificados por qualquer um que conseguir adivinhar ou obter de qualquer forma o seu identificador único. Nós recomendamos que você utilize criptografia ponto a ponto de mensagens (e2ee) sempre que possível para compartilhar suas URL's. Nós não assumimos qualquer responsabilidade sobre chaves e/ou URL’s e seus respectivos conteúdos vazadas para o público.", @@ -363,7 +363,7 @@ "settings_autostoreNo": "Manual (nunca perguntar)", "settings_autostoreMaybe": "Manual (sempre perguntar)", "settings_autostoreYes": "Automático", - "settings_autostoreHint": "Automatico Todos os blocos que visitou estão armazenados no seu CryptDrive.
Manual (sempre pergunta) Se você não armazenou um bloco ainda, você será questionado se quer armazenar no seu CryptDrive.
Manual (nunca pergunta) Blocos não são armazenados automaticamente no seu CryptPad. A opção para armazena-los estará escondida.", + "settings_autostoreHint": "Automatico Todos os blocos que visitou estão armazenados no seu CryptDrive.
Manual (sempre pergunta) Se você não armazenou um bloco ainda, você será questionado se quer armazenar no seu CryptDrive.
Manual (nunca pergunta) Blocos não são armazenados automaticamente no seu CryptDrive. A opção para armazena-los estará escondida.", "settings_autostoreTitle": "Bloco armazenado no CryptDrive", "settings_resetThumbnailsDone": "Todas as miniaturas foram apagadas.", "settings_resetThumbnailsDescription": "Limpar todos as miniaturas de blocos armazenadas no seu navegador.", diff --git a/www/common/translations/messages.ro.json b/www/common/translations/messages.ro.json index abd56ff20..80c30b11f 100644 --- a/www/common/translations/messages.ro.json +++ b/www/common/translations/messages.ro.json @@ -433,7 +433,7 @@ "settings_autostoreMaybe": "Manual (întreabă întotdeauna)", "settings_autostoreNo": "Manual (nu mai întreba)", "settings_autostoreYes": "Automat", - "settings_autostoreHint": "Automat Toate documentele accesate sunt stocate în CryptDrive-ul dumneavoastră.
Manual (întreabă întotdeauna) Dacă nu ai stocat încă un document, vei fi întrebat dacă dorești să îl stochezi în Cryptdrive-ul tău.
Manual (nu mai întreba) Documentele nu sunt stocate automat în Cryptpad-ul tău. Opțiunea de a le stoca ulterior va fi ascunsă.", + "settings_autostoreHint": "Automat Toate documentele accesate sunt stocate în CryptDrive-ul dumneavoastră.
Manual (întreabă întotdeauna) Dacă nu ai stocat încă un document, vei fi întrebat dacă dorești să îl stochezi în Cryptdrive-ul tău.
Manual (nu mai întreba) Documentele nu sunt stocate automat în CryptDrive-ul tău. Opțiunea de a le stoca ulterior va fi ascunsă.", "settings_autostoreTitle": "Capacitatea de stocare a documentelor în CryptDrive", "register_emailWarning2": "Nu veți putea să vă resetați parola folosind adresa de e-mail, așa cum puteți cu multe alte servicii.", "register_emailWarning1": "Poți proceda astfel dacă doreşti, însă nici o notificare nu va fi transmisă server-ului nostru.", diff --git a/www/common/translations/messages.zh.json b/www/common/translations/messages.zh.json index ca0b85c73..ffd689308 100644 --- a/www/common/translations/messages.zh.json +++ b/www/common/translations/messages.zh.json @@ -208,7 +208,7 @@ "upload_pending": "待處理", "upload_cancelled": "已取消的", "upload_size": "大小", - "footer_aboutUs": "關於 Cryptpad", + "footer_aboutUs": "關於 CryptPad", "about": "關於", "privacy": "隱私", "contact": "聯繫", From f12a276c78b6175de6e864a9076f16f9ceaeaa7a Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 13 Aug 2021 15:18:43 +0530 Subject: [PATCH 2/8] correct inconsistent capitalization of 'CryptPad' in markdown files. Add a rule to the translation linter to detect future inconsistencies. --- docs/ARCHITECTURE.md | 8 +- readme.md | 4 +- scripts/find-html-translations.js | 99 ---------------------- scripts/lint-translations.js | 131 ++++++++++++++++++++++++++++-- 4 files changed, 131 insertions(+), 111 deletions(-) delete mode 100644 scripts/find-html-translations.js diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 0d1d94873..a4081e568 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -2,7 +2,7 @@ So you want to write a realtime collaborative application? This guide will focus on applications which require **multiple clients** to **collaboratively construct a single authoratative document**. -[XWiki-Labs](https://labs.xwiki.com/) has published an open source suite (called [Cryptpad](https://github.com/xwiki-labs/cryptpad)) of collaborative editors which employ end to end encryption. +[XWiki-Labs](https://labs.xwiki.com/) has published an open source suite (called [CryptPad](https://github.com/xwiki-labs/cryptpad)) of collaborative editors which employ end to end encryption. This guide will refer to the techniques used in the prototypes developed therein. Let's start with an overview of the components involved. @@ -75,7 +75,7 @@ Chainpad can handle out of order messages, but it performs best when its message By architecting your system such that all clients send to a server which then relays to other clients, you guarantee that a particular chain of patches is consistent between the participants of your session. -Cryptpad is capable of using a variety of data stores. +CryptPad is capable of using a variety of data stores. Which data store your instance employs can be [easily configured](https://github.com/xwiki-labs/cryptpad/blob/master/config.example.js). You simply need to write an adaptor which conforms to a simple API. @@ -85,7 +85,7 @@ Whether you decide to use a single server, or distribute messages across a netwo ## Transport -Cryptpad was initially written to use [websockets](https://en.wikipedia.org/wiki/WebSocket) for transportation of messages. +CryptPad was initially written to use [websockets](https://en.wikipedia.org/wiki/WebSocket) for transportation of messages. Since a relay server is indispensable in this model, that server doubles as the **History Keeper**, and implements a datastore. @@ -202,7 +202,7 @@ That isn't to say that there are no tradeoffs when keeping that information from ### Our Encryption Scheme -The encryption scheme employed by Cryptpad is a [symmetric encryption](https://en.wikipedia.org/wiki/Symmetric-key_algorithm) which utilizes a single [pre-shared-key](https://en.wikipedia.org/wiki/Pre-shared_key) known by all participants. +The encryption scheme employed by CryptPad is a [symmetric encryption](https://en.wikipedia.org/wiki/Symmetric-key_algorithm) which utilizes a single [pre-shared-key](https://en.wikipedia.org/wiki/Pre-shared_key) known by all participants. Encryption is complex, and poorly understood by the majority of those who use it on a daily basis. Pre-shared-keys are among the weakest possible cryptographic tools available today, however, few if any other encryption schemes scale to any number of users. diff --git a/readme.md b/readme.md index f4b979bf3..e6982a0fe 100644 --- a/readme.md +++ b/readme.md @@ -20,7 +20,7 @@ The most recent version and all past release notes can be found [here](https://g ## Setup using Docker -See [Cryptpad-Docker](https://github.com/xwiki-labs/cryptpad-docker) repository for details on how to get up-and-running with Cryptpad in Docker. This repository is maintained by the community and not officially supported. +See [CryptPad-Docker](https://github.com/xwiki-labs/cryptpad-docker) repository for details on how to get up-and-running with CryptPad in Docker. This repository is maintained by the community and not officially supported. # Security @@ -72,7 +72,7 @@ CryptPad is actively developed by a team at [XWiki SAS](https://www.xwiki.com), We love Open Source and we love contribution. Learn more about [contributing](https://docs.cryptpad.fr/en/how_to_contribute.html). -If you have any questions or comments, or if you're interested in contributing to Cryptpad, come say hi in our [Matrix channel](https://app.element.io/#/room/#cryptpad:matrix.xwiki.com). +If you have any questions or comments, or if you're interested in contributing to CryptPad, come say hi in our [Matrix channel](https://app.element.io/#/room/#cryptpad:matrix.xwiki.com). # License diff --git a/scripts/find-html-translations.js b/scripts/find-html-translations.js deleted file mode 100644 index 218342137..000000000 --- a/scripts/find-html-translations.js +++ /dev/null @@ -1,99 +0,0 @@ -var EN = require("../www/common/translations/messages.json"); - -var simpleTags = [ - '
', - '', - '', - - // FIXME - "", - '', - '

', - '

', - - // FIXME register_notes - '
    ', - '
', - '
  • ', - '
  • ', - '', - '', -]; - -['a', 'b', 'em', 'p', 'i'].forEach(function (tag) { - simpleTags.push('<' + tag + '>'); - simpleTags.push(''); -}); - -// these keys are known to be problematic -var KNOWN_ISSUES = [ // FIXME - //'newVersion', - //'fm_info_anonymous', - //'register_notes', -]; - -var processLang = function (map, lang, primary) { - var announced = false; - var announce = function () { - if (announced) { return; } - announced = true; - console.log("NEXT LANGUAGE: ", lang); - }; - - Object.keys(map).forEach(function (k) { - if (!EN[k]) { return; } - if (KNOWN_ISSUES.indexOf(k) !== -1) { return; } - - var s = map[k]; - if (typeof(s) !== 'string') { return; } - var usesHTML; - - s.replace(/<.*?>/g, function (html) { - if (simpleTags.indexOf(html) !== -1) { return; } - announce(); - usesHTML = true; - if (!primary) { - console.log("{%s}", html); - } - }); - - if (usesHTML) { - announce(); - console.log("%s", s); - console.log("[%s]\n", k); - } - }); -}; - -processLang(EN, 'en', true); - -[ - 'ar', - //'bn_BD', - 'ca', - 'de', - 'es', - 'fi', - 'fr', - 'hi', - 'it', - 'ja', - 'nb', - 'nl', - 'pl', - 'pt-br', - 'ro', - 'ru', - 'sv', - //'te', - 'tr', - 'zh', -].forEach(function (lang) { - try { - var map = require("../www/common/translations/messages." + lang + ".json"); - if (!Object.keys(map).length) { return; } - processLang(map, lang); - } catch (err) { - console.error(err); - } -}); diff --git a/scripts/lint-translations.js b/scripts/lint-translations.js index a38cd615a..bc18dd724 100644 --- a/scripts/lint-translations.js +++ b/scripts/lint-translations.js @@ -1,8 +1,127 @@ -// TODO unify the following scripts - // unused-translations.js - // find-html-translations +var EN = require("../www/common/translations/messages.json"); -// more linting - // Search for 'Cryptpad' string (should be 'CryptPad') - // Search English for -ise\s +var simpleTags = [ + '
    ', + '
    ', + '', + // FIXME + "", + '', + '

    ', + '

    ', + + // FIXME register_notes + '
      ', + '
    ', + '
  • ', + '
  • ', + '', + '', +]; + +['a', 'b', 'em', 'p', 'i'].forEach(function (tag) { + simpleTags.push('<' + tag + '>'); + simpleTags.push(''); +}); + +// these keys are known to be problematic +var KNOWN_ISSUES = [ // FIXME + //'newVersion', + //'fm_info_anonymous', + //'register_notes', +]; + +var special_rules = {}; + +special_rules.en = function (s) { + // Prefer the american -ize suffix for verbs rather than -ise + return /[^w]ise/.test(s); +}; + +special_rules.fr = function (s) { +/* + hacky regexp to check whether there are any instances of ':' + which do not have the preceding space as is expected. + ignore instances where the following character is a '/' + because this is probably a URL (http(s)://) +*/ + return /\S[:;\?\!][^\/]{1,}/.test(s); +}; + +var noop = function () {}; + +var processLang = function (map, lang, primary) { + var announced = false; + var announce = function () { + if (announced) { return; } + announced = true; + console.log("NEXT LANGUAGE: ", lang); + }; + + var special = special_rules[lang] || noop; + Object.keys(map).forEach(function (k) { + if (!EN[k]) { return; } + if (KNOWN_ISSUES.indexOf(k) !== -1) { return; } + + var s = map[k]; + if (typeof(s) !== 'string') { return; } + var usesHTML; + + s.replace(/<.*?>/g, function (html) { + if (simpleTags.indexOf(html) !== -1) { return; } + announce(); + usesHTML = true; + if (!primary) { + console.log("{%s}", html); + } + }); + + var weirdCapitalization; + s.replace(/cryptpad(\.fr)*/gi, function (brand) { + if (['CryptPad', 'cryptpad.fr'].includes(brand)) { return; } + weirdCapitalization = true; + }); + + var specialViolation = special(s); + + if (usesHTML || weirdCapitalization || specialViolation) { + announce(); + console.log("%s", s); + console.log("[%s]\n", k); + } + }); +}; + +processLang(EN, 'en', true); + +[ + 'ar', + //'bn_BD', + 'ca', + 'de', + 'es', + 'fi', + 'fr', + 'hi', + 'it', + 'ja', + 'nb', + 'nl', + 'pl', + 'pt-br', + 'ro', + 'ru', + 'sv', + //'te', + 'tr', + 'zh', +].forEach(function (lang) { + try { + var map = require("../www/common/translations/messages." + lang + ".json"); + if (!Object.keys(map).length) { return; } + processLang(map, lang); + } catch (err) { + console.error(err); + } +}); From f701e30364828beea7a7fc669763ff1d6b37afd4 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 13 Aug 2021 15:45:54 +0530 Subject: [PATCH 3/8] correct invalid use of ':' in french translations --- www/common/translations/messages.fr.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index d5ac1f62e..e814ad87b 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -121,7 +121,7 @@ "printTransition": "Activer les animations de transition", "printBackground": "Utiliser une image d'arrière-plan", "printBackgroundButton": "Choisir une image", - "printBackgroundValue": "Arrière-plan actuel: {0}", + "printBackgroundValue": "Arrière-plan actuel : {0}", "printBackgroundNoValue": "Aucun arrière-plan affiché", "printBackgroundRemove": "Supprimer cet arrière-plan", "filePickerButton": "Intégrer un fichier stocké dans CryptDrive", @@ -289,14 +289,14 @@ "fm_error_cantPin": "Erreur interne du serveur. Veuillez recharger la page et essayer de nouveau.", "fm_viewListButton": "Liste", "fm_viewGridButton": "Grille", - "fm_renamedPad": "Vous avez renommé ce pad dans votre Drive. Son titre est:
    {0}", + "fm_renamedPad": "Vous avez renommé ce pad dans votre Drive. Son titre est :
    {0}", "fm_canBeShared": "Ce dossier peut être partagé", "fm_prop_tagsList": "Mots-clés", "fm_burnThisDriveButton": "Effacer toutes les informations stockées par CryptPad dans votre navigateur", "fm_burnThisDrive": "Êtes-vous sûr de vouloir supprimer tout ce qui est stocké par CryptPad dans votre navigateur ?
    Cette action supprimera votre CryptDrive et son historique de votre navigateur, mais les pads existeront toujours (de manière chiffrée) sur notre serveur.", "fm_padIsOwned": "Vous êtes le propriétaire de ce pad", "fm_padIsOwnedOther": "Ce pad est la propriété d'un autre utilisateur", - "fm_deletedPads": "Ces pads n'existent plus sur le serveur, ils ont été supprimés de votre CryptDrive: {0}", + "fm_deletedPads": "Ces pads n'existent plus sur le serveur, ils ont été supprimés de votre CryptDrive : {0}", "fm_tags_name": "Mot-clé", "fm_tags_used": "Nombre d'utilisations", "fm_restoreDrive": "Restauration de votre CryptDrive à une version antérieure. Pour de meilleurs résultats, veuillez éviter de modifier votre CryptDrive avant que cette restauration ne soit terminée.", From 04234aa1f406212de009ea5d29eff6c49d837997 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 13 Aug 2021 15:52:14 +0530 Subject: [PATCH 4/8] fix a typo in a class --- www/checkup/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/checkup/main.js b/www/checkup/main.js index a262d0e4c..3118be749 100644 --- a/www/checkup/main.js +++ b/www/checkup/main.js @@ -915,7 +915,7 @@ define([ var $progress = $('#cp-progress'); var versionStatement = function () { - return h('p.cp--notice-version', [ + return h('p.cp-notice-version', [ "This instance is running ", h('span.cp-app-checkup-version',[ "CryptPad", From b7f627d896e9a9ca57fa3213bf1051cf0cd1e128 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 13 Aug 2021 15:53:42 +0530 Subject: [PATCH 5/8] update version string for 4.10.0 and commit some new 'npm run' commands while we're at it --- customize.dist/pages.js | 2 +- package-lock.json | 2 +- package.json | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index 18d65c680..fa183f90c 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -105,7 +105,7 @@ define([ var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ? '/imprint.html' : AppConfig.imprint); - Pages.versionString = "v4.9.0"; + Pages.versionString = "v4.10.0"; // used for the about menu diff --git a/package-lock.json b/package-lock.json index 42136e238..a3b92de86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cryptpad", - "version": "4.9.0", + "version": "4.10.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 68a315891..a844167f5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cryptpad", "description": "realtime collaborative visual editor with zero knowlege server", - "version": "4.9.0", + "version": "4.10.0", "license": "AGPL-3.0+", "repository": { "type": "git", @@ -45,7 +45,8 @@ "lint:js": "jshint --config .jshintrc --exclude-path .jshintignore .", "lint:server": "jshint --config .jshintrc lib", "lint:less": "./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/", - "lint:translations": "node ./scripts/unused-translations.js", + "lint:translations": "node ./scripts/lint-translations.js", + "unused-translations": "node ./scripts/unused-translations.js", "test": "node scripts/TestSelenium.js", "test-rpc": "cd scripts/tests && node test-rpc", "template": "cd customize.dist/src && for page in ../index.html ../privacy.html ../terms.html ../contact.html ../what-is-cryptpad.html ../features.html ../../www/login/index.html ../../www/register/index.html ../../www/user/index.html;do echo $page; cp template.html $page; done;", From 9b3cd7dae39f8a514aed67738114c52c7851176c Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 13 Aug 2021 15:54:10 +0530 Subject: [PATCH 6/8] WIP changelog for 4.10.0 --- CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce9059d04..56fae6b54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,38 @@ -# WIP +# 4.10.0 + +## Goals + + +## Update notes + +## Features + +* screen real-estate + * kanban + * narrower 'add board' button + * 'Tools' menu to collapse the tag and view mode UI + * general + * main toolbar collapse +* remove unused files + * /common/noscriptfix.js +* more detailed inventory of dependencies + * see cryptpad/www/lib/changelog.md +* include vendor and appVersion in support ticket data +* log when trimming history +* rewrite some translation keys to use a single syntax for BR tags +* translations + * more linting + * standardized capitalization of "CryptPad" + * avoid raw injection of HTML strictly for adding line breaks + * remove some unnecessary cases of raw HTML injection +* checkup + * better styles + * improved formatting for returned values in failed tests + * display browser and OS for when people send us screenshots instead of URLs + * test for support of some features in the browser (inside the sandbox) +* mark password inputs as _new passwords_ so that browsers don't suggest you input and share your account password + +## Bug fixes * Sheet export * most exports broken by Chrome 92, mostly fixed @@ -7,18 +41,14 @@ * some new browser-specific checkup tests to make it easier to detect future regressions in the APIs * drive bug fixes * guard against a few possible type errors -* screen real-estate - * kanban - * narrower 'add board' button - * 'Tools' menu to collapse the tag and view mode UI - * general - * main toolbar collapse + * "burn this drive" button works again in Firefox * clear login token 1. when you delete your account 2. when logging in -* remove unused files - * /common/noscriptfix.js -* include vendor and appVersion in support ticket data +* use single version of less.js on the client +* abort subsequent actions when metadata fails to load during owned channel archival +* handle warnings when trimming history (not just errors) +* filter channel ids with invalid lengths when generating a list of all channels you use # 4.9.0 From 69a393f374005eb0eca1f8e118d0e90881ad80c5 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 13 Aug 2021 15:54:53 +0530 Subject: [PATCH 7/8] add support for alternate icons and text in 'toggle' buttons --- www/common/common-ui-elements.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 19a124180..81327844f 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -526,6 +526,7 @@ define([ var button; var sframeChan = common.getSframeChannel(); var appType = (common.getMetadataMgr().getMetadata().type || 'pad').toUpperCase(); + data = data || {}; switch (type) { case 'export': button = $('