Skip to content

Commit

Permalink
Improve wording of minor edit label
Browse files Browse the repository at this point in the history
  • Loading branch information
timobrembeck committed Jun 29, 2022
1 parent ab0a895 commit a7b7c6f
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 14 deletions.
2 changes: 1 addition & 1 deletion integreat_cms/cms/templates/events/event_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h3 class="heading font-bold text-black">
</h3>
</div>
<div class="w-full px-4 pb-4 rounded shadow bg-white">
<label>{% trans 'Implications on other translations' %}</label>
<label>{% minor_edit_label request.region language event_translation_form %}</label>
{% render_field event_translation_form.minor_edit %}
<label for="{{ event_translation_form.minor_edit.id_for_label }}"
class="secondary">
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/templates/imprint/imprint_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h3 class="heading font-bold">
</h3>
</div>
<div class="w-full px-4 pb-4 rounded shadow bg-white">
<label>{% trans 'Implications on other translations' %}</label>
<label>{% minor_edit_label request.region language event_translation_form %}</label>
{% render_field imprint_translation_form.minor_edit %}
<label for="{{ imprint_translation_form.minor_edit.id_for_label }}"
class="secondary">
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/templates/pages/page_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ <h3 class="heading font-bold text-black">
</h3>
</div>
<div class="w-full px-4 pb-4 rounded shadow bg-white">
<label>{% trans 'Implications on other translations' %}</label>
<label>{% minor_edit_label request.region language event_translation_form %}</label>
{% render_field page_translation_form.minor_edit %}
<label for="{{ page_translation_form.minor_edit.id_for_label }}"
class="secondary">
Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/templates/pois/poi_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h3 class="heading font-bold text-black">
</h3>
</div>
<div class="w-full px-4 pb-4 rounded shadow bg-white">
<label>{% trans 'Implications on other translations' %}</label>
<label>{% minor_edit_label request.region language event_translation_form %}</label>
{% render_field poi_translation_form.minor_edit %}
<label for="{{ poi_translation_form.minor_edit.id_for_label }}"
class="secondary">
Expand Down
25 changes: 25 additions & 0 deletions integreat_cms/cms/templatetags/content_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,31 @@ def get_language(language_slug):
return Language.objects.filter(slug=language_slug).first()


@register.simple_tag
def minor_edit_label(region, language, translation_form):
"""
This tag returns the label of the minor edit field of the given form
:param region: current region
:type region: ~integreat_cms.cms.models.regions.region.Region
:param language: The current language
:type language: ~integreat_cms.cms.models.languages.language.Language
:param translation_form: The given model form
:type translation_form: ~integreat_cms.cms.forms.custom_model_form.CustomModelForm
:return: The minor edit label
:rtype: str
"""
language_node = region.language_node_by_slug[language.slug]
if language_node.is_leaf():
return _("Implications on the translation status")
if language_node.is_root():
return _("Implications on other translations")
return _("Implications on the status of this and other translations")


@register.simple_tag
def minor_edit_help_text(region, language, translation_form):
"""
Expand Down
26 changes: 16 additions & 10 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-06-24 13:50+0000\n"
"POT-Creation-Date: 2022-06-29 16:58+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 @@ -4014,14 +4014,6 @@ msgstr "In die Zwischenablage kopieren"
msgid "Minor edit"
msgstr "Geringfügige Änderung"

#: cms/templates/events/event_form.html:126
#: cms/templates/imprint/imprint_form.html:100
#: cms/templates/imprint/imprint_sbs.html:149
#: cms/templates/pages/page_form.html:179 cms/templates/pages/page_sbs.html:136
#: cms/templates/pois/poi_form.html:118
msgid "Implications on other translations"
msgstr "Auswirkungen auf andere Übersetzungen"

#: cms/templates/events/event_form.html:140
msgid "Date and time"
msgstr "Datum und Uhrzeit"
Expand Down Expand Up @@ -4549,6 +4541,12 @@ msgstr "Neu"
msgid "Not saved yet"
msgstr "Noch nicht gespeichert"

#: cms/templates/imprint/imprint_sbs.html:149
#: cms/templates/pages/page_sbs.html:136
#: cms/templatetags/content_filters.py:107
msgid "Implications on other translations"
msgstr "Auswirkungen auf andere Übersetzungen"

#: cms/templates/language_tree/language_tree.html:7
msgid "Language tree"
msgstr "Sprach-Baum"
Expand Down Expand Up @@ -6003,12 +6001,20 @@ msgid "No administrator"
msgstr "Kein Administrator"

#: cms/templatetags/content_filters.py:105
msgid "Implications on the translation status"
msgstr "Auswirkungen auf den Übersetzungsstatus"

#: cms/templatetags/content_filters.py:108
msgid "Implications on the status of this and other translations"
msgstr "Auswirkungen auf den Status dieser und anderer Übersetzungen"

#: cms/templatetags/content_filters.py:130
msgid "Tick if this edit should not change the status of this translation."
msgstr ""
"Kreuzen Sie an, wenn diese Änderung den Status dieser Übersetzung nicht "
"ändern soll."

#: cms/templatetags/content_filters.py:109
#: cms/templatetags/content_filters.py:134
msgid ""
"Tick if this edit should not change the status of this translation and does "
"not require an update of translations in other languages."
Expand Down

0 comments on commit a7b7c6f

Please sign in to comment.