Some views like "Commons Radioactivity - Active content in a group (Content)" retrieve the content-type to display a small widget in front of the title.

The widget is displayed using css-class f.e.
.type-Post
but with translated content types it results in
.type-Beitrag
Two changes solve the issue
- Enable "Output machine name (Display field as the content type machine name.)" when retrieving content type in the view
- adapt the css file to new class names fe. change .type-Post to .type-post
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | translated-content-types.png | 195.32 KB | devin carlson |
| #2 | use-content-type-machine-names-2049201-2.patch | 1.72 KB | devin carlson |
| Clipboard06.jpg | 7.61 KB | slowflyer |
Comments
Comment #1
ezra-g commentedAdding to the 3.4 radar for triage.
Comment #2
devin carlson commentedI was able to duplicate and solve this using the instructions in the original post (thanks!).
A patch to use the machine name of the content type in the view and update function to revert it.
Searching through the common_* modules and origin theme, I didn't find any CSS that needed adapting; all of the selectors were already targeting the type-* classes.
Comment #3
slowflyer commentedSeems that css has changed with 3.3
The widget is now used with:
.row-type-event:before {
background: url("../images/icons-s0eb3728c55.png") no-repeat scroll 0 -821px transparent;
display: inline-block;
height: 12px;
margin-right: 3px;
position: relative;
top: 1px;
width: 12px;
}
instead of
.type-Event or .type-event it was used before.
Therefore 3.3 works with no changes.
Comment #4
devin carlson commentedRetested and committed #2 to Commons 7.x-3.x.
http://drupalcode.org/project/commons.git/commit/dd438d5
No additional CSS changes are necessary per #3.
Comment #5
devin carlson commentedMarked #2012486: Views classes in multilingual site (i18n) as a duplicate.