diff --git a/.coveragerc b/.coveragerc index 191fe3991d..eeabac1b38 100644 --- a/.coveragerc +++ b/.coveragerc @@ -3,3 +3,4 @@ source = meinberlin/apps omit = */migrations/* + */apps/notifications/management/commands/send_test_emails.py diff --git a/meinberlin/apps/actions/templates/meinberlin_actions/includes/action.html b/meinberlin/apps/actions/templates/meinberlin_actions/includes/action.html index 583e4e9142..e7df0c76a0 100644 --- a/meinberlin/apps/actions/templates/meinberlin_actions/includes/action.html +++ b/meinberlin/apps/actions/templates/meinberlin_actions/includes/action.html @@ -5,13 +5,13 @@
{% if action.type == 'comment' and action.verb == 'add' %} - {% blocktrans with name=action.actor.username comment_url=action.obj.get_absolute_url %}{{ name }} added a new comment{% endblocktrans %} + {% blocktranslate with name=action.actor.username comment_url=action.obj.get_absolute_url %}{{ name }} added a new comment{% endblocktranslate %} {% elif action.type == 'comment' and action.verb == 'update' %} - {% blocktrans with name=action.actor.username comment_url=action.obj.get_absolute_url %}{{ name }} updated a comment{% endblocktrans %} + {% blocktranslate with name=action.actor.username comment_url=action.obj.get_absolute_url %}{{ name }} updated a comment{% endblocktranslate %} {% elif action.type == 'item' and action.verb == 'add' %} - {% blocktrans with name=action.actor.username item_url=action.obj.get_absolute_url %}{{ name }} added a new item{% endblocktrans %} + {% blocktranslate with name=action.actor.username item_url=action.obj.get_absolute_url %}{{ name }} added a new item{% endblocktranslate %} {% elif action.type == 'item' and action.verb == 'update' %} - {% blocktrans with name=action.actor.username item_url=action.obj.get_absolute_url %}{{ name }} updated an item{% endblocktrans %} + {% blocktranslate with name=action.actor.username item_url=action.obj.get_absolute_url %}{{ name }} updated an item{% endblocktranslate %} {% elif action.type == 'project' and action.verb == 'start' %} {% translate "New participation started" %} {% elif action.type == 'phase' and action.verb == 'schedule' %} @@ -22,7 +22,7 @@ {% endif %}
- {% blocktrans with url=action.project.get_absolute_url name=action.project.name %}on {{ name }}{% endblocktrans %} + {% blocktranslate with url=action.project.get_absolute_url name=action.project.name %}on {{ name }}{% endblocktranslate %}
{% html_date action.timestamp 'd.m.Y' class='relative' title=action.timestamp|date:'DATETIME_FORMAT' %} diff --git a/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/office_worker_notification.de.email b/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/office_worker_notification.de.email index bda6dd4e10..82636bf446 100644 --- a/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/office_worker_notification.de.email +++ b/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/office_worker_notification.de.email @@ -12,20 +12,26 @@ {% block greeting %}{% endblock %} {% block content_left_aligned %} -Name: +

+Name:
{{ statement.name }} - -Straße, Hausnummer: +

+

+Straße, Hausnummer:
{{ statement.street_number }} - -PLZ, Ort: +

+

+PLZ, Ort:
{{ statement.postal_code_city }} - -E-Mail Adresse: +

+

+E-Mail Adresse:
{{ statement.email }} - -Stellungnahme: +

+

+Stellungnahme:
{{ statement.statement }} +

{% endblock %} {% block cta %}{% endblock %} diff --git a/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/office_worker_update_confirmation.de.email b/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/office_worker_update_confirmation.de.email index 9677c8b090..07085f8564 100644 --- a/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/office_worker_update_confirmation.de.email +++ b/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/office_worker_update_confirmation.de.email @@ -9,14 +9,16 @@ {% block sub-headline %}{{ bplan.name }}{% endblock %} {% block content %} - +

der oben genannte Bebauungsplan wurde auf {{ site.name }} veröffentlicht, geändert oder als Entwurf angelegt. Alle eingehenden Stellungnahmen werden an {{ bplan.office_worker_email }} weitergeleitet. - -Bebauungsplan-Nr.: {{ bplan.identifier }} +

+

+Bebauungsplan-Nr.: {{ bplan.identifier }}
Beteiligungszeitraum: {{ bplan.start_date }} Uhr – {{ bplan.end_date }} Uhr - +

+

Falls der Bebauungsplan nicht korrekt angezeigt wird, können Sie sich an {{ contact_email }} wenden. - +

{% endblock %} {% block cta_label %}Zur Projektübersicht{% endblock %} diff --git a/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/submitter_confirmation.de.email b/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/submitter_confirmation.de.email index 2c733eec36..66056b2363 100644 --- a/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/submitter_confirmation.de.email +++ b/meinberlin/apps/bplan/templates/meinberlin_bplan/emails/submitter_confirmation.de.email @@ -11,28 +11,37 @@ {% block greeting %}{% endblock %} {% block content_left_aligned %} +

Guten Tag, - +

+

vielen Dank für Ihre Stellungnahme. Sie ist an die zuständige Stelle weitergeleitet worden und geht in die Abwägung der öffentlichen und privaten Belange ein. Wenn Sie sich an einer öffentlichen Auslegung beteiligt haben, werden Sie außerdem nach Festsetzung des Bebauungsplans von der verantwortlichen Stelle schriftlich (per E-Mail oder postalisch) über das Ergebnis informiert, sofern Sie Ihre Adresse angegeben haben. - +

+

Ihre Angaben in der Übersicht: - -Name +

+

+Name
{{ statement.name }} - -Straße, Hausnummer +

+

+Straße, Hausnummer
{{ statement.street_number }} - -PLZ, Ort +

+

+PLZ, Ort
{{ statement.postal_code_city }} - -E-Mail-Adresse +

+

+E-Mail-Adresse
{{ statement.email }} - +

+

Ihre Stellungnahme - +

+

{{ statement.statement }} - +

{% endblock %} {% block cta_label %}Bebauungsplan anzeigen{% endblock %} diff --git a/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_update_form.html b/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_update_form.html index bf9be9105b..235d9e0c6c 100644 --- a/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_update_form.html +++ b/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_update_form.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load i18n %} -{% block title %}{% blocktrans with title=object.name %}Edit {{ title }}{% endblocktrans %} — {{ block.super }}{% endblock %} +{% block title %}{% blocktranslate with title=object.name %}Edit {{ title }}{% endblocktranslate %} — {{ block.super }}{% endblock %} {% block content %}
diff --git a/meinberlin/apps/cms/templates/meinberlin_cms/emails/form_submission.en.email b/meinberlin/apps/cms/templates/meinberlin_cms/emails/form_submission.en.email index bcec8bc9d1..19b8eefd99 100644 --- a/meinberlin/apps/cms/templates/meinberlin_cms/emails/form_submission.en.email +++ b/meinberlin/apps/cms/templates/meinberlin_cms/emails/form_submission.en.email @@ -6,12 +6,14 @@ {% block headline %}{{ emailformpage.title }}{% endblock %} {% block content %} +

