Skip to content
Snippets Groups Projects
Commit cdd44b36 authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

More consistent locale strings

parent 88536c84
No related branches found
No related tags found
No related merge requests found
...@@ -10,10 +10,10 @@ __version__ = "1.1.0" ...@@ -10,10 +10,10 @@ __version__ = "1.1.0"
class PluginApp(PluginConfig): class PluginApp(PluginConfig):
name = "pretix_matrix_inviter" name = "pretix_matrix_inviter"
verbose_name = "Matrix Inviter" verbose_name = "Matrix inviter"
class PretixPluginMeta: class PretixPluginMeta:
name = gettext_lazy("Matrix Inviter") name = gettext_lazy("Matrix inviter")
author = "Felix Schäfer" author = "Felix Schäfer"
description = gettext_lazy( description = gettext_lazy(
"Ask participants for their Matrix ID and invite them to a Matrix Room or Space." "Ask participants for their Matrix ID and invite them to a Matrix Room or Space."
......
...@@ -20,10 +20,10 @@ class MatrixInviterForm(SettingsForm): ...@@ -20,10 +20,10 @@ class MatrixInviterForm(SettingsForm):
help_text=_("These products will ask for a Matrix ID."), help_text=_("These products will ask for a Matrix ID."),
) )
matrix_inviter_authorization_token = CharField( matrix_inviter_authorization_token = CharField(
label=_("Authorization token"), label=_("Access token"),
strip=True, strip=True,
help_text=_( help_text=_(
"This should be the authorization token of a user that can invite attendees to the target Room or Space. " "This should be the access token of a user that can invite attendees to the target Room or Space. "
"Please note that other administrators of this event will be able to see this token, it should not be from " "Please note that other administrators of this event will be able to see this token, it should not be from "
"your own Matrix account but from a dedicated Matrix account." "your own Matrix account but from a dedicated Matrix account."
), ),
...@@ -31,14 +31,14 @@ class MatrixInviterForm(SettingsForm): ...@@ -31,14 +31,14 @@ class MatrixInviterForm(SettingsForm):
matrix_inviter_matrix_server = CharField( matrix_inviter_matrix_server = CharField(
label=_("Matrix server"), label=_("Matrix server"),
strip=True, strip=True,
help_text=_("The matrix server the above authorization token is valid for."), help_text=_("The matrix server the above access token is valid for."),
) )
matrix_inviter_hint = I18nFormField( matrix_inviter_hint = I18nFormField(
widget=I18nTextInput, widget=I18nTextInput,
label=_("Matrix ID field help text"), label=_("Matrix ID field help text"),
required=True, required=True,
help_text=_( help_text=_(
"This will be shown as help text on the Matrix ID field. It is recommended to inform your attendees to " "This will be shown as help text on the Matrix ID field. It is recommended to inform your attendees "
"which room they will be invited to and what that room will be used for." "which room they will be invited to and what that room will be used for."
), ),
) )
...@@ -63,13 +63,15 @@ class MatrixInviterForm(SettingsForm): ...@@ -63,13 +63,15 @@ class MatrixInviterForm(SettingsForm):
room_info = matrix_room_info_for_event(self.obj) room_info = matrix_room_info_for_event(self.obj)
if self.obj.settings.matrix_inviter_matrix_room.startswith("!"): if self.obj.settings.matrix_inviter_matrix_room.startswith("!"):
if room_info["canonical_alias"]: if room_info["canonical_alias"]:
room_help_text = _('"{name}" (<code>{canonical_alias}</code>)') room_help_text = _(
'"{name}" (main address: <code>{canonical_alias}</code>)'
)
else: else:
room_help_text = _('"{name}"') room_help_text = _('"{name}"')
else: else:
if room_info["canonical_alias"]: if room_info["canonical_alias"]:
room_help_text = _( room_help_text = _(
'"{name}" (<code>{room_id}</code>, main alias: <code>{canonical_alias}</code>)' '"{name}" (<code>{room_id}</code>, main address: <code>{canonical_alias}</code>)'
) )
else: else:
room_help_text = _('"{name}" (<code>{room_id}</code>)') room_help_text = _('"{name}" (<code>{room_id}</code>)')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment