New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UtilitiesBundle] Feature transliterator #1666
Conversation
b58933f
to
66ed9a5
Compare
* | ||
* @return string | ||
*/ | ||
public function slugify($text, $default = '', $replace = array("'"), $delimiter = '-') | ||
public function slugify($text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can keep the delimiter here. The transliterate function https://github.com/Behat/Transliterator/blob/master/src/Behat/Transliterator/Transliterator.php#L431 also has a seperator as argument.
* @return mixed | ||
*/ | ||
public function slugify($text, $default = 'n-a', $replace = array("'"), $delimiter = '-'); | ||
public function slugify($text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep delimiter here to
@sandergo90 done. |
I just wanted to let you know that replacing previous slugifer using https://www.php.net/manual/en/transliterator.transliterate.php with behat caused arabic transliteration to change. From what I see previous one was correct and new one is not. Example: الستائر - earlier was transliterated to https://translate.google.com translated it to |
Hi @krewetka, can you create a new issue for this bug and reference this PR? It makes it easier to keep track of the bug! Can you also report this issue to behat/transliterator so it possibly can be fixed upstream? Thanks! |
I think we should use
Behat/Transliterator
is more accurate. It's made some BC breaks, but the second argument in slugify function never been used.