{{ emailformpage.email_content }} - +

{% for key, value in field_values.items %} - - {{key}}: +

+ {{key}}:
{{value}} +

{% endfor %} {% endblock %} diff --git a/meinberlin/apps/cms/templates/meinberlin_cms/emails/form_submission_attached.en.email b/meinberlin/apps/cms/templates/meinberlin_cms/emails/form_submission_attached.en.email index fb779c0e6c..90dcd57a36 100644 --- a/meinberlin/apps/cms/templates/meinberlin_cms/emails/form_submission_attached.en.email +++ b/meinberlin/apps/cms/templates/meinberlin_cms/emails/form_submission_attached.en.email @@ -6,5 +6,7 @@ {% block headline %}{{ emailformpage.title }}{% endblock %} {% block content %} +

{{ emailformpage.email_content }} +

{% endblock %} diff --git a/meinberlin/apps/cms/templates/meinberlin_cms/home_page.html b/meinberlin/apps/cms/templates/meinberlin_cms/home_page.html index 94406c142d..6ea51bf22a 100644 --- a/meinberlin/apps/cms/templates/meinberlin_cms/home_page.html +++ b/meinberlin/apps/cms/templates/meinberlin_cms/home_page.html @@ -36,7 +36,7 @@

{{ self.storefront.teaser }}

{{ self.storefront.num_entries }}

-

{% blocktrans count counter=self.storefront.num_entries %}entry added by citizens{% plural %}entries added by citizens{% endblocktrans %}

+

{% blocktranslate count counter=self.storefront.num_entries %}entry added by citizens{% plural %}entries added by citizens{% endblocktranslate %}

@@ -51,7 +51,7 @@

{{ self.storefront.teaser }}

{{ self.storefront.num_projects }}
-

{% blocktrans count counter=self.storefront.num_projects %}project you can participate in!{% plural %}projects you can participate in!{% endblocktrans %}

+

{% blocktranslate count counter=self.storefront.num_projects %}project you can participate in!{% plural %}projects you can participate in!{% endblocktranslate %}

diff --git a/meinberlin/apps/cms/templates/meinberlin_cms/includes/storefronts.html b/meinberlin/apps/cms/templates/meinberlin_cms/includes/storefronts.html index 418090b759..8731a15f07 100644 --- a/meinberlin/apps/cms/templates/meinberlin_cms/includes/storefronts.html +++ b/meinberlin/apps/cms/templates/meinberlin_cms/includes/storefronts.html @@ -7,10 +7,10 @@ class="storefront__item storefront__district tile__md" >

- {% blocktrans with district=item.district %}What is happening in {{ district }}?{% endblocktrans %} + {% blocktranslate with district=item.district %}What is happening in {{ district }}?{% endblocktranslate %}

{% elif item.project and not item.quote %} @@ -49,7 +49,7 @@

{% if item.project.module_running_days_left < 365 %} - {% blocktrans with time_left=item.project.module_running_time_left %}{{ time_left }} remaining{% endblocktrans %} + {% blocktranslate with time_left=item.project.module_running_time_left %}{{ time_left }} remaining{% endblocktranslate %} {% else %} {% translate 'more than 1 year remaining' %} {% endif %} @@ -58,12 +58,12 @@

- {% blocktrans with date=item.project.future_modules.first.module_start|date:"d.m.Y" %}Participation: from {{ date }}{% endblocktrans %} + {% blocktranslate with date=item.project.future_modules.first.module_start|date:"d.m.Y" %}Participation: from {{ date }}{% endblocktranslate %}

{% elif item.project.has_finished %}
- {% blocktrans %}Participation ended. Read result.{% endblocktrans %} + {% blocktranslate %}Participation ended. Read result.{% endblocktranslate %}
{% endif %} @@ -76,7 +76,7 @@

- {% blocktrans with name=item.project.name|truncatechars:60 %}What is your opinion on this: {{ name }}?{% endblocktrans %} + {% blocktranslate with name=item.project.name|truncatechars:60 %}What is your opinion on this: {{ name }}?{% endblocktranslate %}

{% elif not item.project and item.quote %} diff --git a/meinberlin/apps/documents/templates/meinberlin_documents/chapter_detail.html b/meinberlin/apps/documents/templates/meinberlin_documents/chapter_detail.html index ee202c7fb5..2b7e101230 100644 --- a/meinberlin/apps/documents/templates/meinberlin_documents/chapter_detail.html +++ b/meinberlin/apps/documents/templates/meinberlin_documents/chapter_detail.html @@ -56,7 +56,7 @@

href="{{ paragraph.get_absolute_url }}" > - {% blocktrans count count=paragraph.comments.all|length %}{{ count }} Comment{% plural %}{{ count }} Comments{% endblocktrans %} + {% blocktranslate count count=paragraph.comments.all|length %}{{ count }} Comment{% plural %}{{ count }} Comments{% endblocktranslate %}

diff --git a/meinberlin/apps/ideas/templates/meinberlin_ideas/idea_update_form.html b/meinberlin/apps/ideas/templates/meinberlin_ideas/idea_update_form.html index 8afb4540e0..6b2c300040 100644 --- a/meinberlin/apps/ideas/templates/meinberlin_ideas/idea_update_form.html +++ b/meinberlin/apps/ideas/templates/meinberlin_ideas/idea_update_form.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load i18n %} -{% block title %}{% blocktrans with title=object.name %}Edit {{ title }}{% endblocktrans %} — {{ block.super }}{% endblock %} +{% block title %}{% blocktranslate with title=object.name %}Edit {{ title }}{% endblocktranslate %} — {{ block.super }}{% endblock %} {% block content %}
diff --git a/meinberlin/apps/initiators/templates/meinberlin_initiators/emails/initiator_request.de.email b/meinberlin/apps/initiators/templates/meinberlin_initiators/emails/initiator_request.de.email index b2b3b87af6..5d40f5ab3a 100644 --- a/meinberlin/apps/initiators/templates/meinberlin_initiators/emails/initiator_request.de.email +++ b/meinberlin/apps/initiators/templates/meinberlin_initiators/emails/initiator_request.de.email @@ -5,23 +5,30 @@ {% block headline %}Neue Initiatorenanfrage von {{ user.username }}{% endblock %} -{% block content %}{{ user.username }} möchte zur Initator*in gemacht werden. - -Name +{% block content %} +

+{{ user.username }} möchte zur Initator*in gemacht werden. +

+

+Name
{{ user.username }} - -Name der Behörde +

+

+Name der Behörde
{{ organisation.name }} - -Dienstliche E-Mail-Adresse +

+

+Dienstliche E-Mail-Adresse
{{ user.email }} - -Telefonnummer +

+

+Telefonnummer
{{ phone }} - -Datum der Nutzerregistrierung auf meinBerlin +

+

+Datum der Nutzerregistrierung auf meinBerlin
{{ user.date_joined }} - +

{% endblock %} {% block cta_label %}Zur Administration{% endblock %} diff --git a/meinberlin/apps/initiators/templates/meinberlin_initiators/emails/initiator_request.en.email b/meinberlin/apps/initiators/templates/meinberlin_initiators/emails/initiator_request.en.email index 726f470c6e..ae713495de 100644 --- a/meinberlin/apps/initiators/templates/meinberlin_initiators/emails/initiator_request.en.email +++ b/meinberlin/apps/initiators/templates/meinberlin_initiators/emails/initiator_request.en.email @@ -5,23 +5,30 @@ {% block headline %}New initiator request by {{ user.username }}{% endblock %} -{% block content %}{{ user.username }} wants to become an initiator. - -Name +{% block content %} +

+{{ user.username }} wants to become an initiator. +

+

+Name
{{ user.username }} - -Name of the Organisation +

+

+Name of the Organisation
{{ organisation.name }} - -Email address +

+

+Email address
{{ user.email }} - -Phone number +

+

+Phone number
{{ phone }} - -Date of registration on meinBerlin +

+

+Date of registration on meinBerlin
{{ user.date_joined }} - +

{% endblock %} {% block cta_label %}Go to Administration{% endblock %} diff --git a/meinberlin/apps/kiezkasse/templates/meinberlin_kiezkasse/proposal_moderate_form.html b/meinberlin/apps/kiezkasse/templates/meinberlin_kiezkasse/proposal_moderate_form.html index ee5ac74ca2..dc31607e6b 100644 --- a/meinberlin/apps/kiezkasse/templates/meinberlin_kiezkasse/proposal_moderate_form.html +++ b/meinberlin/apps/kiezkasse/templates/meinberlin_kiezkasse/proposal_moderate_form.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load i18n %} -{% block title %}{% blocktrans with name=object.name %}Moderate {{ name }}{% endblocktrans %}{% endblock %} +{% block title %}{% blocktranslate with name=object.name %}Moderate {{ name }}{% endblocktranslate %}{% endblock %} {% block content %}
diff --git a/meinberlin/apps/kiezkasse/templates/meinberlin_kiezkasse/proposal_update_form.html b/meinberlin/apps/kiezkasse/templates/meinberlin_kiezkasse/proposal_update_form.html index b89830eaeb..22be15f2f6 100644 --- a/meinberlin/apps/kiezkasse/templates/meinberlin_kiezkasse/proposal_update_form.html +++ b/meinberlin/apps/kiezkasse/templates/meinberlin_kiezkasse/proposal_update_form.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load i18n %} -{% block title %}{% blocktrans with title=object.name %}Edit {{ title }}{% endblocktrans %} — {{ block.super }}{% endblock %} +{% block title %}{% blocktranslate with title=object.name %}Edit {{ title }}{% endblocktranslate %} — {{ block.super }}{% endblock %} {% block content %}
diff --git a/meinberlin/apps/livequestions/templates/meinberlin_livequestions/includes/module_affiliations_form.html b/meinberlin/apps/livequestions/templates/meinberlin_livequestions/includes/module_affiliations_form.html index 6b240fadc5..9c37a58e54 100644 --- a/meinberlin/apps/livequestions/templates/meinberlin_livequestions/includes/module_affiliations_form.html +++ b/meinberlin/apps/livequestions/templates/meinberlin_livequestions/includes/module_affiliations_form.html @@ -1,6 +1,6 @@ {% load i18n %} -

{% blocktrans %}Here you can specify affiliations. Users must classify questions accordingly. The questions can be filtered by affiliation and evaluated in the statistics.{% endblocktrans %} +

{% blocktranslate %}Here you can specify affiliations. Users must classify questions accordingly. The questions can be filtered by affiliation and evaluated in the statistics.{% endblocktranslate %}

diff --git a/meinberlin/apps/mapideas/templates/meinberlin_mapideas/mapidea_update_form.html b/meinberlin/apps/mapideas/templates/meinberlin_mapideas/mapidea_update_form.html index 1e5d51a644..e34d26ddd6 100644 --- a/meinberlin/apps/mapideas/templates/meinberlin_mapideas/mapidea_update_form.html +++ b/meinberlin/apps/mapideas/templates/meinberlin_mapideas/mapidea_update_form.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load i18n %} -{% block title %}{% blocktrans with title=object.name %}Edit {{ title }}{% endblocktrans %} — {{ block.super }}{% endblock %} +{% block title %}{% blocktranslate with title=object.name %}Edit {{ title }}{% endblocktranslate %} — {{ block.super }}{% endblock %} {% block content %}
diff --git a/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_update_form.html b/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_update_form.html index 0882457dae..a6f6204e5d 100644 --- a/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_update_form.html +++ b/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_update_form.html @@ -1,7 +1,7 @@ {% extends "a4dashboard/base_dashboard_project.html" %} {% load i18n %} -{% block title %}{% blocktrans with title=object.name %}Edit {{ title }}{% endblocktrans %} — {{ block.super }}{% endblock %} +{% block title %}{% blocktranslate with title=object.name %}Edit {{ title }}{% endblocktranslate %} — {{ block.super }}{% endblock %} {% block dashboard_project_content %}
diff --git a/meinberlin/apps/notifications/management/commands/send_test_emails.py b/meinberlin/apps/notifications/management/commands/send_test_emails.py index 1bf5ed78da..e120f23066 100644 --- a/meinberlin/apps/notifications/management/commands/send_test_emails.py +++ b/meinberlin/apps/notifications/management/commands/send_test_emails.py @@ -2,22 +2,24 @@ from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand -from django.core.management.base import CommandError from adhocracy4.actions.models import Action from adhocracy4.actions.verbs import Verbs from adhocracy4.comments.models import Comment from adhocracy4.emails.mixins import SyncEmailMixin +from adhocracy4.phases.models import Phase from adhocracy4.projects.models import Project from adhocracy4.reports import emails as reports_emails from adhocracy4.reports.models import Report from meinberlin.apps.bplan import emails as bplan_emails from meinberlin.apps.bplan.models import Bplan from meinberlin.apps.bplan.models import Statement +from meinberlin.apps.budgeting.models import Proposal from meinberlin.apps.cms.models import EmailFormPage from meinberlin.apps.contrib.emails import Email from meinberlin.apps.ideas.models import Idea from meinberlin.apps.notifications import emails as notification_emails +from meinberlin.apps.offlineevents.models import OfflineEvent from meinberlin.apps.organisations.models import Organisation from meinberlin.apps.projects import models as project_models @@ -53,22 +55,29 @@ def handle(self, *args, **options): self._send_notifications_create_idea() self._send_notifications_comment_idea() + self._send_notifications_on_moderator_feedback() + self._send_notification_phase() + self._send_notification_offlineevent() + self._send_notification_project_created() self._send_bplan_statement() self._send_bplan_update() self._send_report_mails() - self._send_allauth_email_confirmation() - self._send_allauth_password_reset() - self._send_invitation_private_project() self._send_invitation_moderator() self._send_initiator_request() + self._send_welcome_email() + self._send_form_mail() + self._send_allauth_email_confirmation() + self._send_allauth_password_reset() + self._send_allauth_unknown_account() + def _send_notifications_create_idea(self): # Send notification for a newly created item action = Action.objects.filter( @@ -76,7 +85,8 @@ def _send_notifications_create_idea(self): obj_content_type=ContentType.objects.get_for_model(Idea) ).exclude(project=None).first() if not action: - raise CommandError('At least one idea is required') + self.stderr.write('At least one idea is required') + return self._send_notify_create_item(action) @@ -88,7 +98,8 @@ def _send_notifications_comment_idea(self): target_content_type=ContentType.objects.get_for_model(Idea) ).exclude(project=None).first() if not action: - raise CommandError('At least one idea with a comment is required') + self.stderr.write('At least one idea with a comment is required') + return self._send_notify_create_item(action) @@ -105,16 +116,92 @@ def _send_notify_create_item(self, action): template_name=notification_emails. NotifyModeratorsEmail.template_name) - def _send_notification_phase(self): - action = Action.objects.filter( - verb=Verbs.SCHEDULE.value + def _send_notifications_on_moderator_feedback(self): + moderated_idea = Idea.objects.filter( + moderator_statement__isnull=False + ).first() + if not moderated_idea: + self.stderr.write( + 'At least one idea with moderator feedback is required' + ) + return + + TestEmail.send( + moderated_idea, + receiver=[self.user], + send_to_creator=True, + template_name=notification_emails. + NotifyCreatorOrContactOnModeratorFeedback.template_name) + + moderated_proposal = Proposal.objects.filter( + moderator_statement__isnull=False ).first() + if not moderated_proposal: + self.stderr.write( + 'At least one proposal with moderator feedback is required' + ) + return + + TestEmail.send( + moderated_proposal, + receiver=[self.user], + template_name=notification_emails. + NotifyCreatorOrContactOnModeratorFeedback.template_name) + + def _send_notification_phase(self): + phase = Phase.objects.filter(start_date__isnull=False).first() + if not phase: + self.stderr.write('At least one phase with dates is required') + return + action = Action.objects.create( + verb=Verbs.SCHEDULE, + obj_content_type=ContentType.objects.get_for_model(Phase), + obj=phase, + project=phase.module.project, + ) + TestEmail.send( action, receiver=[self.user], template_name=notification_emails. NotifyFollowersOnPhaseIsOverSoonEmail.template_name ) + action.delete() + + action = Action.objects.create( + verb=Verbs.START, + obj_content_type=ContentType.objects.get_for_model(Phase), + obj=phase, + project=phase.module.project, + ) + + TestEmail.send( + action, + receiver=[self.user], + template_name=notification_emails. + NotifyFollowersOnPhaseStartedEmail.template_name + ) + action.delete() + + def _send_notification_offlineevent(self): + offlineevent = OfflineEvent.objects.first() + if not offlineevent: + self.stderr.write('At least one offline event is required') + return + action = Action.objects.create( + obj_content_type=ContentType.objects.get_for_model(OfflineEvent), + obj=offlineevent, + project=offlineevent.project, + verb=Verbs.SCHEDULE + ) + + TestEmail.send( + action, + receiver=[self.user], + template_name=notification_emails. + NotifyFollowersOnUpcommingEventEmail.template_name + ) + action.delete() def _send_notification_project_created(self): project = Project.objects.first() @@ -129,11 +216,14 @@ def _send_notification_project_created(self): def _send_bplan_statement(self): statement = Statement.objects.first() + identifier = statement.module.project.externalproject.bplan.identifier if not statement: - raise CommandError('At least one bplan statement is required') + self.stderr.write('At least one bplan statement is required') + return TestEmail.send( statement, + identifier=identifier, receiver=[self.user], template_name=bplan_emails.OfficeWorkerNotification.template_name ) @@ -148,7 +238,8 @@ def _send_bplan_update(self): # Send notification for bplan update bplan = Bplan.objects.first() if not bplan: - raise CommandError('At least one bplan is required') + self.stderr.write('At least one bplan is required') + return TestEmail.send( bplan, @@ -160,7 +251,8 @@ def _send_bplan_update(self): def _send_report_mails(self): report = Report.objects.first() if not report: - raise CommandError('At least on report is required') + self.stderr.write('At least on report is required') + return TestEmail.send( report, @@ -168,45 +260,11 @@ def _send_report_mails(self): template_name=reports_emails.ReportModeratorEmail.template_name ) - def _send_allauth_password_reset(self): - context = {"current_site": 'http://example.com/...', - "user": self.user, - "password_reset_url": 'http://example.com/...', - "request": None, - "username": self.user.username} - - TestEmail.send(self.user, - receiver=[self.user], - template_name='account/email/password_reset_key', - **context - ) - - def _send_allauth_email_confirmation(self): - context = { - "user": self.user, - "activate_url": 'http://example.com/...', - "current_site": 'http://example.com/...', - "key": 'the1454key', - } - - TestEmail.send( - self.user, - receiver=[self.user], - template_name='account/email/email_confirmation_signup', - **context - ) - - TestEmail.send( - self.user, - receiver=[self.user], - template_name='account/email/email_confirmation', - **context - ) - def _send_invitation_private_project(self): invite = project_models.ParticipantInvite.objects.first() if not invite: - raise CommandError('At least one participant request is required') + self.stderr.write('At least one participant request is required') + return TestEmail.send( invite, receiver=[self.user], @@ -216,7 +274,8 @@ def _send_invitation_private_project(self): def _send_invitation_moderator(self): invite = project_models.ModeratorInvite.objects.first() if not invite: - raise CommandError('At least one moderator request is required') + self.stderr.write('At least one moderator request is required') + return TestEmail.send( invite, receiver=[self.user], @@ -233,10 +292,18 @@ def _send_initiator_request(self): template_name='meinberlin_initiators/emails/initiator_request' ) + def _send_welcome_email(self): + TestEmail.send( + self.user, + receiver=[self.user], + template_name='meinberlin_users/emails/welcome' + ) + def _send_form_mail(self): emailformpage = EmailFormPage.objects.first() if not emailformpage: - raise CommandError('At least one emailformpage obj is required') + self.stderr.write('At least one emailformpage obj is required') + return fields = { 'Multi': 'some text with \n' 'newlines and \n' @@ -252,3 +319,50 @@ def _send_form_mail(self): receiver=[self.user], template_name='meinberlin_cms/emails/form_submission' ) + + def _send_allauth_password_reset(self): + context = {"user": self.user, + "password_reset_url": 'http://example.com/...', + "request": None, + "username": self.user.username} + + TestEmail.send(self.user, + receiver=[self.user], + template_name='account/email/password_reset_key', + **context + ) + + def _send_allauth_email_confirmation(self): + context = { + "user": self.user, + "activate_url": 'http://example.com/...', + "key": 'the1454key', + } + + TestEmail.send( + self.user, + receiver=[self.user], + template_name='account/email/email_confirmation_signup', + **context + ) + + TestEmail.send( + self.user, + receiver=[self.user], + template_name='account/email/email_confirmation', + **context + ) + + def _send_allauth_unknown_account(self): + context = { + "user": self.user, + "email": 'user@example.com', + "signup_url": 'http://example.com/...', + } + + TestEmail.send( + self.user, + receiver=[self.user], + template_name='account/email/unknown_account', + **context + ) diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator.de.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator.de.email index ebdc94d193..e18114b3a7 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator.de.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator.de.email @@ -7,11 +7,19 @@ {% block greeting %}Hallo {{ receiver.username }},{% endblock %} -{% block content %}{{ action.actor.username }} hat Ihren Beitrag kommentiert: +{% block content %} +

