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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Toki created an issue. See original summary.

johnv’s picture

Workflow 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.

Toki’s picture

Thanks 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.

johnv’s picture

Ok. I need to check this some other time.

Toki’s picture

OK, thank you. If I have any new development on this issue, I will let you know, of course.

Toki’s picture

I 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.

Zekvyrin’s picture

Version: 7.x-2.8 » 7.x-2.x-dev
Status: Active » Needs review
FileSize
1.89 KB

I'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)

Zekvyrin’s picture

I've changed the method of translating.. I think this is a better approach as it's closer to original code.

johnv’s picture

Title: Workflow states names translation » Translate Workflow states names using i18n
Component: Miscellaneous » User interface
Category: Support request » Feature request

  • johnv committed 75726f4 on 7.x-2.x authored by Zekvyrin
    Issue #2682757 by Zekvyrin: Translate Workflow states names using i18n
    
johnv’s picture

Version: 7.x-2.x-dev » 7.x-2.10
Status: Needs review » Fixed

Thanks 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.