Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions hypha/apply/activity/adapters/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ def get_subject(self, message_type, source):
else:
try:
subject = source.page.specific.subject or _(
"Your application to {org_long_name}: {source.title_text_display}"
).format(org_long_name=settings.ORG_LONG_NAME, source=source)
"Your application to {ORG_LONG_NAME}: {source.title_text_display}"
).format(ORG_LONG_NAME=settings.ORG_LONG_NAME, source=source)
except AttributeError:
subject = _("Your {org_long_name} Project: {source.title}").format(
org_long_name=settings.ORG_LONG_NAME, source=source
subject = _("Your {ORG_LONG_NAME} Project: {source.title}").format(
ORG_LONG_NAME=settings.ORG_LONG_NAME, source=source
)
return subject

Expand Down
4 changes: 2 additions & 2 deletions hypha/apply/activity/templates/messages/email/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
{% block more_info %}{% endblock %}

{# fmt:off #}{% blocktrans %}Kind Regards,
The {{ org_short_name }} Team{% endblocktrans %}
The {{ ORG_SHORT_NAME }} Team{% endblocktrans %}

--
{{ org_long_name }}
{{ ORG_LONG_NAME }}
{% if ORG_URL %}{{ ORG_URL }}{% endif %}
{% block post_signature_content %}{% endblock %}{# fmt:on #}
8 changes: 4 additions & 4 deletions hypha/apply/funds/workflows/definitions/double_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"invited_to_proposal": _("Invite to Proposal"),
},
"display": _("Internal Review"),
"public": _("{org_short_name} Review").format(
org_short_name=settings.ORG_SHORT_NAME
"public": _("{ORG_SHORT_NAME} Review").format(
ORG_SHORT_NAME=settings.ORG_SHORT_NAME
),
"stage": Concept,
"permissions": default_permissions,
Expand Down Expand Up @@ -209,8 +209,8 @@
"proposal_discussion": _("Proposal Received (revert)"),
},
"display": _("Internal Review"),
"public": _("{org_short_name} Review").format(
org_short_name=settings.ORG_SHORT_NAME
"public": _("{ORG_SHORT_NAME} Review").format(
ORG_SHORT_NAME=settings.ORG_SHORT_NAME
),
"stage": Proposal,
"permissions": default_permissions,
Expand Down
4 changes: 2 additions & 2 deletions hypha/apply/funds/workflows/definitions/single_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
INITIAL_STATE: _("Need screening (revert)"),
},
"display": _("Internal Review"),
"public": _("{org_short_name} Review").format(
org_short_name=settings.ORG_SHORT_NAME
"public": _("{ORG_SHORT_NAME} Review").format(
ORG_SHORT_NAME=settings.ORG_SHORT_NAME
),
"stage": Request,
"permissions": default_permissions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
"com_rejected": _("Dismiss"),
},
"display": _("Internal Review"),
"public": _("{org_short_name} Review").format(
org_short_name=settings.ORG_SHORT_NAME
"public": _("{ORG_SHORT_NAME} Review").format(
ORG_SHORT_NAME=settings.ORG_SHORT_NAME
),
"stage": RequestCom,
"permissions": default_permissions,
Expand All @@ -94,8 +94,8 @@
"com_rejected": _("Dismiss"),
},
"display": _("Community Review"),
"public": _("{org_short_name} Review").format(
org_short_name=settings.ORG_SHORT_NAME
"public": _("{ORG_SHORT_NAME} Review").format(
ORG_SHORT_NAME=settings.ORG_SHORT_NAME
),
"stage": RequestCom,
"permissions": community_review_permissions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
INITIAL_STATE: _("Need screening (revert)"),
},
"display": _("Internal Review"),
"public": _("{org_short_name} Review").format(
org_short_name=settings.ORG_SHORT_NAME
"public": _("{ORG_SHORT_NAME} Review").format(
ORG_SHORT_NAME=settings.ORG_SHORT_NAME
),
"stage": RequestExt,
"permissions": default_permissions,
Expand Down
4 changes: 2 additions & 2 deletions hypha/apply/funds/workflows/definitions/single_stage_same.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
INITIAL_STATE: _("Need screening (revert)"),
},
"display": _("Review"),
"public": _("{org_short_name} Review").format(
org_short_name=settings.ORG_SHORT_NAME
"public": _("{ORG_SHORT_NAME} Review").format(
ORG_SHORT_NAME=settings.ORG_SHORT_NAME
),
"stage": RequestSame,
"permissions": reviewer_review_permissions,
Expand Down
20 changes: 10 additions & 10 deletions hypha/apply/projects/templatetags/project_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ def user_next_step_on_project(project, user, request=None):
return {
"heading": _("Waiting for"),
"text": _(
"Awaiting project documents to be created and approved by {org_short_name} internally. "
"Awaiting project documents to be created and approved by {ORG_SHORT_NAME} internally. "
"Please check back when the project has moved to contracting stage."
).format(org_short_name=settings.ORG_SHORT_NAME),
).format(ORG_SHORT_NAME=settings.ORG_SHORT_NAME),
}
if project.paf_approvals.exists():
return {
Expand All @@ -141,9 +141,9 @@ def user_next_step_on_project(project, user, request=None):
return {
"heading": _("Waiting for"),
"text": _(
"Awaiting project documents to be created and approved by {org_short_name} internally. "
"Awaiting project documents to be created and approved by {ORG_SHORT_NAME} internally. "
"Please check back when the project has moved to contracting stage."
).format(org_short_name=settings.ORG_SHORT_NAME),
).format(ORG_SHORT_NAME=settings.ORG_SHORT_NAME),
}

if request:
Expand Down Expand Up @@ -216,8 +216,8 @@ def user_next_step_on_project(project, user, request=None):
if user.is_applicant:
return {
"heading": _("Waiting for"),
"text": _("Awaiting signed contract from {org_short_name}").format(
org_short_name=settings.ORG_SHORT_NAME
"text": _("Awaiting signed contract from {ORG_SHORT_NAME}").format(
ORG_SHORT_NAME=settings.ORG_SHORT_NAME
),
}
if settings.STAFF_UPLOAD_CONTRACT:
Expand Down Expand Up @@ -265,8 +265,8 @@ def user_next_step_on_project(project, user, request=None):
return {
"heading": _("Waiting for"),
"text": _(
"Awaiting contract approval from {org_short_name}"
).format(org_short_name=settings.ORG_SHORT_NAME),
"Awaiting contract approval from {ORG_SHORT_NAME}"
).format(ORG_SHORT_NAME=settings.ORG_SHORT_NAME),
}
return {
"heading": _("Waiting for"),
Expand Down Expand Up @@ -300,8 +300,8 @@ def user_next_step_instructions(project, user):
if contract and not contract.signed_by_applicant:
return [
_(
"Please download the signed contract uploaded by {org_short_name}"
).format(org_short_name=settings.ORG_SHORT_NAME),
"Please download the signed contract uploaded by {ORG_SHORT_NAME}"
).format(ORG_SHORT_NAME=settings.ORG_SHORT_NAME),
_("Countersign"),
_("Upload it back"),
_(
Expand Down
12 changes: 6 additions & 6 deletions hypha/apply/users/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ def _get_url_params(self) -> None | str:

def get_email_context(self) -> dict:
return {
"org_long_name": settings.ORG_LONG_NAME,
"org_email": settings.ORG_EMAIL,
"org_short_name": settings.ORG_SHORT_NAME,
"ORG_LONG_NAME": settings.ORG_LONG_NAME,
"ORG_EMAIL": settings.ORG_EMAIL,
"ORG_SHORT_NAME": settings.ORG_SHORT_NAME,
"site": self.site,
}

def send_email_no_account_found(self, to):
context = self.get_email_context()
subject = "Log in attempt at {org_long_name}".format(**context)
subject = "Log in attempt at {ORG_LONG_NAME}".format(**context)
# Force subject to a single line to avoid header-injection issues.
subject = "".join(subject.splitlines())

Expand Down Expand Up @@ -130,7 +130,7 @@ def send_login_email(self, user):
}
)

subject = "Log in to {username} at {org_long_name}".format(**context)
subject = "Log in to {username} at {ORG_LONG_NAME}".format(**context)
# Force subject to a single line to avoid header-injection issues.
subject = "".join(subject.splitlines())

Expand All @@ -154,7 +154,7 @@ def send_new_account_login_email(self, signup_obj):
}
)

subject = "Welcome to {org_long_name}".format(**context)
subject = "Welcome to {ORG_LONG_NAME}".format(**context)
# Force subject to a single line to avoid header-injection issues.
subject = "".join(subject.splitlines())

Expand Down
6 changes: 3 additions & 3 deletions hypha/apply/users/templates/users/activation/email.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load i18n wagtailadmin_tags %}{% base_url_setting as base_url %}{% firstof name username as user %}
{% blocktrans %}Dear {{ user }},{% endblocktrans %}

{% blocktrans %}Activate your account on the {{ org_long_name }} web site by clicking this link or copying and pasting it to your browser:{% endblocktrans %}
{% blocktrans %}Activate your account on the {{ ORG_LONG_NAME }} web site by clicking this link or copying and pasting it to your browser:{% endblocktrans %}

{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}{{ activation_path }}

Expand All @@ -15,8 +15,8 @@
{% blocktrans %}If you do not complete the activation process within {{ timeout_days }} days you can use the password reset form at{% endblocktrans %}: {% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}{% url 'users:password_reset' %}

{% blocktrans %}Kind Regards,
The {{ org_short_name }} Team{% endblocktrans %}
The {{ ORG_SHORT_NAME }} Team{% endblocktrans %}

--
{{ org_long_name }}
{{ ORG_LONG_NAME }}
{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% load i18n %}{% autoescape off %}
{% blocktranslate %}Account details for {{ username }} at {{ org_long_name }}{% endblocktranslate %}
{% blocktranslate %}Account details for {{ username }} at {{ ORG_LONG_NAME }}{% endblocktranslate %}
{% endautoescape %}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% load i18n wagtailadmin_tags %}{% base_url_setting as base_url %}{% firstof name username as user %}
{% blocktrans %}Dear {{ user }},{% endblocktrans %}

