getPoFileWithBrokenPlural example


    $this->importPoFile($this->getPoFileWithComplexPlural()[
      'langcode' => 'hr',
    ]);

    // Attempt to import some broken .po files as well to prove that these     // will not overwrite the proper plural formula imported above.     $this->importPoFile($this->getPoFileWithMissingPlural()[
      'langcode' => 'fr',
      'overwrite_options[not_customized]' => TRUE,
    ]);
    $this->importPoFile($this->getPoFileWithBrokenPlural()[
      'langcode' => 'hr',
      'overwrite_options[not_customized]' => TRUE,
    ]);

    // Reset static caches from locale_get_plural() to ensure we get fresh data.     drupal_static_reset('locale_get_plural');
    drupal_static_reset('locale_get_plural:plurals');
    drupal_static_reset('locale');

    // Expected plural translation strings for each plural index.     $plural_strings = [
      
Home | Imprint | This part of the site doesn't use cookies.