Fix translation of AnnouncementForm

Form translation things must use lazy_gettext aka _l
This commit is contained in:
Kim Alvefur
2024-01-04 09:50:51 +01:00
parent ebf142b505
commit dbec07d149

View File

@@ -733,21 +733,21 @@ def get_system_stats() -> typing.MutableMapping[
class AnnouncementForm(BaseForm): class AnnouncementForm(BaseForm):
text = wtforms.StringField( text = wtforms.StringField(
_("Message contents"), _l("Message contents"),
widget=wtforms.widgets.TextArea(), widget=wtforms.widgets.TextArea(),
validators=[wtforms.validators.DataRequired()], validators=[wtforms.validators.DataRequired()],
) )
online_only = wtforms.BooleanField( online_only = wtforms.BooleanField(
_("Only send to online users"), _l("Only send to online users"),
) )
action_post_all = wtforms.SubmitField( action_post_all = wtforms.SubmitField(
_("Post to all users"), _l("Post to all users"),
) )
action_send_preview = wtforms.SubmitField( action_send_preview = wtforms.SubmitField(
_("Send preview to yourself"), _l("Send preview to yourself"),
) )