Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround pysankey issue and enhanced button for next question #120

Merged
merged 6 commits into from
Jan 24, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion survey/exporter/tex/question2tex_sankey.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Pierre-Sassoulas marked this conversation as resolved.
Show resolved Hide resolved
except ModuleNotFoundError:
from pySankey import sankey

from survey.exporter.tex.question2tex import Question2Tex
from survey.models.question import Question
Expand Down
Binary file modified survey/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
58 changes: 28 additions & 30 deletions survey/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-13 07:04+0000\n"
"PO-Revision-Date: 2020-01-24 17:05+0000\n"
"POT-Creation-Date: 2021-01-23 11:53+0000\n"
"PO-Revision-Date: 2021-01-23 11:53+0000\n"
"Last-Translator: b' <>'\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \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"
"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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"

Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -308,22 +304,20 @@ 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"
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"
Expand Down Expand Up @@ -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 "Weiter!"

#: survey/templates/survey/survey.html:73
msgid "I'm done!"
msgstr "Fertig!"
18 changes: 13 additions & 5 deletions survey/templates/survey/survey.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,19 @@ <h3> {% trans "Questions" %} </h3>

<br>
{% if survey.editable_answers or response_form.response is None %}
<input
class="btn btn-default btn-lg"
type="submit"
value="{% trans "I'm done!" %}"
>
{% if response_form.has_next_step %}
<input
class="btn btn-default btn-lg"
type="submit"
value="{% trans "Next!" %}"
>
{% else %}
<input
class="btn btn-default btn-lg"
type="submit"
value="{% trans "I'm done!" %}"
>
{% endif %}
{% endif %}
</form></div>
{% endblock %}