How to translate value from vocabulary in folder views

What is the 'correct' way of translating values from the vocabulary in folder views, without 'waking up the object'.

If I have a 'folder-contents' view that shows 'category' and I want to show it 'translated'

  1. Now the vocabulary is defined in the content type, not in ZCML (does this matter ?) I use KeywordIndex

  2. I list the items, and use for each


  3. I add the values (the options of my_category) to the po files

This works, but it means that I add "some_value" to the po file (not the title "Some Value")

Although this is not a big problem, it means I can not generate the po files automatic with infrae.i18nextract (and it does not feel like the right way to do it).

Does anyone have some code I can look at?

I don't understand what are you asking but I can tell you 2 things:

how can I do foo "without waking up the object"…

this is an ancient myth, a survivor of times when servers had very few memory and Plone was using DateTime < 3.0; this is just no longer true and you have no reason to worry about it: wake up all the objects you can at warm up, visitors of your site will appreciate that.

I can not generate the po files automatic with infrae.i18nextract…

I have no idea what this package does, but is pretty old, unmaintained and is not the canonical way to translate anything in the Plone world; just use i18ndude as everybody else.

It generates po(t) files from templates, vobabularies etc

Had no idea that i18ndude did the same (I have been using it for this, probably by old habit)

UPDATE: While googling for this, the docs still suggests this approach (so maybe the docs needs some updating: )