+{{ action.actor.username }} hat Ihren Beitrag kommentiert: +

{% if action.obj.comment %} +

"{{ action.obj.comment|truncatewords:75 }}" +

{% endif %} -Möchten Sie antworten?{% endblock %} +

+Möchten Sie antworten? +

+{% endblock %} {% block cta_url %}{% if action.obj.get_absolute_url %}{{ email.get_host }}{{ action.obj.get_absolute_url }}{% else %}{{ email.get_host }}{{ action.project.get_absolute_url }}{% endif %}{% endblock %} {% block cta_label %}{% if action.obj.get_absolute_url %}Beitrag anzeigen{% else %}Projekt anzeigen{% endif %}{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator.en.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator.en.email index 98a1a1c7ef..e8233bfd5c 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator.en.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator.en.email @@ -7,11 +7,19 @@ {% block greeting %}Hello {{ receiver.username }},{% endblock %} -{% block content %}{{ action.actor.username }} commented on your post: +{% block content %} +

+{{ action.actor.username }} commented on your post: +

{% if action.obj.comment %} +

"{{ action.obj.comment|truncatewords:75 }}" +

{% endif %} -Would you like to answer?{% endblock %} +

+Would you like to answer? +

+{% endblock %} {% block cta_url %}{% if action.obj.get_absolute_url %}{{ email.get_host }}{{ action.obj.get_absolute_url }}{% else %}{{ email.get_host }}{{ action.project.get_absolute_url }}{% endif %}{% endblock %} {% block cta_label %}{% if action.obj.get_absolute_url %}View Post{% else %}Visit the project{% endif %}{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator_on_moderator_feedback.de.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator_on_moderator_feedback.de.email index 1d7e84bee5..42dedf6396 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator_on_moderator_feedback.de.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator_on_moderator_feedback.de.email @@ -8,15 +8,22 @@ {% block greeting %}{% if send_to_creator %}Hallo {{ receiver.username }},{% else %}Guten Tag,{% endif %}{% endblock %} {% block content %} +

{{ object.module.project.organisation.name }} hat auf Ihren Beitrag reagiert. - -{% if object.moderator_feedback %}Der Status Ihres Beitrags hat sich geändert und steht nun auf “{{ object.get_moderator_feedback_display }}”. - +

+{% if object.moderator_feedback %} +

+Der Status Ihres Beitrags hat sich geändert und steht nun auf “{{ object.get_moderator_feedback_display }}”. +

{% endif %} -{% if object.moderator_statement.statement %}Offizielle Rückmeldung: {{ object.moderator_statement.statement | safe }} - +{% if object.moderator_statement.statement %} +

+Offizielle Rückmeldung: {{ object.moderator_statement.statement | safe }} +

{% endif %} +

Möchten Sie antworten? +

{% endblock %} {% block cta_url %}{% if object.get_absolute_url %}{{ email.get_host }}{{ object.get_absolute_url }}{% else %}{{ email.get_host }}{{ object.project.get_absolute_url }}{% endif %}{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator_on_moderator_feedback.en.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator_on_moderator_feedback.en.email index eb1db837a9..9d53b774f0 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator_on_moderator_feedback.en.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_creator_on_moderator_feedback.en.email @@ -8,15 +8,22 @@ {% block greeting %}{% if send_to_creator %}Hello {{ receiver.username }},{% else %}Hello,{% endif %}{% endblock %} {% block content %} +

{{ object.module.project.organisation.name }} reacted on your contribution. - -{% if object.moderator_feedback %}The status of your contribution has been changed and is now “{{ object.get_moderator_feedback_display }}". - +

+{% if object.moderator_feedback %} +

+The status of your contribution has been changed and is now “{{ object.get_moderator_feedback_display }}". +

{% endif %} -{% if object.moderator_statement.statement %}Official feedback: {{ object.moderator_statement.statement | safe }} - +{% if object.moderator_statement.statement %} +

+Official feedback: {{ object.moderator_statement.statement | safe }} +

{% endif %} +

Do you want to answer? +

{% endblock %} {% block cta_url %}{% if object.get_absolute_url %}{{ email.get_host }}{{ object.get_absolute_url }}{% else %}{{ email.get_host }}{{ object.project.get_absolute_url }}{% endif %}{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_event_upcomming.de.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_event_upcomming.de.email index bdde08105c..467378819f 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_event_upcomming.de.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_event_upcomming.de.email @@ -7,11 +7,17 @@ {% block greeting %}Hallo {{ receiver.username }},{% endblock %} -{% block content %}am {{ action.obj.date }} Uhr findet die folgende Veranstaltung statt: - +{% block content %} +

+am {{ action.obj.date }} Uhr findet die folgende Veranstaltung statt: +

+

{{ action.obj.name }} - -Weitere Informationen zu der Veranstaltung finden Sie im Projekt.{% endblock %} +

+

+Weitere Informationen zu der Veranstaltung finden Sie im Projekt. +

+{% endblock %} {% block cta_url %}{{ email.get_host }}{{ action.obj.get_absolute_url }}{% endblock %} {% block cta_label %}Veranstaltung anzeigen{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_event_upcomming.en.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_event_upcomming.en.email index 55d9669702..2c41e296c8 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_event_upcomming.en.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_event_upcomming.en.email @@ -7,9 +7,17 @@ {% block greeting %}Hello {{ receiver.username }},{% endblock %} -{% block content %}The following event takes place on {{ action.obj.date }}: +{% block content %} +

+The following event takes place on {{ action.obj.date }}: +

+

{{ action.obj.name }} -Further information about the event can be found in the project.{% endblock %} +

+

+Further information about the event can be found in the project. +

+{% endblock %} {% block cta_url %}{{ email.get_host }}{{ action.obj.get_absolute_url }}{% endblock %} {% block cta_label %}Show Event{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_over_soon.de.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_over_soon.de.email index a1af2a45bf..7c52e16483 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_over_soon.de.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_over_soon.de.email @@ -7,9 +7,14 @@ {% block greeting %}Hallo {{ receiver.username }},{% endblock %} -{% block content %}die Online-Beteiligung im oben genannten Projekt endet bald. - -Sie können noch bis zum {{ action.obj.end_date }} Uhr daran teilnehmen.{% endblock %} +{% block content %} +

+die Online-Beteiligung im oben genannten Projekt endet bald. +

+

+Sie können noch bis zum {{ action.obj.end_date }} Uhr daran teilnehmen. +

+{% endblock %} {% block cta_url %}{{ email.get_host }}{{ action.obj.module.get_detail_url }}{% endblock %} {% block cta_label %}Jetzt mitmachen{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_over_soon.en.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_over_soon.en.email index 94a1437fa6..f594e06635 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_over_soon.en.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_over_soon.en.email @@ -7,9 +7,14 @@ {% block greeting %}Hello {{ receiver.username }},{% endblock %} -{% block content %}the online participation in the above mentioned project will end soon. - -You can still participate until {{ action.obj.end_date }}.{% endblock %} +{% block content %} +

+the online participation in the above mentioned project will end soon. +

+

+You can still participate until {{ action.obj.end_date }}. +

+{% endblock %} {% block cta_url %}{{ email.get_host }}{{ action.obj.module.get_detail_url }}{% endblock %} {% block cta_label %}Join now{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_started.de.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_started.de.email index 503d9efc47..e4080feff5 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_started.de.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_started.de.email @@ -7,9 +7,14 @@ {% block greeting %}Hallo {{ receiver.username }},{% endblock %} -{% block content %}die Online-Beteiligung im oben genannten Projekt hat begonnen. - -Sie können bis zum {{ action.obj.end_date }} Uhr daran teilnehmen.{% endblock %} +{% block content %} +

+die Online-Beteiligung im oben genannten Projekt hat begonnen. +

+

+Sie können bis zum {{ action.obj.end_date }} Uhr daran teilnehmen. +

+{% endblock %} {% block cta_url %}{{ email.get_host }}{{ action.obj.module.get_detail_url }}{% endblock %} {% block cta_label %}Jetzt mitmachen{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_started.en.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_started.en.email index 6ce95b4403..3db21df3de 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_started.en.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_followers_phase_started.en.email @@ -7,9 +7,14 @@ {% block greeting %}Hello {{ receiver.username }},{% endblock %} -{% block content %}Online participation for the above project has started. - -You can participate untill {{ action.obj.end_date }}.{% endblock %} +{% block content %} +

+Online participation for the above project has started. +

+

+You can participate untill {{ action.obj.end_date }}. +

+{% endblock %} {% block cta_url %}{{ email.get_host }}{{ action.obj.module.get_detail_url }}{% endblock %} {% block cta_label %}Join now{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_initiators_project_created.de.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_initiators_project_created.de.email index bef56aaad8..c098695270 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_initiators_project_created.de.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_initiators_project_created.de.email @@ -9,7 +9,9 @@ {% block greeting %}Hallo {{ receiver.username }},{% endblock %} {% block content %} +

{{ creator.username }} hat ein neues Projekt für {{ project.organisation.name }} angelegt. +

{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_initiators_project_created.en.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_initiators_project_created.en.email index 3b72a95c7f..fa2c4c062b 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_initiators_project_created.en.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_initiators_project_created.en.email @@ -9,7 +9,10 @@ {% block greeting %}Hello {{ receiver.username }},{% endblock %} {% block content %} -{{ creator.username }} created a new project for {{ project.organisation.name }}.{% endblock %} +

+{{ creator.username }} created a new project for {{ project.organisation.name }}. +

+{% endblock %} {% block cta_url %}{{ email.get_host }}{{ project.get_absolute_url }}{% endblock %} {% block cta_label %}Show project{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_moderator.de.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_moderator.de.email index c6e72983d9..74931ea5fd 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_moderator.de.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_moderator.de.email @@ -9,11 +9,15 @@ {% block greeting %}Hallo {{ receiver.username }},{% endblock %} {% block content %} +

es gibt einen neuen Beitrag in dem Projekt, das Sie moderieren. - +

+

{{ action.actor.username }} schrieb am {{ action.timestamp|date:"d. F Y, H:i"}} Uhr: - +

+

„{{ action.obj }}“ +

{% endblock%} {% block cta_url %}{% if action.obj.get_absolute_url %}{{ email.get_host }}{{ action.obj.get_absolute_url }}{% else %}{{ email.get_host }}{{ action.project.get_absolute_url }}{% endif %}{% endblock %} diff --git a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_moderator.en.email b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_moderator.en.email index 82fb4d7610..96031d61b8 100644 --- a/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_moderator.en.email +++ b/meinberlin/apps/notifications/templates/meinberlin_notifications/emails/notify_moderator.en.email @@ -9,11 +9,15 @@ {% block greeting %}Hello {{ receiver.username }},{% endblock %} {% block content %} +

there is a new post in the project you are moderating. - +

+

{{ action.actor.username }} wrote on {% language 'en' %}{{ action.timestamp }}{% endlanguage %}: - +

+

"{{ action.obj }}" +

{% endblock %} {% block cta_url %}{% if action.obj.get_absolute_url %}{{ email.get_host }}{{ action.obj.get_absolute_url }}{% else %}{{ email.get_host }}{{ action.project.get_absolute_url }}{% endif %}{% endblock %} diff --git a/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_list.html b/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_list.html index 297418a0f9..c44f2d2726 100644 --- a/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_list.html +++ b/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_list.html @@ -15,7 +15,7 @@

-

{% blocktrans %}Here, you can include events that take place as part of the participation project.{% endblocktrans %}

+

{% blocktranslate %}Here, you can include events that take place as part of the participation project.{% endblocktranslate %}

{% if object_list.count > 0 %}
    diff --git a/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_update_form.html b/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_update_form.html index 21d555a651..7992ec6fcc 100644 --- a/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_update_form.html +++ b/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_update_form.html @@ -1,7 +1,7 @@ {% extends "a4dashboard/base_dashboard_project.html" %} {% load i18n %} -{% block title %}{% blocktrans with title=object.name %}Edit {{ title }}{% endblocktrans %} — {{ block.super }}{% endblock %} +{% block title %}{% blocktranslate with title=object.name %}Edit {{ title }}{% endblocktranslate %} — {{ block.super }}{% endblock %} {% block dashboard_project_content %}
    diff --git a/meinberlin/apps/plans/templates/meinberlin_plans/plan_update_form.html b/meinberlin/apps/plans/templates/meinberlin_plans/plan_update_form.html index 115ffa0cb3..00a59496b3 100644 --- a/meinberlin/apps/plans/templates/meinberlin_plans/plan_update_form.html +++ b/meinberlin/apps/plans/templates/meinberlin_plans/plan_update_form.html @@ -17,7 +17,7 @@
    {% endblock %} -{% block title %}{% blocktrans with title=object.title %}Edit {{title}}{% endblocktrans %} — {{ block.super }}{% endblock %} +{% block title %}{% blocktranslate with title=object.title %}Edit {{title}}{% endblocktranslate %} — {{ block.super }}{% endblock %} {% block dashboard_content %}
    diff --git a/meinberlin/apps/plans/templates/meinberlin_plans/project_plans_form.html b/meinberlin/apps/plans/templates/meinberlin_plans/project_plans_form.html index 62020ccbaa..8516f69633 100644 --- a/meinberlin/apps/plans/templates/meinberlin_plans/project_plans_form.html +++ b/meinberlin/apps/plans/templates/meinberlin_plans/project_plans_form.html @@ -1,13 +1,13 @@ {% load i18n %}

    - {% blocktrans %}Please select the plan your project belongs to. Your project will be shown in the list of plans accordingly.{% endblocktrans %} + {% blocktranslate %}Please select the plan your project belongs to. Your project will be shown in the list of plans accordingly.{% endblocktranslate %}

    {% if form.plans.field.choices %} {% include 'a4dashboard/includes/form_field.html' with field=form.plans %} {% else %}

    {% url 'a4dashboard:plan-create' form.instance.organisation.slug as plan_create_url %} - {% blocktrans %}No plan has been created yet. You can do that here.{% endblocktrans %} + {% blocktranslate %}No plan has been created yet. You can do that here.{% endblocktranslate %}

    {% endif %} {% if form.plans.errors %} diff --git a/meinberlin/apps/platformemails/templates/meinberlin_platformemails/platformemail_form.html b/meinberlin/apps/platformemails/templates/meinberlin_platformemails/platformemail_form.html index 8a4c26786e..4b7f389090 100644 --- a/meinberlin/apps/platformemails/templates/meinberlin_platformemails/platformemail_form.html +++ b/meinberlin/apps/platformemails/templates/meinberlin_platformemails/platformemail_form.html @@ -6,7 +6,7 @@

    {% translate 'Create platform email'%}

    -

    {% blocktrans %}This email will be sent to all registered and verified users of mein.berlin.de.{% endblocktrans %}

    +

    {% blocktranslate %}This email will be sent to all registered and verified users of mein.berlin.de.{% endblocktranslate %}

    {% csrf_token %} diff --git a/meinberlin/apps/projectcontainers/templates/meinberlin_projectcontainers/includes/container_detail.html b/meinberlin/apps/projectcontainers/templates/meinberlin_projectcontainers/includes/container_detail.html index d9dbf08590..db30e33518 100644 --- a/meinberlin/apps/projectcontainers/templates/meinberlin_projectcontainers/includes/container_detail.html +++ b/meinberlin/apps/projectcontainers/templates/meinberlin_projectcontainers/includes/container_detail.html @@ -10,7 +10,7 @@

    {{ container.name }}

    {{ container.description }}

    - {% blocktrans with count=project.projectcontainer.total_project_count active_count=project.projectcontainer.active_project_count %}{{ active_count }} of {{ count }}{% endblocktrans %} + {% blocktranslate with count=project.projectcontainer.total_project_count active_count=project.projectcontainer.active_project_count %}{{ active_count }} of {{ count }}{% endblocktranslate %} {% translate 'projects are currently active.' %}

    diff --git a/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_moderator.de.email b/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_moderator.de.email index 67cf53ef5c..7e08ae4e8b 100644 --- a/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_moderator.de.email +++ b/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_moderator.de.email @@ -7,13 +7,18 @@ {% block sub-headline%}{{ moderatorinvite.project.name }}{% endblock %} {% block content %} +

    Sie wurden von „{{moderatorinvite.project.organisation}}“ eingeladen, das oben genannte Projekt auf der Beteiligungsplattform {{ site.name }} zu moderieren. - +

    +

    Wenn Sie die Einladung annehmen, können Sie das Projekt und alle eingereichten Beiträge bearbeiten oder löschen. Außerdem können Sie sich als Moderator*in gekennzeichnet an der Diskussion beteiligen. - +

    +

    In unserer Netiquette finden Sie unsere Diskussionsregeln. - +

    +

    Sie haben Fragen? Schreiben Sie an {{ contact_email }}. +

    {% endblock %} {% block cta_url %}{{ email.get_host }}{{ moderatorinvite.get_absolute_url }}{% endblock %} diff --git a/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_moderator.en.email b/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_moderator.en.email index 2805bdbbab..4076f53fbc 100644 --- a/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_moderator.en.email +++ b/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_moderator.en.email @@ -7,13 +7,18 @@ {% block sub-headline%}{{ moderatorinvite.project.name }}{% endblock %} {% block content %} +

    You were invited by "{{moderatorinvite.project.organisation}}" to moderate the above-mentioned project on the participation platform {{ site.name }}. - +

    +

    If you accept the invitation, you can edit or delete the project and all submitted contributions. In addition, you can participate in the discussion marked as moderator. - +

    +

    In our Netiquette you will find our discussion rules. - +

    +

    You have questions? Please write to {{ contact_email }}. +

    {% endblock %} {% block cta_url %}{{ email.get_host }}{{ moderatorinvite.get_absolute_url }}{% endblock %} diff --git a/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_participant.de.email b/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_participant.de.email index e0848dc5fa..e3d774959c 100644 --- a/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_participant.de.email +++ b/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_participant.de.email @@ -7,13 +7,18 @@ {% block sub-headline%}{{ participantinvite.project.name }}{% endblock %} {% block content %} +

    Sie wurden zur Teilnahme an einem {% if participantinvite.project.is_semipublic %}halb-öffentlichen{% else %}privaten{% endif %} Projekt auf {{ site.name }} eingeladen. {{ site.name }} ist die Beteiligungsplattform des Landes Berlin. Hier werden Sie um Ihre Meinung zu Projekten der Berliner Verwaltung gebeten. Sie wurden eingeladen von „{{ participantinvite.project.organisation }}". - +

    +

    Klicken Sie jetzt auf „Einladung annehmen", um an dem Projekt teilzunehmen. Sollten Sie noch nicht auf {{ site.name }} registriert sein, ist dies in wenigen Schritten möglich. Bitte beachten Sie: Diese Einladung ist nur für Sie persönlich bestimmt. - +

    +

    Wir freuen uns auf Ihren Beitrag! - +

    +

    Sie haben Fragen? Schreiben Sie an {{ contact_email }}. +

    {% endblock %} {% block cta_url %}{{ email.get_host }}{{ participantinvite.get_absolute_url }}{% endblock %} diff --git a/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_participant.en.email b/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_participant.en.email index 7c50fc1e04..1562eab4d0 100644 --- a/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_participant.en.email +++ b/meinberlin/apps/projects/templates/meinberlin_projects/emails/invite_participant.en.email @@ -7,13 +7,18 @@ {% block sub-headline%}{{ participantinvite.project.name }}{% endblock %} {% block content %} +

    You were invited to participate in a {% if participantinvite.project.is_semipublic %}semi-public{% else %}private{% endif %} project at {{ site.name }}. {{ site.name }} is the participation platform of the state of Berlin. Here you are asked for your opinion on projects of the Berlin administration. You were invited by "{{ participantinvite.project.organisation }}". - +

    +

    Click on "Accept invitation" to participate in the project. If you are not yet registered on {{ site.name }}, you can do so in a few steps. Please note: This invitation is only for you personally. - +

    +

    We look forward to your contribution! - +

    +

    You have questions? Please write to {{ contact_email }}. +

    {% endblock %} {% block cta_url %}{{ email.get_host }}{{ participantinvite.get_absolute_url }}{% endblock %} diff --git a/meinberlin/apps/projects/templates/meinberlin_projects/includes/project_module_tile.html b/meinberlin/apps/projects/templates/meinberlin_projects/includes/project_module_tile.html index 2f9693d019..fed7cbb454 100644 --- a/meinberlin/apps/projects/templates/meinberlin_projects/includes/project_module_tile.html +++ b/meinberlin/apps/projects/templates/meinberlin_projects/includes/project_module_tile.html @@ -9,7 +9,7 @@

    {{ module.name }}

    {% get_num_entries module as num_entries %} - {% blocktrans count num_entries=num_entries %}{{ num_entries }} Contribution{% plural %}{{ num_entries }} Contributions{% endblocktrans %} + {% blocktranslate count num_entries=num_entries %}{{ num_entries }} Contribution{% plural %}{{ num_entries }} Contributions{% endblocktranslate %} {% if module.module_running_time_left %}
    @@ -18,18 +18,18 @@

    {{ module.name }}

    - {% blocktrans with time_left=module.module_running_time_left %}remaining {{ time_left }}{% endblocktrans %} + {% blocktranslate with time_left=module.module_running_time_left %}remaining {{ time_left }}{% endblocktranslate %}
    {% elif not module.module_has_started %}
    {% html_date module.module_start 'd.m.Y' as start_date %} - {% blocktrans with date=start_date %}Participation: starts on {{ date }}{% endblocktrans %} + {% blocktranslate with date=start_date %}Participation: starts on {{ date }}{% endblocktranslate %}
    {% elif module.module_has_finished %}
    - {% blocktrans %}Participation ended. Read result{% endblocktrans %} + {% blocktranslate %}Participation ended. Read result{% endblocktranslate %}
    {% endif %}
    diff --git a/meinberlin/apps/projects/templates/meinberlin_projects/includes/project_tile.html b/meinberlin/apps/projects/templates/meinberlin_projects/includes/project_tile.html index 48617af6d0..23a087dde3 100644 --- a/meinberlin/apps/projects/templates/meinberlin_projects/includes/project_tile.html +++ b/meinberlin/apps/projects/templates/meinberlin_projects/includes/project_tile.html @@ -62,7 +62,7 @@

    {{ project.name }}

    {% if project.module_running_days_left < 365 %} - {% blocktrans with time_left=project.module_running_time_left %}{{ time_left }} remaining {% endblocktrans %} + {% blocktranslate with time_left=project.module_running_time_left %}{{ time_left }} remaining {% endblocktranslate %} {% else %} {% translate 'more than 1 year remaining' %} {% endif %} @@ -71,13 +71,13 @@

    {{ project.name }}

    {% elif project.future_modules %}
    {% html_date project.future_modules.first.module_start 'd.m.Y' as start_date %} - {% blocktrans with date=start_date %}Participation: starts on {{ date }}{% endblocktrans %} + {% blocktranslate with date=start_date %}Participation: starts on {{ date }}{% endblocktranslate %}
    {% elif project.has_finished %}
    - {% blocktrans %}Participation ended. Read result{% endblocktrans %} + {% blocktranslate %}Participation ended. Read result{% endblocktranslate %}
    {% endif %} diff --git a/meinberlin/apps/projects/templates/meinberlin_projects/includes/timeline.html b/meinberlin/apps/projects/templates/meinberlin_projects/includes/timeline.html index a941ffad41..1dd81d9a07 100644 --- a/meinberlin/apps/projects/templates/meinberlin_projects/includes/timeline.html +++ b/meinberlin/apps/projects/templates/meinberlin_projects/includes/timeline.html @@ -49,13 +49,13 @@

    {% translate 'Participation is not possible at the moment.' %} {% if not module.past_phases %} {% html_date module.future_phases.first.start_date 'DATETIME_FORMAT' as start_date %} - {% blocktrans with date=start_date %}It starts on {{ date }}.{% endblocktrans%} + {% blocktranslate with date=start_date %}It starts on {{ date }}.{% endblocktrans%} {% elif module.future_phases %} {% html_date module.future_phases.first.start_date 'DATETIME_FORMAT' as start_date %} - {% blocktrans with date=start_date %}It continues on {{ date }}.{% endblocktrans%} + {% blocktranslate with date=start_date %}It continues on {{ date }}.{% endblocktrans%} {% else %} {% html_date module.past_phases.last.end_date 'DATETIME_FORMAT' as end_date %} - {% blocktrans with date=end_date %}It ended on {{ date }}.{% endblocktrans%} + {% blocktranslate with date=end_date %}It ended on {{ date }}.{% endblocktrans%} {% endif %}

    @@ -95,7 +95,7 @@

    {% translate 'Participation is not possible at the moment.' %} {% html_date project.future_phases.first.start_date 'DATE_FORMAT' as start_date %} - {% blocktrans with date=start_date %}It starts on {{ date }}.{% endblocktrans%} + {% blocktranslate with date=start_date %}It starts on {{ date }}.{% endblocktrans%}

    {% endif %} diff --git a/meinberlin/apps/projects/templates/meinberlin_projects/moderatorinvite_detail.html b/meinberlin/apps/projects/templates/meinberlin_projects/moderatorinvite_detail.html index 1eb2db5a5a..3223e892f1 100644 --- a/meinberlin/apps/projects/templates/meinberlin_projects/moderatorinvite_detail.html +++ b/meinberlin/apps/projects/templates/meinberlin_projects/moderatorinvite_detail.html @@ -1,11 +1,11 @@ {% extends "base.html" %} {% load i18n %} -{% block title %}{% blocktrans with project=moderatorinvite.project.name %}Invitation to {{ project }}{% endblocktrans %}{% endblock %} +{% block title %}{% blocktranslate with project=moderatorinvite.project.name %}Invitation to {{ project }}{% endblocktranslate %}{% endblock %} {% block content %}
    -

    {% blocktrans with project=moderatorinvite.project.name %}Moderation invitation for {{ project }}{% endblocktrans %}

    +

    {% blocktranslate with project=moderatorinvite.project.name %}Moderation invitation for {{ project }}{% endblocktranslate %}

    {% if form.non_field_errors %}