Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
It is currently not possible to provide different translations for the workflow state "Archive" (noun) and the workflow transition "Archive" (verb). In English, they are the same but not in other languages.
I think core doesn't really expose the transition label anyway at the moment, but https://www.drupal.org/project/issues/moderation_sidebar for example does.
Proposed resolution
Add a translation context so they can be translated separately:
Example:
# PHP Date format string that is translatable.
date_format:
type: string
label: 'Date format'
translatable: true
translation context: 'PHP date format'
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#5 | add_translation_context_worflow_schema-3037906-5.patch | 715 bytes | vadim.hirbu |
Comments
Comment #2
Gábor HojtsyMakes a lot of sense :)
Comment #4
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedAdding the novice tag to this.
The schema file in question is located in
./core/modules/workflows/config/schema/workflows.schema.yml
. The task is:workflows.state.mapping
, underneathlabel
calledtranslation context
and assign it to a string "Workflow state label".workflows.transition.mapping
, underneathlabel
calledtranslation context
and assign it to a string "Workflow transition label".Comment #5
vadim.hirbu CreditAttribution: vadim.hirbu at FFW commentedAdd translation context for worflow state and workflow transition.
Comment #6
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedLooks great, thanks!
Comment #8
larowlanCommitted 2358d61 and pushed to 8.8.x. Thanks!