-
Notifications
You must be signed in to change notification settings - Fork 252
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
Add Yiddish language ruleset #336
Conversation
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.
Great, thank you
I think you need to run |
Sure, done! Since it's generated automatically I wasn't sure if I was supposed to include it in the PR. |
@yankl Nice, thank you, |
@@ -53,6 +53,7 @@ class Slugify implements SlugifyInterface | |||
// Languages are preferred if they appear later, list is ordered by number of | |||
// websites in that language | |||
// https://en.wikipedia.org/wiki/Languages_used_on_the_Internet#Content_languages_for_websites | |||
'yiddish', |
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.
The whole list has an invalid order.
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.
Can you explain what you mean? What makes the order invalid?
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.
Please look at the comment above the list in the code.
list is ordered by number of websites in that language
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.
Yes, and it also says "Languages are preferred if they appear later" meaning the more popular languages should come last. And as you see, Russian, German and Polish appear near the bottom of the list here, while they're near the top of the list (and in the reverse order) on the wiki page. You're right that the order in general doesn't match. For example, whoever put Romanian at the bottom of the list made a mistake, as it's number 23 on the wiki page, way below German, for example. But I believe I correctly placed Yiddish at the top of the list, giving it very low priority, as it doesn't even appear on the list of most popular languages. And you're making this comment on this commit which only adds Yiddish to the list, hence my confusion. Are you claiming that Yiddish was incorrectly placed or just that the list as a whole is not in the stated order?
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.
Exactly, the whole list is off the order.
Added a ruleset for Yiddish, and added it to the default languages, as it's the only language so far here that uses this character set, and for any other languages that use these letters (e.g., Hebrew, Aramaic), it will be much better to have the Yiddish ruleset than nothing.
I also added a test to
defaultRuleProvider
and ran the tests -- everything still passes.