Loading l10n_migrate/src/Plugin/migrate/source/L10nServerLanguage.php +9 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,15 @@ class L10nServerLanguage extends SqlBase { $plural_formula = \Drupal::service('l10n_pconfig.drupalorg_plural_formula'); $formulae = $plural_formula->getDrupalPluralFormulae(); if (isset($formulae[$row->getSourceProperty('language')])) { $row->setSourceProperty('formula', $formulae[$row->getSourceProperty('language')]); $value = $formulae[$row->getSourceProperty('language')]; if ($value == 0) { $value = 'nplurals=1; plural=0;'; } elseif ($value === '($n!=1)') { $value = 'nplurals=2; plural=(n!=1);'; } $row->setSourceProperty('formula', $value); } return parent::prepareRow($row); } Loading Loading
l10n_migrate/src/Plugin/migrate/source/L10nServerLanguage.php +9 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,15 @@ class L10nServerLanguage extends SqlBase { $plural_formula = \Drupal::service('l10n_pconfig.drupalorg_plural_formula'); $formulae = $plural_formula->getDrupalPluralFormulae(); if (isset($formulae[$row->getSourceProperty('language')])) { $row->setSourceProperty('formula', $formulae[$row->getSourceProperty('language')]); $value = $formulae[$row->getSourceProperty('language')]; if ($value == 0) { $value = 'nplurals=1; plural=0;'; } elseif ($value === '($n!=1)') { $value = 'nplurals=2; plural=(n!=1);'; } $row->setSourceProperty('formula', $value); } return parent::prepareRow($row); } Loading