From 66487785687559ecad27e8cdaa6a710e453aba5f Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 8 Apr 2019 13:18:30 +0000 Subject: [PATCH 01/10] Translated using Weblate (English) Currently translated at 100.0% (945 of 945 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (944 of 944 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (943 of 943 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (942 of 942 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (941 of 941 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (940 of 940 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (939 of 939 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (938 of 938 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (937 of 937 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (936 of 936 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (935 of 935 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (934 of 934 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (933 of 933 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (932 of 932 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (931 of 931 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (930 of 930 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (930 of 930 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (929 of 929 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (928 of 928 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (927 of 927 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (926 of 926 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (925 of 925 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (924 of 924 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (923 of 923 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ --- www/common/translations/messages.json | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 8d0d2c107..5b11285a5 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -1016,5 +1016,28 @@ "crowdfunding_popup_no": "Not now", "crowdfunding_popup_never": "Don't ask me again", "markdown_toc": "Contents", - "fm_expirablePad": "This pad will expire on {0}" + "fm_expirablePad": "This pad will expire on {0}", + "admin_authError": "Only administrators can access this page", + "admin_cat_general": "General", + "admin_cat_stats": "Statistics", + "adminPage": "Administration", + "admin_activeSessionsTitle": "Active connections", + "admin_activeSessionsHint": "Number of active websocket connections (and unique IP addresses connected)", + "admin_activePadsTitle": "Active pads", + "admin_activePadsHint": "Number of unique documents currently being viewed or edited", + "admin_registeredTitle": "Registered users", + "admin_registeredHint": "Number of users registered on your instance", + "admin_updateLimitTitle": "Update user quotas", + "admin_updateLimitHint": "Forcing an update of user storage limits can be done any time, but is only necessary in the event of an error", + "admin_updateLimitButton": "Update quotas", + "admin_updateLimitDone": "Update completed successfully", + "admin_flushCacheTitle": "Flush HTTP Cache", + "admin_flushCacheHint": "Force users to download the latest clientside assets (only if your server is in fresh mode)", + "admin_flushCacheButton": "Flush cache", + "admin_flushCacheDone": "Cache flushed successfully", + "footer_product": "Product", + "footer_team": "The team", + "footer_donate": "Donate", + "footer_legal": "Legal", + "footer_tos": "Terms" } From a4df5b8e69e7ed0a79554edd257283b8cb2ea7ba Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 8 Apr 2019 15:32:31 +0200 Subject: [PATCH 02/10] Update translation keys in the contact page --- customize.dist/pages.js | 2 +- customize.dist/pages/contact.js | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index f6a3199c0..17665c31c 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -81,7 +81,7 @@ define([ footLink('https://cryptpad.fr/what-is-cryptpad.html', 'topbar_whatIsCryptpad'), footLink('/faq.html', 'faq_link'), footLink('https://github.com/xwiki-labs/cryptpad', null, 'GitHub'), - footLink('https://opencollective.com/cryptpad/contribute/', null, 'Donate'), + footLink('https://opencollective.com/cryptpad/contribute/', 'footer_donate'), ]), footerCol('footer_aboutUs', [ /*footLink('https://blog.cryptpad.fr', 'blog'), diff --git a/customize.dist/pages/contact.js b/customize.dist/pages/contact.js index 113b5054b..aea511fb4 100644 --- a/customize.dist/pages/contact.js +++ b/customize.dist/pages/contact.js @@ -15,7 +15,8 @@ define([ h('div.container.cp-container', [ Config.adminEmail !== 'i.did.not.read.my.config@cryptpad.fr' ? h('div.row.cp-iconCont.align-items-center', [ h('div.col-12', - Pages.setHTML(h('h4.text-center'), Msg.contact_admin) + Pages.setHTML(h('h4.text-center'), Msg.contact_admin), + h('p', Msg.contact_adminHint) ), h('div.col-12.col-sm-6.col-md-3.col-lg-3', h('a.card', {href : "mailto:"+Config.adminEmail}, @@ -30,14 +31,15 @@ define([ ]) : undefined, h('div.row.cp-iconCont.align-items-center', [ h('div.col-12', - Pages.setHTML(h('h4.text-center'), Msg.contact_dev) + Pages.setHTML(h('h4.text-center'), Msg.contact_dev), + h('p', Msg.contact_devHint) ), h('div.col-12.col-sm-6.col-md-3.col-lg-3', h('a.card', {href : "https://twitter.com/cryptpad"}, h('div.card-body', h('p', [ h('img', {src: '/customize/images/twitter.svg'}), - Msg.contact_devTwitter || 'Twitter' + 'Twitter' ]) ) ) @@ -47,7 +49,7 @@ define([ h('div.card-body', h('p', [ h('img', {src: '/customize/images/mastodon.svg'}), - Msg.contact_devMastodon || 'Mastodon' + 'Mastodon' ]) ) ) @@ -57,7 +59,7 @@ define([ h('div.card-body', h('p', [ h('img', {src: '/customize/images/issue.svg'}), - Msg.contact_devBug || 'Bug report' + Msg.contact_bug || 'Bug report' ]) ) ) @@ -67,7 +69,7 @@ define([ h('div.card-body', h('p', [ h('img', {src: '/customize/images/sayhi.svg'}), - Msg.contact_devChat || 'Chat' + Msg.contact_chat || 'Chat' ]) ) ) From 623945010ce5cd7bdba326cd9909fa82ca8e92dc Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 8 Apr 2019 13:33:57 +0000 Subject: [PATCH 03/10] Translated using Weblate (English) Currently translated at 100.0% (952 of 952 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (951 of 951 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (950 of 950 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (949 of 949 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (948 of 948 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (947 of 947 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (946 of 946 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ --- www/common/translations/messages.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 5b11285a5..a91f718e8 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -1039,5 +1039,12 @@ "footer_team": "The team", "footer_donate": "Donate", "footer_legal": "Legal", - "footer_tos": "Terms" + "footer_tos": "Terms", + "contact_admin": "Contact the administrators", + "contact_adminHint": "For any issues related to your account, storage limit, or availability of their service.", + "contact_dev": "Contact the developers", + "contact_devHint": "For feature requests, usability improvements, or to say thank you", + "contact_bug": "Bug report", + "contact_chat": "Chat", + "contact_email": "Email" } From 6899c8c4f147546795caa7c4b1fc780cc4e35604 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 8 Apr 2019 15:35:43 +0200 Subject: [PATCH 04/10] Remove old translations --- www/common/translations/messages.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 5b11285a5..51e93c9dc 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -608,11 +608,6 @@ "about_intro": "CryptPad is created inside of the Research Team at XWiki SAS, a small business located in Paris France and Iasi Romania. There are 3 core team members working on CryptPad plus a number of contributors both inside and outside of XWiki SAS.", "about_core": "Core Developers", "about_contributors": "Key Contributors", - "main_about_p22": "Tweet us", - "main_about_p23": "open an issue on GitHub", - "main_about_p24": "say Hello (Matrix)", - "main_about_p25": "send us an email", - "main_about_p26": "If you have any questions or comments, feel free to reach out!", "main_info": "

Collaborate in Confidence

Grow your ideas together with shared documents while Zero Knowledge technology secures your privacy; even from us.", "main_catch_phrase": "The Zero Knowledge Cloud", "main_footerText": "With CryptPad, you can make quick collaborative documents for taking notes and writing down ideas together.", From b2ae889d0506c9057b5acbb28fb7262a6fdb2f62 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 8 Apr 2019 13:36:25 +0000 Subject: [PATCH 05/10] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/ --- www/common/translations/messages.fr.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index 20fa03392..d7ff41ba4 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -603,11 +603,6 @@ "about_intro": "CryptPad est développé au sein de l'équipe Recherche d'XWiki SAS, une petite entreprise située à Paris en France et à Iasi en Roumanie. Il y a 3 développeurs principaux qui travaillent sur CryptPad, ainsi que quelques contributeurs à la fois dans et en dehors d'XWiki SAS.", "about_core": "Développeurs principaux", "about_contributors": "Contributeurs clés", - "main_about_p22": "Tweetez-nous", - "main_about_p23": "Ouvrez un ticket (GitHub)", - "main_about_p24": "Dites Bonjour (Matrix)", - "main_about_p25": "Envoyez-nous un email", - "main_about_p26": "Si vous avez une question ou des remarques, n'hésitez pas à nous contacter !", "main_info": "

Collaborez avec confiance

Développez vos idées en groupe avec des documents partagés; la technologie Zero Knowledge sécurise vos données.", "main_catch_phrase": "Le Cloud Zero Knowledge", "main_footerText": "Avec CryptPad, vous pouvez créer des documents collaboratifs rapidement pour prendre des notes à plusieurs.", From 7932e4f57856776966810db065a4ed9f930f6c9a Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 8 Apr 2019 13:36:25 +0000 Subject: [PATCH 06/10] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/ --- www/common/translations/messages.de.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/www/common/translations/messages.de.json b/www/common/translations/messages.de.json index b725c2326..ea82786f9 100644 --- a/www/common/translations/messages.de.json +++ b/www/common/translations/messages.de.json @@ -599,11 +599,6 @@ "about_intro": "CryptPad wurde erstellt im Forschungsteam von XWiki SAS, einem kleinen Unternehmen in Paris (Frankreich) und Iasi (Rumänien). Im Kernteam arbeiten 3 Mitglieder an CryptPad, außerdem gibt es einige Mitwirkende innerhalb und außerhalb von XWiki SAS.", "about_core": "Kernentwickler", "about_contributors": "Wichtige Mitwirkende", - "main_about_p22": "Uns antweeten", - "main_about_p23": "Einen Fehlerbericht auf GitHub erstellen", - "main_about_p24": "Hallo sagen (Matrix)", - "main_about_p25": "Uns eine E-Mail schicken", - "main_about_p26": "Wenn du Fragen oder Kommentare hast, freuen wir uns, von dir zu hören!", "main_info": "

Vertrauenswürdige Zusammenarbeit

Lass deine Ideen gemeinsam wachsen, während die Zero-Knowledge-Technologie den Schutz deiner Daten sogar uns gegenüber sichert.", "main_catch_phrase": "Die Cloud ohne Preisgabe deiner Daten", "main_footerText": "Mit CryptPad kannst du schnell kollaborative Dokumente erstellen, um Notizen oder Ideen zusammen mit anderen zu bearbeiten.", From 8ec60a22cc1f29c9ac57f632d494e8150b020431 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 8 Apr 2019 13:36:26 +0000 Subject: [PATCH 07/10] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/ --- www/common/translations/messages.el.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/www/common/translations/messages.el.json b/www/common/translations/messages.el.json index 069d0a73d..d621cda9c 100644 --- a/www/common/translations/messages.el.json +++ b/www/common/translations/messages.el.json @@ -435,11 +435,6 @@ "mdToolbar_list": "Λίστα με σημεία", "mdToolbar_check": "Λίστα εργασιών", "mdToolbar_code": "Κώδικας", - "main_about_p22": "Στείλτε μας ένα tweet", - "main_about_p23": "Δημιουργήστε ένα θέμα στο GitHub", - "main_about_p24": "Πείτε \"γεια\" στο Matrix", - "main_about_p25": "Στείλτε μας ένα email", - "main_about_p26": "Αν έχετε απορίες ή σχόλια, επικοινωνήστε μαζί μας!", "main_info": "

Συνεργαστείτε με ασφάλεια

Αναπτύξτε τις ιδέες σας μαζί με κοινά αρχεία όσο η τεχνολογία Zero Knowledge εξασφαλίζει την ιδιωτικότητά σας; ακόμη κι από εμάς.", "main_catch_phrase": "Το Zero Knowledge σύννεφο", "main_footerText": "Με το CryptPad, μπορείτε να δημιουργήσετε γρήγορα συνεργατικά έγγραφα για κοινόχρηστες σημειώσεις και καταγραφή ιδεών.", From 2c8e5500d83ef0d43c49c8a865893b791f243d85 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 8 Apr 2019 13:50:12 +0000 Subject: [PATCH 08/10] Translated using Weblate (English) Currently translated at 100.0% (947 of 947 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ --- www/common/translations/messages.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 9fd09c06b..2d30d9f11 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -1026,7 +1026,7 @@ "admin_updateLimitHint": "Forcing an update of user storage limits can be done any time, but is only necessary in the event of an error", "admin_updateLimitButton": "Update quotas", "admin_updateLimitDone": "Update completed successfully", - "admin_flushCacheTitle": "Flush HTTP Cache", + "admin_flushCacheTitle": "Flush HTTP cache", "admin_flushCacheHint": "Force users to download the latest clientside assets (only if your server is in fresh mode)", "admin_flushCacheButton": "Flush cache", "admin_flushCacheDone": "Cache flushed successfully", @@ -1038,7 +1038,7 @@ "contact_admin": "Contact the administrators", "contact_adminHint": "For any issues related to your account, storage limit, or availability of their service.", "contact_dev": "Contact the developers", - "contact_devHint": "For feature requests, usability improvements, or to say thank you", + "contact_devHint": "For feature requests, usability improvements, or to say thank you.", "contact_bug": "Bug report", "contact_chat": "Chat", "contact_email": "Email" From 05f464ce4df31b2e69d753ce9077279f086a127d Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 8 Apr 2019 13:50:12 +0000 Subject: [PATCH 09/10] Translated using Weblate (French) Currently translated at 99.9% (946 of 947 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/fr/ --- www/common/translations/messages.fr.json | 32 +++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index d7ff41ba4..0f507b99f 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -1011,5 +1011,35 @@ "debug_getGraphText": "Voici le code DOT permettant de générer un graphe de l’historique de ce document :", "mdToolbar_toc": "Table des matières", "fm_expirablePad": "Ce pad expirera le {0}", - "button_newsheet": "Nouveau tableur" + "button_newsheet": "Nouveau tableur", + "admin_authError": "Seuls les administrateurs ont accès à cette page", + "admin_cat_general": "Général", + "admin_cat_stats": "Statistiques", + "adminPage": "Administration", + "admin_activeSessionsTitle": "Connexions actives", + "admin_activeSessionsHint": "Nombre de connexions websocket actives (et adresses IP uniques connectées)", + "admin_activePadsTitle": "Pads actifs", + "admin_activePadsHint": "Nombre de documents uniques actuellement ouverts (lus ou modifiés)", + "admin_registeredTitle": "Utilisateurs enregistrés", + "admin_registeredHint": "Nombre d'utilisateurs enregistrés sur votre instance", + "admin_updateLimitTitle": "Mettre à jour les quotas", + "admin_updateLimitHint": "Forcer la mise à jour des limites de stockage des utilisateurs peut être effectué à tout moment, mais cela n'est utile que lorsqu'une erreur survient", + "admin_updateLimitButton": "Mettre à jour les quotas", + "admin_updateLimitDone": "Mise à jour effectuée avec succès", + "admin_flushCacheTitle": "Vider le cache HTTP", + "admin_flushCacheHint": "Force les utilisateurs à utiliser la dernière version du site déployée sur le serveur (seulement si le serveur est en mode \"fresh\")", + "admin_flushCacheButton": "Vider le cache", + "admin_flushCacheDone": "Opération réalisée avec succès", + "footer_product": "Produit", + "footer_team": "L'équipe", + "footer_donate": "Faire un don", + "footer_legal": "Questions légales", + "footer_tos": "Conditions", + "contact_admin": "Contacter les administrateurs", + "contact_adminHint": "Pour tout problème lié à votre compte, votre limite de stockage ou la disponibilité du service.", + "contact_dev": "Contacter les développeurs", + "contact_devHint": "Pour les demandes de fonctionnalités, les améliorations d'ergonomie ou pour dire merci.", + "contact_bug": "Rapport de bug", + "contact_chat": "Chat", + "contact_email": "Email" } From 0870a0651f1d2cf29ccee3ff52bebc54b7810c14 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 8 Apr 2019 16:31:36 +0200 Subject: [PATCH 10/10] Move the various scripts into a dedicated folder --- .../check-account-deletion.js | 2 +- check-accounts.js => scripts/check-accounts.js | 4 ++-- .../delete-inactive.js | 4 ++-- .../expire-channels.js | 8 ++++---- pinned.js => scripts/pinned.js | 6 +++--- pinneddata.js => scripts/pinneddata.js | 18 +++++++++--------- 6 files changed, 21 insertions(+), 21 deletions(-) rename check-account-deletion.js => scripts/check-account-deletion.js (96%) rename check-accounts.js => scripts/check-accounts.js (91%) rename delete-inactive.js => scripts/delete-inactive.js (92%) rename expire-channels.js => scripts/expire-channels.js (92%) rename pinned.js => scripts/pinned.js (92%) rename pinneddata.js => scripts/pinneddata.js (93%) diff --git a/check-account-deletion.js b/scripts/check-account-deletion.js similarity index 96% rename from check-account-deletion.js rename to scripts/check-account-deletion.js index 39bbf02f5..34930d1eb 100644 --- a/check-account-deletion.js +++ b/scripts/check-account-deletion.js @@ -54,7 +54,7 @@ let data = []; let pinned = []; nThen((waitFor) => { - let f = './pins/' + edPublic.slice(0, 2) + '/' + edPublic + '.ndjson'; + let f = '../pins/' + edPublic.slice(0, 2) + '/' + edPublic + '.ndjson'; Fs.readFile(f, waitFor((err, content) => { if (err) { throw err; } pinned = hashesFromPinFile(content.toString('utf8'), f); diff --git a/check-accounts.js b/scripts/check-accounts.js similarity index 91% rename from check-accounts.js rename to scripts/check-accounts.js index 4f37e51fd..ae31676cf 100644 --- a/check-accounts.js +++ b/scripts/check-accounts.js @@ -1,7 +1,7 @@ /* globals Buffer */ var Https = require('https'); -var Config = require("./config.js"); -var Package = require("./package.json"); +var Config = require("../config/config.js"); +var Package = require("../package.json"); var body = JSON.stringify({ domain: Config.myDomain, diff --git a/delete-inactive.js b/scripts/delete-inactive.js similarity index 92% rename from delete-inactive.js rename to scripts/delete-inactive.js index 9acf15f69..80d2bb09a 100644 --- a/delete-inactive.js +++ b/scripts/delete-inactive.js @@ -5,9 +5,9 @@ const Saferphore = require("saferphore"); const PinnedData = require('./pinneddata'); let config; try { - config = require('./config'); + config = require('../config/config'); } catch (e) { - config = require('./config.example'); + config = require('../config/config.example'); } if (!config.inactiveTime || typeof(config.inactiveTime) !== "number") { return; } diff --git a/expire-channels.js b/scripts/expire-channels.js similarity index 92% rename from expire-channels.js rename to scripts/expire-channels.js index f7597b323..ec25d10a7 100644 --- a/expire-channels.js +++ b/scripts/expire-channels.js @@ -5,13 +5,13 @@ var nThen = require("nthen"); var config; try { - config = require('./config'); + config = require('../config/config'); } catch (e) { - config = require('./config.example'); + config = require('../config/config.example'); } -var FileStorage = require(config.storage || './storage/file'); -var root = Path.resolve(config.taskPath || './tasks'); +var FileStorage = require('../' + config.storage || './storage/file'); +var root = Path.resolve('../' + config.taskPath || './tasks'); var dirs; var nt; diff --git a/pinned.js b/scripts/pinned.js similarity index 92% rename from pinned.js rename to scripts/pinned.js index d5df9373a..15c1f922f 100644 --- a/pinned.js +++ b/scripts/pinned.js @@ -35,7 +35,7 @@ const hashesFromPinFile = (pinFile, fileName) => { module.exports.load = function (cb, config) { nThen((waitFor) => { - Fs.readdir('./pins', waitFor((err, list) => { + Fs.readdir('../pins', waitFor((err, list) => { if (err) { if (err.code === 'ENOENT') { dirList = []; @@ -48,11 +48,11 @@ module.exports.load = function (cb, config) { }).nThen((waitFor) => { dirList.forEach((f) => { sema.take((returnAfter) => { - Fs.readdir('./pins/' + f, waitFor(returnAfter((err, list2) => { + Fs.readdir('../pins/' + f, waitFor(returnAfter((err, list2) => { if (err) { throw err; } list2.forEach((ff) => { if (config && config.exclude && config.exclude.indexOf(ff) > -1) { return; } - fileList.push('./pins/' + f + '/' + ff); + fileList.push('../pins/' + f + '/' + ff); }); }))); }); diff --git a/pinneddata.js b/scripts/pinneddata.js similarity index 93% rename from pinneddata.js rename to scripts/pinneddata.js index 346062fb6..4c30f0a67 100644 --- a/pinneddata.js +++ b/scripts/pinneddata.js @@ -65,7 +65,7 @@ const pinned = {}; // map of pinned files module.exports.load = function (config, cb) { nThen((waitFor) => { // read the subdirectories in the datastore - Fs.readdir('./datastore', waitFor((err, list) => { + Fs.readdir('../datastore', waitFor((err, list) => { if (err) { throw err; } dirList = list; })); @@ -76,15 +76,15 @@ module.exports.load = function (config, cb) { sema.take((returnAfter) => { // get the list of files in every subdirectory // and push them to 'fileList' - Fs.readdir('./datastore/' + f, waitFor(returnAfter((err, list2) => { + Fs.readdir('../datastore/' + f, waitFor(returnAfter((err, list2) => { if (err) { throw err; } - list2.forEach((ff) => { fileList.push('./datastore/' + f + '/' + ff); }); + list2.forEach((ff) => { fileList.push('../datastore/' + f + '/' + ff); }); }))); }); }); }).nThen((waitFor) => { // read the subdirectories in 'blob' - Fs.readdir('./blob', waitFor((err, list) => { + Fs.readdir('../blob', waitFor((err, list) => { if (err) { throw err; } // overwrite dirList dirList = list; @@ -96,9 +96,9 @@ module.exports.load = function (config, cb) { sema.take((returnAfter) => { // get the list of files in every subdirectory // and push them to 'fileList' - Fs.readdir('./blob/' + f, waitFor(returnAfter((err, list2) => { + Fs.readdir('../blob/' + f, waitFor(returnAfter((err, list2) => { if (err) { throw err; } - list2.forEach((ff) => { fileList.push('./blob/' + f + '/' + ff); }); + list2.forEach((ff) => { fileList.push('../blob/' + f + '/' + ff); }); }))); }); }); @@ -118,7 +118,7 @@ module.exports.load = function (config, cb) { }); }).nThen((waitFor) => { // read the subdirectories in the pinstore - Fs.readdir('./pins', waitFor((err, list) => { + Fs.readdir('../pins', waitFor((err, list) => { if (err) { throw err; } dirList = list; })); @@ -131,9 +131,9 @@ module.exports.load = function (config, cb) { sema.take((returnAfter) => { // get the list of files in every subdirectory // and push them to 'fileList' (which is empty because we keep reusing it) - Fs.readdir('./pins/' + f, waitFor(returnAfter((err, list2) => { + Fs.readdir('../pins/' + f, waitFor(returnAfter((err, list2) => { if (err) { throw err; } - list2.forEach((ff) => { fileList.push('./pins/' + f + '/' + ff); }); + list2.forEach((ff) => { fileList.push('../pins/' + f + '/' + ff); }); }))); }); });