I am using Workflow to manage content publication (with Workflow Field). Everything works fine except when I try to translate workflow states names.
The default language is set to French. An English translation is available for users.
I have created workflow states from the French interface and named them in French (example : "Brouillon" for draft). Then, using the translation interface (Configuration>Regional and language>Translate interface), I search for my state names and successfully find them. Unfortunately, the states names are considered non translated in French (fr) and the original text is the name in French... (see screenshot)
So I guess Workflow does not consider French to be the default language and thus English translation is unavailable?
Finally, a really weird thing : I have tried to enter english state names and then search them for French translation, but in that way, I could not find my state names at all.
Thanks for any idea to fix this issue (or misunderstanding).
Toki
Comment | File | Size | Author |
---|---|---|---|
#8 | workflow-i18n_states_names_translation-2682757-8.patch | 1.69 KB | Zekvyrin |
#3 | workflow-state-translation-3.png | 49.83 KB | Toki |
workflow-state-translation-2.png | 50.84 KB | Toki |
Comments
Comment #2
johnvWorkflow doesnt do anything special with translations.
My websites are in Dutch, and when i install the english version and add dutch translation.
I guess the question is: what is the base language of your site? I guess this is English. So you should name the state Draft, then translate to Brouillon.
Comment #3
TokiThanks for your quick answer. As mentioned above, the default language is set to French (see screenshot). I have translated most of the website without problem (except workflow state names and fieldgroup labels!). That is the reason why I posted here since it seems really strange to me... Surely I am missing something. Thanks anyway for your time.
Comment #4
johnvOk. I need to check this some other time.
Comment #5
TokiOK, thank you. If I have any new development on this issue, I will let you know, of course.
Comment #6
TokiI got another issue with translation, sorry for that...
I had translated my workflow field "Status" and especially the help text (through Translate tab, in Field settings). Everything seemed OK.
But when I tried to edit/create a content from the English interface, the workflow field label is in english (OK), the state names are in French (like mentioned above) but the help text is also in French, unfortunately.
For information, I am using core modules, i18n and Entity translation to handle languages in my Drupal site. For this specific content with workflow field, I only need translation for the interface, not the content.
Thanks for any idea on this bug.
EDIT : this description problem is not related to Workflow, I found a patch here, it was a problem between Token and i18n. The patch works totally fine and the description translated is back.
Comment #7
Zekvyrin CreditAttribution: Zekvyrin commentedI'm not perfectly sure if this is the right place to add it.. but I've made a patch which added a "Default Translated" formatter to Workflow Field using i18n's functionality.
Basically I did it the same way i18n does it for list fields.
(i18n_field should be enabled for this be do something, but it's not required for the rest of the module)
Comment #8
Zekvyrin CreditAttribution: Zekvyrin commentedI've changed the method of translating.. I think this is a better approach as it's closer to original code.
Comment #9
johnvComment #11
johnvThanks Zevkyrin, I added yout patch as-is, didn't test it myself.
This may be necessary for D8, but let's wait for another issue.