{% blocktrans %}Request to change email of your account on the {{ org_long_name }} web site has been accepted. Confirm your email by clicking this link or copying and pasting it to your browser:{% endblocktrans %}
{% blocktrans %}Request to change email of your account on the {{ ORG_LONG_NAME }} web site has been accepted. Confirm your email by clicking this link or copying and pasting it to your browser:{% endblocktrans %}

{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}{{ activation_path }}

{% blocktrans %}This link will only remain active for {{ timeout_days }} days and will lead you to profile page after verification.{% endblocktrans %}

{% blocktrans %}Kind Regards,
The {{ org_short_name }} Team{% endblocktrans %}
The {{ ORG_SHORT_NAME }} Team{% endblocktrans %}

--
{{ org_long_name }}
{{ ORG_LONG_NAME }}
{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% load i18n wagtailadmin_tags %}{% base_url_setting as base_url %}{% firstof name username as user %}
{% blocktrans %}Dear {{ user }},{% endblocktrans %}

{% blocktrans %}There has been an attempt to change email of your account on the {{ org_long_name }} web site. If this action wasn't made by you, please contact support at {{ org_email }} {% endblocktrans %}
{% blocktrans %}There has been an attempt to change email of your account on the {{ ORG_LONG_NAME }} web site. If this action wasn't made by you, please contact support at {{ ORG_EMAIL }} {% endblocktrans %}


