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

Only show xliff export option for expert users #1212

Merged
merged 1 commit into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 12 additions & 10 deletions integreat_cms/cms/templates/pages/page_tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,18 @@ <h1 class="heading">{% trans 'Page Tree' %} <button data-show-tutorial="page-tre
data-target="_blank" data-language-slug="{{ language.slug }}">
{% trans 'Export published pages as PDF' %}
</option>
<option
{% if request.user.expert_mode and language != request.region.default_language %}
data-bulk-action="{% url 'download_xliff' region_slug=request.region.slug language_slug=language.slug %}"
{% else %}
disabled
title="{% trans 'You cannot export XLIFF files for the default language' %}"
{% endif %}
>
{% trans 'Export XLIFF for translation to' %} {{ language.translated_name }}
</option>
{% if request.user.expert_mode %}
<option
{% if language == request.region.default_language %}
disabled
title="{% trans 'You cannot export XLIFF files for the default language' %}"
{% else %}
data-bulk-action="{% url 'download_xliff' region_slug=request.region.slug language_slug=language.slug %}"
{% endif %}
>
{% trans 'Export XLIFF for translation to' %} {{ language.translated_name }}
</option>
{% endif %}
</select>
<button id="bulk-action-execute" class="btn">{% trans 'Execute' %}</button>
</div>
Expand Down
18 changes: 9 additions & 9 deletions integreat_cms/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-21 11:30+0000\n"
"POT-Creation-Date: 2022-02-21 15:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Integreat <info@integreat-app.de>\n"
"Language-Team: Integreat <info@integreat-app.de>\n"
Expand Down Expand Up @@ -3784,7 +3784,7 @@ msgstr "Fehlende Übersetzungen automatisch erstellen"
#: cms/templates/feedback/admin_feedback_list.html:135
#: cms/templates/feedback/region_feedback_list.html:137
#: cms/templates/linkcheck/links_by_filter.html:80
#: cms/templates/pages/page_tree.html:128 cms/templates/pois/poi_list.html:95
#: cms/templates/pages/page_tree.html:130 cms/templates/pois/poi_list.html:95
msgid "Execute"
msgstr "Ausführen"

Expand Down Expand Up @@ -4675,31 +4675,31 @@ msgstr "Seiten archivieren"
msgid "Export published pages as PDF"
msgstr "Veröffentlichte Seiten als PDF exportieren"

#: cms/templates/pages/page_tree.html:122
#: cms/templates/pages/page_tree.html:121
msgid "You cannot export XLIFF files for the default language"
msgstr "Sie können keine XLIFF-Dateien für die Standard-Sprache exportieren"

#: cms/templates/pages/page_tree.html:125
#: cms/templates/pages/page_tree.html:126
msgid "Export XLIFF for translation to"
msgstr "Exportiere XLIFF für Übersetzung nach"

#: cms/templates/pages/page_tree.html:133
#: cms/templates/pages/page_tree.html:135
msgid "Import XLIFF files"
msgstr "XLIFF-Dateien importieren"

#: cms/templates/pages/page_tree.html:134
#: cms/templates/pages/page_tree.html:136
msgid "Supported file extensions"
msgstr "Unterstützte Dateiendungen"

#: cms/templates/pages/page_tree.html:139
#: cms/templates/pages/page_tree.html:141
msgid "Select files"
msgstr "Dateien auswählen"

#: cms/templates/pages/page_tree.html:141
#: cms/templates/pages/page_tree.html:143
msgid "and {} other files"
msgstr "und {} weitere Dateien"

#: cms/templates/pages/page_tree.html:144
#: cms/templates/pages/page_tree.html:146
msgid "Import"
msgstr "Importieren"

Expand Down