Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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],
Comment | File | Size | Author |
---|
Issue fork drupal-3025727
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:
- 3025727-transliteration-improve-data-provider changes, plain diff MR !603
Comments
Comment #2
Krzysztof DomańskiComment #3
alexpottNice - I've done a a git diff using --color-words and the changes look great. Apart from...
Should be "Test language overrides in..."
Should be 'Contains Illegal/unknown unicode'
Should be 'Illegal/unknown unicode at end'
Comment #4
Krzysztof DomańskiComment #11
MatroskeenIt 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!
Comment #12
MatroskeenHiding old patches. The merge request contains 2 commits, so it's kind of interdiff.
Comment #16
catchCommitted/pushed to 9.3.x and cherry-picked to 9.2.x, thanks!