Hi,

I am using an exposed filter to select rows that are of a type only. I have translated the node type names, using the Translation Interface, and I can see these translations working elsewhere.

Though, the content type names in the exposed filter are not translated.

Files: 
CommentFileSizeAuthor
#3 i18nviews-translate_node_type.patch3.72 KBFrando

Comments

different issue but it can be related: content-type names are only translated in the admin pages, impossible to print it in a view or a node...

Seems to work (using latest git version + views 3.x-dev + i18n 1.x-dev + variable 2.x-dev)

Status:Active» Needs review
StatusFileSize
new3.72 KB

This is indeed not possible at the moment: In views, the node type labels in exposed forms and as a field are translated with t(). This is bad, because node type labels are user defined strings and therefore need special handling and not just t().

The attached patch fixes this.

It copies the node type field and filter handlers over to i18nview and properly translates the node type label there. The new handlers are registered in place of the default handlers, so it works without changing the concerned views (caches have to cleared, of course).

Status:Needs review» Reviewed & tested by the community

This is really looking fine in terms of views code!

Even I haven't tried the code, but that is RTBC, when you don't consider the 100% strict core documentation/code style requirements.