For both i18nviews and i18n_panels, TMGMT breaks when trying to create a new translation Job. Even using the API that fails too.
If you try to do something like:
$job->addItem('i18n_string', 'views', $view_name);
The code will crash... this is due that the i18nviews class needs the full views object when using i18n_object() function. A similar case happens when dealing with pane / display configurations with i18n_panels.
This is a small snipet for views and I will add a patch.
$view = views_get_view('<view-name-here>');
$key = i18n_object_key('views', $view);
$full_tmgmt_id = implode(':', array('i18n_string', 'views', $key));
$job->addItem('i18n_string', 'views', $full_tmgmt_id);
Comments
Comment #2
gdrupal commentedComment #3
gdrupal commentedComment #4
gdrupal commentedNew Patch!
Comment #5
gdrupal commentedNew patch with little fix.
Comment #6
berdirThis seems to address the same problem as #2006422: i18n Strings: Support string record without object structure. Can we merge those two issues?
Comment #7
gdrupal commented@Berdir with my patch you do not need to add any special handling.. pane and display configurations will just work as normal i18n sources. You do not need to hide / remove them any more. I think my patch makes the other patch obsolete.
Comment #8
leksat commentedTested #5 with panels. Works nice!
Comment #10
berdirThanks.
Comment #15
berdir