From c4a8c424ca52d732fb22b11b88a648125a80e56b Mon Sep 17 00:00:00 2001 From: georg Date: Fri, 22 Jan 2021 21:11:16 +0100 Subject: [PATCH 1/6] added differenciation between next and done when jumping to next question or finishing the survey --- survey/templates/survey/survey.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/survey/templates/survey/survey.html b/survey/templates/survey/survey.html index 6e4210ad..4e72e1e7 100644 --- a/survey/templates/survey/survey.html +++ b/survey/templates/survey/survey.html @@ -60,11 +60,19 @@

{% trans "Questions" %}


{% if survey.editable_answers or response_form.response is None %} - + {% if response_form.has_next_step %} + + {% else %} + + {% endif %} {% endif %} {% endblock %} From 95ceafe42abaaaa80e798d235a74c19a358ef773 Mon Sep 17 00:00:00 2001 From: georg Date: Sat, 23 Jan 2021 00:01:06 +0100 Subject: [PATCH 2/6] added fix for Pysankey != PySankey import error --- survey/exporter/tex/question2tex_sankey.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/survey/exporter/tex/question2tex_sankey.py b/survey/exporter/tex/question2tex_sankey.py index 34a530d3..b5f5fd52 100755 --- a/survey/exporter/tex/question2tex_sankey.py +++ b/survey/exporter/tex/question2tex_sankey.py @@ -4,7 +4,10 @@ from django.utils.translation import gettext_lazy as _ from pandas.core.frame import DataFrame -from pysankey import sankey +try: + from pysankey import sankey +except ModuleNotFoundError: + from pySankey import sankey from survey.exporter.tex.question2tex import Question2Tex from survey.models.question import Question From 5f04b24bb4161af90608b1baee2d2fb84817b1cf Mon Sep 17 00:00:00 2001 From: georg Date: Sat, 23 Jan 2021 12:48:34 +0100 Subject: [PATCH 3/6] Updated german translation --- survey/locale/de/LC_MESSAGES/django.mo | Bin 5259 -> 6017 bytes survey/locale/de/LC_MESSAGES/django.po | 58 ++++++++++++------------- 2 files changed, 28 insertions(+), 30 deletions(-) diff --git a/survey/locale/de/LC_MESSAGES/django.mo b/survey/locale/de/LC_MESSAGES/django.mo index 3bc0d1d42e3ce20dcd20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text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Translated-Using: django-rosetta 0.9.3\n" +"X-Translated-Using: django-rosetta 0.9.5\n" #: dev/templates/base.html:3 msgid "en" @@ -44,11 +44,11 @@ msgstr "Anonym" #: survey/exporter/csv/survey2csv.py:68 msgid "user" -msgstr "" +msgstr "Benutzer" #: survey/exporter/csv/survey2csv.py:112 msgid "Export to CSV" -msgstr "" +msgstr "Exportiere als CSV" #: survey/exporter/tex/question2tex.py:64 msgid "with" @@ -85,7 +85,7 @@ msgid "Left blank" msgstr "Frei gelassen" #: survey/exporter/tex/question2tex_chart.py:113 -#: survey/exporter/tex/question2tex_sankey.py:40 +#: survey/exporter/tex/question2tex_sankey.py:43 msgid "for the question" msgstr "für die Frage" @@ -97,25 +97,25 @@ msgstr "Keine Antwort auf diese Frage." msgid "Participant" msgstr "Teilnehmer" -#: survey/exporter/tex/question2tex_sankey.py:40 +#: survey/exporter/tex/question2tex_sankey.py:43 msgid "left" msgstr "links" -#: survey/exporter/tex/question2tex_sankey.py:42 +#: survey/exporter/tex/question2tex_sankey.py:45 msgid "in relation with the question" msgstr "in Zusammenhang mit der Frage" -#: survey/exporter/tex/question2tex_sankey.py:44 +#: survey/exporter/tex/question2tex_sankey.py:47 msgid "right" msgstr "rechts" #: survey/exporter/tex/survey2tex.py:39 msgid "Cannot generate PDF, we need 'xelatex' to be installed." -msgstr "" +msgstr "Kann PDF nicht exportieren, denn 'xelatex' muss installiert sein!" #: survey/exporter/tex/survey2tex.py:44 msgid "Cannot generate PDF, we need 'pySankeyBeta' to be installed." -msgstr "" +msgstr "Kann PDF nicht exportieren, denn 'pySankeyBeta' muss installiert sein!" #: survey/exporter/tex/survey2tex.py:94 msgid "We could not render a chart because the type" @@ -127,20 +127,20 @@ msgstr "kein Standard Typ und auch kein Pfad zu einer importierbaren Question2Te #: survey/exporter/tex/survey2tex.py:171 msgid "No questions to display in this survey." -msgstr "" +msgstr "In dieser Umfrage sind keine Fragen die angezeigt werden können." #: survey/exporter/tex/survey2tex.py:201 msgid "Cannot export multiple PDF, choose only one." -msgstr "" +msgstr "Kann nicht mehrere PDFs exportieren. Es kann nur eins ausgewählt werden." #: survey/exporter/tex/survey2tex.py:210 #, python-format msgid "Error during PDF generation: %s" -msgstr "" +msgstr "Fehler beim erstellen des PDFs: %s" #: survey/exporter/tex/survey2tex.py:217 msgid "Export to PDF" -msgstr "" +msgstr "Exportiere als PDF" #: survey/models/answer.py:23 msgid "Question" @@ -225,11 +225,11 @@ msgstr "Ganzzahl" #: survey/models/question.py:70 msgid "float" -msgstr "" +msgstr "Gleitkommazahl" #: survey/models/question.py:71 msgid "date" -msgstr "" +msgstr "Datum" #: survey/models/question.py:74 msgid "Text" @@ -280,20 +280,16 @@ msgid "Sets of answers to surveys" msgstr "Sätze von Antworten zu Umfragen" #: survey/models/survey.py:22 -#, fuzzy -#| msgid "question" msgid "By question" -msgstr "Frage" +msgstr "Nach Frage" #: survey/models/survey.py:23 -#, fuzzy -#| msgid "category" msgid "By category" -msgstr "Kategorie" +msgstr "Nach Kategorie" #: survey/models/survey.py:24 msgid "All in one page" -msgstr "" +msgstr "Alle auf einer Seite" #: survey/models/survey.py:29 msgid "Users can see it and answer it" @@ -308,10 +304,8 @@ msgid "Users can edit their answers afterwards" msgstr "Benutzer können ihre Antworten im nachhinein verändern" #: survey/models/survey.py:33 -#, fuzzy -#| msgid "Display order" msgid "Display method" -msgstr "Anordnung" +msgstr "Darstellungsart" #: survey/models/survey.py:35 msgid "Template" @@ -319,11 +313,11 @@ msgstr "Vorlage" #: survey/models/survey.py:36 msgid "Publication date" -msgstr "" +msgstr "Datum der Veröffentlichung" #: survey/models/survey.py:37 msgid "Expiration date" -msgstr "" +msgstr "Ablaufdatum" #: survey/models/survey.py:40 msgid "survey" @@ -375,6 +369,10 @@ msgstr "Diesen Teil beantworten" msgid "Questions" msgstr "Fragen" -#: survey/templates/survey/survey.html:66 +#: survey/templates/survey/survey.html:67 +msgid "Next!" +msgstr "" + +#: survey/templates/survey/survey.html:73 msgid "I'm done!" msgstr "Fertig!" From 82f4c2ada35521082f92557c39080e7fa38e2c48 Mon Sep 17 00:00:00 2001 From: georg Date: Sat, 23 Jan 2021 12:53:39 +0100 Subject: [PATCH 4/6] Updated german translation again --- survey/locale/de/LC_MESSAGES/django.mo | Bin 6017 -> 6047 bytes survey/locale/de/LC_MESSAGES/django.po | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/survey/locale/de/LC_MESSAGES/django.mo b/survey/locale/de/LC_MESSAGES/django.mo index a44400f447be234845f8b45536f389917c9fca03..ea553eec67d431f8470696a15a9c1a9cdc2941f0 100644 GIT binary patch delta 1463 zcmYMzTS!z<6vpwbp2?|Z#%oTcnPcXqn`VkdX^9m~QczG5y#-TP(1RLTD1$*gYA8aW z*h5AUmBjR*J}4FuG!k~DOe821Dl5Xuhl2iJZD^R8-`?l4_FC)g(^7b;Fg%&;bQ(Sf z_+{`Ljn&MUCf9#YFl=VN2R~r~Zk}h%e5}Sq+>a@E1Q+5N>v>$mydAgTFqYvjbQ=>k zCGp1aHRaYF=w-eem*62(z?1017JL2zE@$3@N@&O)e`K9NCHMi;aTXU~BCBR&Iy$Ux zDj2BPDqMy^%)_I&9^35s5mX`%P!&H#zUCc&T4)B-@TWcQ(vG(~Vl-vh@z?#`~y%&(Xn2%)z&K8{L$r`DJnrf!7A_|YJrQW zf_hPJK_9BqQB>mL$M(ca)D5$!zVFHn_^qgp+M zs`LwL(|t!3G>0n4;a&CV{ZC<_g|kr$Z^Kaxq5`C`QcrQC OY8ygzfyk?*Ypy>)bB`MU delta 1453 zcmYMzSxD4T6vy$S&eXU}E-jXAVw#%UxC~adAXHFMA!JVxh(r*j1Qr_Dl#ta!fwV_h zWKbd|G8rMJ5QY)92$dlbB~eh(Ly$}lMc*G?NdC^}-aG&Qx#yg@|7%6ZibC&FJm-zS zYW^4SKOC)@**@=o>lp55z7^kMBIZpqi^U2|!u2>4cVIm3bsoZe<}J7id$1h8q0cO2 znbXazL%?#3B-z6tl4ki?IpSgf3J9y{JkbAeTMkLmQ0a9Q@$cBhDzkOkh0@m0&8WplnRTO3Y<{ z+sS}#SSxCS)6RC(gFQ%08$u60#!P&Qz4*he-=sVx+KIZa4^>b_@t6Z}1_$M?K#`8}$5bRNO99 zoVyA1Ux5Z$ki)1>Ji*yG=H{PKfxqJ{oI(YT=b*?WY>DC-Y-E0kgHnabv`_cfqT)7U zDuz%UxtK`*b*S#KpvoWNMtp%AFpcsmu?CfK2P%pu^oS-&e~PlM*NUnXP`qdh|6&Vm!S?o5b`h!YcPN(Pyz0vDjh(zcm!4H80xT% zqbi(074*sZ6IGapch;x(KZC(23wfvj5me@X+&qR8qt?YDxml8%XQ3+1$GKSM=37t& zRU>=ZE;nyLCEkpdl~Y@Pu&yCDeB3(}9p2k* KPdJi%%lj9BAB_'\n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -371,7 +371,7 @@ msgstr "Fragen" #: survey/templates/survey/survey.html:67 msgid "Next!" -msgstr "" +msgstr "Weiter!" #: survey/templates/survey/survey.html:73 msgid "I'm done!" From 224b2888c7dca5744c57ce678cd34aeaca6c56e1 Mon Sep 17 00:00:00 2001 From: georg Date: Sun, 24 Jan 2021 00:03:58 +0100 Subject: [PATCH 5/6] reverted pysankey import --- survey/exporter/tex/question2tex_sankey.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/survey/exporter/tex/question2tex_sankey.py b/survey/exporter/tex/question2tex_sankey.py index b5f5fd52..cab1017a 100755 --- a/survey/exporter/tex/question2tex_sankey.py +++ b/survey/exporter/tex/question2tex_sankey.py @@ -4,10 +4,10 @@ from django.utils.translation import gettext_lazy as _ from pandas.core.frame import DataFrame -try: - from pysankey import sankey -except ModuleNotFoundError: - from pySankey import sankey +#try: +from pysankey import sankey +#except ModuleNotFoundError: +# from pySankey import sankey from survey.exporter.tex.question2tex import Question2Tex from survey.models.question import Question From 9ffa403caa1f4d00bc79c00ce4adc724cc217cbe Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 24 Jan 2021 10:01:54 +0100 Subject: [PATCH 6/6] Put a proper warning when sankey is not installed Following multiple bug report in this sense. --- survey/exporter/tex/question2tex_sankey.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/survey/exporter/tex/question2tex_sankey.py b/survey/exporter/tex/question2tex_sankey.py index cab1017a..82795174 100755 --- a/survey/exporter/tex/question2tex_sankey.py +++ b/survey/exporter/tex/question2tex_sankey.py @@ -1,13 +1,17 @@ # -*- coding: utf-8 -*- import logging +import warnings from django.utils.translation import gettext_lazy as _ from pandas.core.frame import DataFrame -#try: -from pysankey import sankey -#except ModuleNotFoundError: -# from pySankey import sankey +try: + from pysankey import sankey +except ModuleNotFoundError: + warnings.warn( + "Cannot import 'sankey', please install the package using + "the sankey extra. (pip install django-survey-and-report[sankey])" + ) from survey.exporter.tex.question2tex import Question2Tex from survey.models.question import Question