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

GDrupal created an issue. See original summary.

gdrupal’s picture

Status: Active » Needs review
StatusFileSize
new843 bytes
gdrupal’s picture

Title: TMGMT API does not play nice with i18nviews » TMGMT API does not play nice with i18nviews and i18n_panels
Issue summary: View changes
Issue tags: +panels
gdrupal’s picture

Priority: Normal » Major
StatusFileSize
new3.2 KB

New Patch!

gdrupal’s picture

StatusFileSize
new3.2 KB

New patch with little fix.

berdir’s picture

This seems to address the same problem as #2006422: i18n Strings: Support string record without object structure. Can we merge those two issues?

gdrupal’s picture

@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.

leksat’s picture

Status: Needs review » Reviewed & tested by the community

Tested #5 with panels. Works nice!

  • Berdir committed 65f8be3 on 7.x-1.x authored by GDrupal
    Issue #2639852 by GDrupal: Fixed TMGMT API does not play nice with...
berdir’s picture

Status: Reviewed & tested by the community » Fixed

Thanks.

Status: Fixed » Closed (fixed)

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

The last submitted patch, 2: tmgmt-i18nviews-2639852-1.patch, failed testing.

The last submitted patch, 4: tmgmt-i18nviews-i18n-panels-2639852-4.patch, failed testing.

Status: Closed (fixed) » Needs work

The last submitted patch, 5: tmgmt-i18nviews-i18n-panels-2639852-5.patch, failed testing.

berdir’s picture

Status: Needs work » Closed (fixed)