0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Change translatable strings in Workflow models to be non-page specific

This commit is contained in:
Sage Abdullah 2022-12-13 16:31:39 +00:00
parent e1c6ae2d2b
commit 9738b76c65
No known key found for this signature in database
GPG Key ID: EB1A33CC51CC0217
2 changed files with 8 additions and 7 deletions

View File

@ -139,7 +139,7 @@ class Migration(migrations.Migration):
"active",
models.BooleanField(
default=True,
help_text="Active workflows can be added to pages. Deactivating a workflow does not remove it from existing pages.",
help_text="Active workflows can be added to pages/snippets. Deactivating a workflow does not remove it from existing pages/snippets.",
verbose_name="active",
),
),
@ -339,7 +339,7 @@ class Migration(migrations.Migration):
model_name="groupapprovaltask",
name="groups",
field=models.ManyToManyField(
help_text="Pages at this step in a workflow will be moderated or approved by these groups of users",
help_text="Pages/snippets at this step in a workflow will be moderated or approved by these groups of users",
to="auth.Group",
verbose_name="groups",
),

View File

@ -3690,7 +3690,7 @@ class Workflow(ClusterableModel):
verbose_name=_("active"),
default=True,
help_text=_(
"Active workflows can be added to pages. Deactivating a workflow does not remove it from existing pages."
"Active workflows can be added to pages/snippets. Deactivating a workflow does not remove it from existing pages/snippets."
),
)
objects = WorkflowManager()
@ -3779,7 +3779,7 @@ class GroupApprovalTask(Task):
Group,
verbose_name=_("groups"),
help_text=_(
"Pages at this step in a workflow will be moderated or approved by these groups of users"
"Pages/snippets at this step in a workflow will be moderated or approved by these groups of users"
),
)
@ -3940,7 +3940,7 @@ class WorkflowState(models.Model):
):
raise ValidationError(
_(
"There may only be one in progress or needs changes workflow state per page."
"There may only be one in progress or needs changes workflow state per page/snippet."
)
)
@ -3950,10 +3950,11 @@ class WorkflowState(models.Model):
def __str__(self):
return _(
"Workflow '%(workflow_name)s' on Page '%(page_title)s': %(status)s"
"Workflow '%(workflow_name)s' on %(model_name)s '%(title)s': %(status)s"
) % {
"workflow_name": self.workflow,
"page_title": self.content_object,
"model_name": self.content_object._meta.verbose_name,
"title": self.content_object,
"status": self.status,
}