{# fmt:off #}{% blocktrans %}Kind Regards,
The {{ org_short_name }} Team{% endblocktrans %}
The {{ ORG_SHORT_NAME }} Team{% endblocktrans %}

--
{{ org_long_name }}
{{ ORG_LONG_NAME }}
{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}{# fmt:on #}
10 changes: 5 additions & 5 deletions hypha/apply/users/templates/users/emails/confirm_access.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{% load i18n wagtailadmin_tags %}{% base_url_setting as base_url %}
{% blocktrans %}Dear {{ user }},{% endblocktrans %}

{% blocktrans %}To confirm access at {{ org_long_name }} use the code below (valid for {{ timeout_minutes }} minutes):{% endblocktrans %}
{% blocktrans %}To confirm access at {{ ORG_LONG_NAME }} use the code below (valid for {{ timeout_minutes }} minutes):{% endblocktrans %}

{{ token }}

{% blocktrans %}If you did not request this email, please ignore it.{% endblocktrans %}

{% if org_email %}
{% blocktrans %}If you have any questions, please contact us at {{ org_email }}.{% endblocktrans %}
{% if ORG_EMAIL %}
{% blocktrans %}If you have any questions, please contact us at {{ ORG_EMAIL }}.{% endblocktrans %}
{% endif %}

{% blocktrans %}Kind Regards,
The {{ org_short_name }} Team{% endblocktrans %}
The {{ ORG_SHORT_NAME }} Team{% endblocktrans %}

--
{{ org_long_name }}
{{ ORG_LONG_NAME }}
{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
{% blocktrans %}Dear {{ user }},{% endblocktrans %}

{% if is_active %}
{% blocktrans %}Login to your account on the {{ org_long_name }} web site by clicking this link or copying and pasting it to your browser:{% endblocktrans %}
{% blocktrans %}Login to your account on the {{ ORG_LONG_NAME }} web site by clicking this link or copying and pasting it to your browser:{% endblocktrans %}

{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}{{ login_path }}

{% blocktrans %}This link will valid for {{ timeout_minutes }} minutes and can be used only once.{% endblocktrans %}

{% else %}
{% blocktrans %}Your account on the {{ org_long_name }} web site is deactivated. Please contact site administrators.{% endblocktrans %}
{% blocktrans %}Your account on the {{ ORG_LONG_NAME }} web site is deactivated. Please contact site administrators.{% endblocktrans %}
{% endif %}

{% blocktrans %}If you did not request this email, please ignore it.{% endblocktrans %}

{% if org_email %}
{% blocktrans %}If you have any questions, please contact us at {{ org_email }}.{% endblocktrans %}
{% if ORG_EMAIL %}
{% blocktrans %}If you have any questions, please contact us at {{ ORG_EMAIL }}.{% endblocktrans %}
{% endif %}

{% blocktrans %}Kind Regards,
The {{ org_short_name }} Team{% endblocktrans %}
The {{ ORG_SHORT_NAME }} Team{% endblocktrans %}

--
{{ org_long_name }}
{{ ORG_LONG_NAME }}
{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

{% blocktrans %}Dear,{% endblocktrans %}

{% blocktrans %}It looks like you are trying to login on {{ org_long_name }} web site, but we could not find any account with the email provided.{% endblocktrans %}
{% blocktrans %}It looks like you are trying to login on {{ ORG_LONG_NAME }} web site, but we could not find any account with the email provided.{% endblocktrans %}

{% if org_email %}
{% blocktrans %}If you have any questions, please contact us at {{ org_email }}.{% endblocktrans %}
{% if ORG_EMAIL %}
{% blocktrans %}If you have any questions, please contact us at {{ ORG_EMAIL }}.{% endblocktrans %}
{% endif %}

{% blocktrans %}Kind Regards,
The {{ org_short_name }} Team{% endblocktrans %}
The {{ ORG_SHORT_NAME }} Team{% endblocktrans %}

--
{{ org_long_name }}
{{ ORG_LONG_NAME }}
{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{% load i18n wagtailadmin_tags %}{% base_url_setting as base_url %}
{% blocktrans %}Dear,{% endblocktrans %}

{% blocktrans %}Welcome to {{ org_long_name }} web site. Create your account by clicking this link or copying and pasting it to your browser:{% endblocktrans %}
{% blocktrans %}Welcome to {{ ORG_LONG_NAME }} web site. Create your account by clicking this link or copying and pasting it to your browser:{% endblocktrans %}

{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}{{ signup_path }}

{% blocktrans %}This link will valid for {{ timeout_minutes }} minutes and can be used only once.{% endblocktrans %}

{% blocktrans %}If you did not request this email, please ignore it.{% endblocktrans %}

{% if org_email %}
{% blocktrans %}If you have any questions, please contact us at {{ org_email }}.{% endblocktrans %}
{% if ORG_EMAIL %}
{% blocktrans %}If you have any questions, please contact us at {{ ORG_EMAIL }}.{% endblocktrans %}
{% endif %}

{% blocktrans %}Kind Regards,
The {{ org_short_name }} Team{% endblocktrans %}
The {{ ORG_SHORT_NAME }} Team{% endblocktrans %}

--
{{ org_long_name }}
{{ ORG_LONG_NAME }}
{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}
6 changes: 3 additions & 3 deletions hypha/apply/users/templates/users/emails/set_password.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% load i18n wagtailadmin_tags %}{% base_url_setting as base_url %}{% firstof name username as user %}
{% blocktrans %}Dear {{ user }},{% endblocktrans %}

{% blocktrans %}Set your account password on the {{ org_long_name }} web site by clicking this link or copying and pasting it to your browser:{% endblocktrans %}
{% blocktrans %}Set your account password on the {{ ORG_LONG_NAME }} web site by clicking this link or copying and pasting it to your browser:{% endblocktrans %}

{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}{{ activation_path }}

{% blocktrans %}This link can be used only once and will lead you to a page where you can set your password. It will remain active for {{ timeout_days }} days, so please set your password as soon as possible.{% endblocktrans %}

{% blocktrans %}Kind Regards,
The {{ org_short_name }} Team{% endblocktrans %}
The {{ ORG_SHORT_NAME }} Team{% endblocktrans %}

--
{{ org_long_name }}
{{ ORG_LONG_NAME }}
{% if site %}{{ site.root_url }}{% else %}{{ base_url }}{% endif %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% load i18n %}{% autoescape off %}
{% blocktranslate %}Set password for {{ username }} at {{ org_long_name }}{% endblocktranslate %}
{% blocktranslate %}Set password for {{ username }} at {{ ORG_LONG_NAME }}{% endblocktranslate %}
{% endautoescape %}
Loading
Loading