From b8c8cb794d9cd30f8d8c5d269472777e007dae4a Mon Sep 17 00:00:00 2001 From: Eli Flanagan Date: Tue, 24 Oct 2017 11:33:49 -0500 Subject: [PATCH 1/5] fix undefined variable (#97) --- dpaste/templates/dpaste/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpaste/templates/dpaste/base.html b/dpaste/templates/dpaste/base.html index a8c7115..3ae8e47 100644 --- a/dpaste/templates/dpaste/base.html +++ b/dpaste/templates/dpaste/base.html @@ -40,7 +40,7 @@ jQuery(function($) { if (navigator.appVersion.indexOf("Win")!=-1) { metaKey = e.ctrlKey; } else { - metaKey = event.metaKey; + metaKey = e.metaKey; } if (e.keyCode == 13 && metaKey) { $(this).closest('form').submit(); From 2ee6dce91b898b285136308989a1b9e1b119839b Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Tue, 12 Dec 2017 20:24:14 +0100 Subject: [PATCH 2/5] dpaste isn't django 2.0 ready yet. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 95acebd..fb5b595 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ setup( }, include_package_data=True, install_requires=[ - 'django>=1.8', + 'django>=1.8,<2.0', 'pygments>=1.6', ], tests_require=[ From 259fa0cf4cee5e44dd40ce263edfcbed82773a64 Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Tue, 12 Dec 2017 20:31:26 +0100 Subject: [PATCH 3/5] Added changelog not. --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index ba714ea..066b54f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Changelog 2.14 (master) ------------- +* Django 1.11 compatibility. But not Django 2.0 yet. * Removed "Suspicious" middleware which was never been used, documented, and also not functional for a while. From 48c77e6ad8559f339dc9ce04f18c282d296e0157 Mon Sep 17 00:00:00 2001 From: Michael Marx Date: Thu, 4 Jan 2018 20:50:52 +0100 Subject: [PATCH 4/5] Added a french translation (#99) --- dpaste/locale/fr/LC_MESSAGES/django.mo | Bin 0 -> 3437 bytes dpaste/locale/fr/LC_MESSAGES/django.po | 215 +++++++++++++++++++++++++ dpaste/settings/base.py | 1 + 3 files changed, 216 insertions(+) create mode 100644 dpaste/locale/fr/LC_MESSAGES/django.mo create mode 100644 dpaste/locale/fr/LC_MESSAGES/django.po diff --git a/dpaste/locale/fr/LC_MESSAGES/django.mo b/dpaste/locale/fr/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..ec3b31ddc27c0dc9445e4dfe17f8bec549a72879 GIT binary patch literal 3437 zcmb7`O>87b6~_w*1Pn`H2_NCJvWtVwZcpq*K$zV%G5#Qi^#}G~i6~-Kp04rKZckUI zt9!;qAgv-Haf@<55D|%$BB2|Xuo=sQs0BWhG(F;OQ|x7UC<$| zxmrJ{n#4+)#QuGBsV(t$mM;EFBV_7AbynB7#6=oguZo@Id9p359LY1;vsIhYv}M=p z+1#dGtM_a%vNqL4-vw>bFtWM6Vst;Zy{qS@XL>HNd)Lc6nGNR_&NtUCo()$XGz*n6 zlg7Mlb!M_Zesn!bJHEHS#!mfwTj%>_wjZ0hdND@#MeqajMHA!-)b35=u8PY4r%JdA^jCJWg zQRw z>VY8YKCmJ!Fo*M%~6yY8hW*g^6ex~r15h1i&jj1jjMf7m3Z40^ zOiZp5f>;`fBPQBdBiB7=lUS0T+s8}FlI2$Sxnrc3BB{$}5}vstv1*s1(c5NJpLBgm z!TVfo<^G247SUQ9?bTs>iD*v+S=?yOSxr%K8=>C z>$bi$H~-ma{!%peDLwz`_WWlq%+1fuF)-S;Lnk&Tn1BN3x6Cx}c;V%o6s+Wht9H*y8F}JFC${C*#B?w7#IVJW+ zkB^pogAJXjKG9v>lb zGG^$jTCe5V)GlCv{MD5^zOBoExRD=6K-Ee*^oOjiYrC%2X)<|ILu{I6wwG=r(bevW zNf37Kc&65t$(0CoGm%=7k48PGEWZAL1bw59SEJUr5G2v{zG%eyczsfB=&=^1CQv%| zDV4?tOkYEuMW`#C=95+zPc7lpphP1rC{*!-JPb0;--cSf3G&j(va0*1qEZPsmAmU5 ap9B86;1J)^oWD7{E|i9kS-ppRss00YfT~jf literal 0 HcmV?d00001 diff --git a/dpaste/locale/fr/LC_MESSAGES/django.po b/dpaste/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 0000000..ec98be2 --- /dev/null +++ b/dpaste/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,215 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# Michael Marx , 2017. +msgid "" +msgstr "" +"Project-Id-Version: dpaste\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-03 15:16+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Michael Marx \n" +"Language-Team: French\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +#: dpaste/forms.py:11 dpaste/models.py:36 +#: dpaste/templates/dpaste/snippet_details.html:39 +msgid "One-Time snippet" +msgstr "Extrait à usage unique" + +#: dpaste/forms.py:12 +msgid "In one hour" +msgstr "Dans une heure" + +#: dpaste/forms.py:13 +msgid "In one week" +msgstr "Dans une semaine" + +#: dpaste/forms.py:14 +msgid "In one month" +msgstr "Dans un mois" + +#: dpaste/forms.py:15 +msgid "Never" +msgstr "Jamais" + +#: dpaste/forms.py:36 dpaste/models.py:41 +msgid "Content" +msgstr "Contenu" + +#: dpaste/forms.py:37 +msgid "Awesome code goes here..." +msgstr "Le code génial va ici…" + +#: dpaste/forms.py:42 dpaste/models.py:42 +msgid "Lexer" +msgstr "Lexer" + +#: dpaste/forms.py:49 dpaste/models.py:46 +msgid "Expires" +msgstr "Expires" + +#: dpaste/forms.py:57 +msgid "Title" +msgstr "Titre" + +#: dpaste/forms.py:85 +msgid "This field is required." +msgstr "Ce champ est requis." + +#: dpaste/highlight.py:33 +msgid "Highlighted" +msgstr "Surligné" + +#: dpaste/models.py:34 +msgid "Expire by timestamp" +msgstr "Expire selon un timestamp" + +#: dpaste/models.py:35 +msgid "Keep Forever" +msgstr "Garder pour toujours" + +#: dpaste/models.py:39 +msgid "Secret ID" +msgstr "ID secret" + +#: dpaste/models.py:43 +msgid "Published" +msgstr "Publié" + +#: dpaste/models.py:44 +msgid "Expire Type" +msgstr "Type d’expiration" + +#: dpaste/models.py:47 +msgid "View count" +msgstr "Visualisation" + +#: dpaste/templates/dpaste/about.html:59 +msgid "Statistics" +msgstr "Statistiques" + +#: dpaste/templates/dpaste/about.html:61 +#, python-format +msgid "" +"There are %(total)s snippets in the database. The most popular languages are:" +msgstr "" +"Il y a %(total)s extraits dans la base de données. Les langages les plus populaires sont :" + +#: dpaste/templates/dpaste/base.html:7 dpaste/templates/dpaste/base.html:20 +#: dpaste/templates/dpaste/snippet_new.html:5 +#: dpaste/templates/dpaste/snippet_new.html:6 +msgid "New snippet" +msgstr "Nouvel extrait" + +#: dpaste/templates/dpaste/base.html:18 +msgid "About" +msgstr "À propos" + +#: dpaste/templates/dpaste/base.html:19 +msgid "History" +msgstr "Histoire" + +#: dpaste/templates/dpaste/snippet_details.html:6 +msgid "Snippet" +msgstr "Extrait" + +#: dpaste/templates/dpaste/snippet_details.html:35 +#, python-format +msgid "Expires in: %(date)s" +msgstr "Expires dans : %(date)s" + +#: dpaste/templates/dpaste/snippet_details.html:37 +msgid "Snippet never expires" +msgstr "Ce extrait n’expires jamais" + +#: dpaste/templates/dpaste/snippet_details.html:43 +msgid "Really delete this snippet?" +msgstr "Supprimer cet extrait ?" + +#: dpaste/templates/dpaste/snippet_details.html:43 +msgid "Delete Now" +msgstr "Supprimer maintenant" + +#: dpaste/templates/dpaste/snippet_details.html:46 +msgid "Compare this Answer" +msgstr "Comparer cette réponse" + +#: dpaste/templates/dpaste/snippet_details.html:49 +msgid "View Raw" +msgstr "Voir le texte brut" + +#: dpaste/templates/dpaste/snippet_details.html:58 +msgid "This is a one-time snippet." +msgstr "Cet extrait est à usage unique." + +#: dpaste/templates/dpaste/snippet_details.html:60 +#, python-format +msgid "It is automatically removed after %(remaining)s further views." +msgstr "Il sera automatiquement supprimé après %(remaining)s consultations." + +#: dpaste/templates/dpaste/snippet_details.html:62 +msgid "It is automatically removed after the next view." +msgstr "Il sera automatiquement supprimé après la prochaine consultation." + +#: dpaste/templates/dpaste/snippet_details.html:64 +msgid "It cannot be viewed again." +msgstr "Il ne peut plus être vu." + +#: dpaste/templates/dpaste/snippet_details.html:84 +msgid "Reply to this snippet" +msgstr "Répondre à cet extrait" + +#: dpaste/templates/dpaste/snippet_diff.html:4 +#, python-format +msgid "" +"\n" +" Difference between this answer #%(fileb_id)s\n" +" and the parent snippet #%(filea_id)s\n" +" " +msgstr "" +"\n" +" Différences entre cette réponse #%(fileb_id)s\n" +" et l’extrait parent #%(filea_id)s\n" +" " + +#: dpaste/templates/dpaste/snippet_form.html:31 +msgid "Expire in" +msgstr "Expire dans" + +#: dpaste/templates/dpaste/snippet_form.html:37 +msgid "Paste it" +msgstr "Envoyer ceci" + +#: dpaste/templates/dpaste/snippet_form.html:38 +msgid "or" +msgstr "ou" + +#: dpaste/templates/dpaste/snippet_list.html:15 +msgid "DATETIME_FORMAT" +msgstr "DATETIME_FORMAT" + +#: dpaste/templates/dpaste/snippet_list.html:16 +#, python-format +msgid "%(since)s ago" +msgstr "il y a %(since)s" + +#: dpaste/templates/dpaste/snippet_list.html:22 +msgid "" +"No snippets saved. Either all your snippets are expired or your cookie has " +"changed." +msgstr "" +"Aucun extrait sauvé. Soit tous vos extraits ont expirés soit votre cookie a " +"changé." + +#: dpaste/views.py:176 +msgid "No changes were made between this two files." +msgstr "Aucun changement n’a été fait entre ces deux fichiers." diff --git a/dpaste/settings/base.py b/dpaste/settings/base.py index 43658df..7ce4f53 100644 --- a/dpaste/settings/base.py +++ b/dpaste/settings/base.py @@ -57,6 +57,7 @@ LANGUAGES = ( ('de', 'German'), ('es', 'Spanish'), ('pt-br', 'Portugese (Brasil)'), + ('fr', 'French'), ) LOCALE_PATHS = ( From 27d608e5da4b045ea112823ec8d271add42fd89d Mon Sep 17 00:00:00 2001 From: Jason Moujaes Date: Sat, 3 Mar 2018 14:57:51 -0500 Subject: [PATCH 5/5] No need to handle version 1.7 Django anymore so removing those cases from runtests.py (#102) --- runtests.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/runtests.py b/runtests.py index 30afb39..3eef600 100755 --- a/runtests.py +++ b/runtests.py @@ -1,7 +1,10 @@ #!/usr/bin/env python import sys +import django from django.conf import settings +from django.test.runner import DiscoverRunner as TestRunner + SETTINGS = { 'DATABASES': { @@ -51,19 +54,10 @@ def runtests(*test_args): if not settings.configured: settings.configure(**SETTINGS) - # New Django 1.7 app registry setup - try: - from django import setup - setup() - except ImportError: - pass - - # New Django 1.8 test runner - try: - from django.test.runner import DiscoverRunner as TestRunner - except ImportError: - from django.test.simple import DjangoTestSuiteRunner as TestRunner + # app registry setup + django.setup() + # test runner test_runner = TestRunner(verbosity=1) failures = test_runner.run_tests(['dpaste']) if failures: