The source plugin for the d7 term localized migration added in #2979964: Migrate translations for D7 i18n taxonomy 'localized' terms does not have a test. Not sure how I missed that but I did.

This issue is to add one.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quietone created an issue. See original summary.

quietone’s picture

Status: Active » Needs review
FileSize
5 KB

And a test. The source plugin is modified to remove an unnecessary line.

quietone’s picture

Issue tags: +i18n-migrate, +migrate-d7-d8
Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Yay thanks!

Verified that the isNotNull() was superfluous because the code continues to inner join on locales target and a null value will never satisfy that inner join.

    // Add in the property, which is either name or description.
    // Cast td.tid as char for PostgreSQL compatibility.
    $query->leftJoin('i18n_string', 'i18n', 'CAST(td.tid AS CHAR(255)) = i18n.objectid');
    $query->condition('i18n.type', 'term');
    $query->isNotNull('i18n.lid');
    $query->addField('i18n', 'lid');
    $query->addField('i18n', 'property');

    // Add in the translation for the property.
    $query->innerJoin('locales_target', 'lt', 'i18n.lid = lt.lid');
    $query->addField('lt', 'language', 'lt.language');
    $query->addField('lt', 'translation');
larowlan’s picture

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed 6f1111f and pushed to 8.8.x. Thanks!

  • larowlan committed 6f1111f on 8.8.x
    Issue #3073442 by quietone, Gábor Hojtsy: Add test of d7 term localized...

Status: Fixed » Closed (fixed)

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