Hi,

I've created a new view and used a "State: Current state name" field. Unfortunately listed states names aren't translated (as they are all translated properly on admin/build/workflow). Does the field support internationalization?

Thanks!

Comments

gdud’s picture

StatusFileSize
new1.47 KB

The problem is in implementation of hook_views_data() for workflow module. Field 'state' uses standard views_handler_field from views module. It renders value as it is in the database. I attached the patch that creates new very simple handler for state field (workflow_handler_field_state). This handler translates state name using t() function before render.

Works good for me.

adr_p’s picture

Thanks, works perfectly.

christiaan_’s picture

+1 for patch #1 - Thank you very much

liquidcms’s picture

Version: 6.x-1.4 » 7.x-1.2

still broken in D7

nancydru’s picture

Status: Active » Needs review

Thanks. We don't use // $Id$ any more.

nancydru’s picture

Component: User interface » Views
liquidcms’s picture

Priority: Minor » Normal

i changed this from minor to normal - likely should be major as it makes this module unusable for any multilingual site using views (which would seem like a big deal)

liquidcms’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
StatusFileSize
new2.52 KB

attached patch fixes this for D7 against latest -dev

perohu’s picture

Thanks for the patch!
I've patched the stable release by hand, it's working great

johnv’s picture

Status: Needs review » Reviewed & tested by the community

I'll commit this soon.

johnv’s picture

Status: Reviewed & tested by the community » Needs work

I cannot get this working with latest -dev version. Can you create a new patch?
- patches need to be created from the (root) workflow direcotry, not from workflow_field directory.
- it contains trailing spaces.
- a line in workflow_field_info line is superflouos. I suppose you have patched against your own fork.
- "error: while searching for: 'title' => t('Current state name'), etc. "

liquidcms’s picture

Status: Needs work » Needs review
StatusFileSize
new2.4 KB

sorry, yes, wasn't against latest -dev.. this version is. other comments:

first patch as well as this one:
- both are against correct workflow directory
- not sure about trailing spaces or CRs - i used tortoisesvn to create patch and tsvn correctly applied the patch as well as simply the patch command: patch --binary -p0 < [the patch file]
- i removed the superfluous line
- don't know what your last comment is about re: "error: while searching..." is this an issue with the patch itself or are you saying my changes do not work?

johnv’s picture

Thanks for the new patch. The last line was the actual error I stumbled upon. I could live with the other issues I mentioned.

johnv’s picture

Status: Needs review » Fixed

Still could not apply your patch, so added it manually here.
Please verify the latest -dev.

Status: Fixed » Closed (fixed)

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