Problem/Motivation

We use a large number of data sets in the providerTestPhpTransliteration(). It will be useful to name each one with string key.

Proposed resolution

Using a data provider with array keys instead of comments.

Remaining tasks

It requires an additional patch for 8.6.x-dev.

The patch won't apply in previous dev version. That is because #2895315: Danish characters are not translated correctly with transliteration was pushed only to 8.7.x. Both versions have a slight but significant difference:

--- a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
+++ b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
@@ -136,8 +136,8 @@ public function providerTestPhpTransliteration() {
-      ['dk', $two_byte, 'A O U Aa Oe aouaaoehello'],
-      ['dk', $random, $random],
+      ['da', $two_byte, 'A O U Aa Oe aouaaoehello'],
+      ['da', $random, $random],

Issue fork drupal-3025727

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Krzysztof Domański created an issue. See original summary.

Krzysztof Domański’s picture

Assigned: Krzysztof Domański » Unassigned
Status: Active » Needs review
FileSize
6.98 KB
6.98 KB
alexpott’s picture

Status: Needs review » Needs work

Nice - I've done a a git diff using --color-words and the changes look great. Apart from...

  1. The full stop on the end of each array key is unnecessary
  2. +++ b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
    @@ -120,56 +120,93 @@ public function providerTestPhpTransliteration() {
    +      'Test a language overrides in Danish.' => [
    ...
    +      'Test a language overrides in Kyrgyz.' => [
    

    Should be "Test language overrides in..."

  3. +++ b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
    @@ -120,56 +120,93 @@ public function providerTestPhpTransliteration() {
    +      'Illegal/unknown unicode inside the words.' => [
    

    Should be 'Contains Illegal/unknown unicode'

  4. +++ b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
    @@ -120,56 +120,93 @@ public function providerTestPhpTransliteration() {
    +      'Illegal/unknown unicode at the end of the words.' => [
    

    Should be 'Illegal/unknown unicode at end'

Krzysztof Domański’s picture

Status: Needs work » Needs review
FileSize
5.85 KB
6.92 KB
6.92 KB

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Matroskeen made their first commit to this issue’s fork.

Matroskeen’s picture

Status: Needs review » Reviewed & tested by the community

It needed a reroll after #3169212: Improve transliteration of Ukrainian letters.

Given that all I did is a re-roll with minor comment change and these changes looking good to me, I'd like to mark this RTBC.
Thanks!

Matroskeen’s picture

Hiding old patches. The merge request contains 2 commits, so it's kind of interdiff.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

  • catch committed 35c43b5 on 9.3.x
    Issue #3025727 by Krzysztof Domański, Matroskeen, alexpott: Using a data...

  • catch committed 3bf39af on 9.2.x
    Issue #3025727 by Krzysztof Domański, Matroskeen, alexpott: Using a data...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.3.x and cherry-picked to 9.2.x, thanks!

Status: Fixed » Closed (fixed)

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