Skip to content
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

Added Chinese support (Pinyin) #158

Closed
wants to merge 6 commits into from
Closed

Added Chinese support (Pinyin) #158

wants to merge 6 commits into from

Conversation

SuN-80
Copy link
Contributor

@SuN-80 SuN-80 commented Feb 21, 2017

No description provided.

@SuN-80 SuN-80 mentioned this pull request Feb 21, 2017
@cyqui
Copy link

cyqui commented Feb 23, 2017

I believe that you only need to run "bin/generate-default.php" for your PR to pass the unit tests.

Thank you for adding chinese..

Updated default rules by running bin/generate-default.php
@@ -159,6 +159,7 @@ public function customRulesProvider()
['romanian', 'ă î â ş ș ţ ț Ă Î Â Ş Ș Ţ Ț', 'a-i-a-s-s-t-t-a-i-a-s-s-t-t'],
['serbian', 'А Б В Г Д Ђ Е Ж З И Ј К Л Љ М Н Њ О П Р С Т Ћ У Ф Х Ц Ч Џ Ш а б в г д ђ е ж з и ј к л љ м н њ о п р с т ћ у ф х ц ч џ ш Š Đ Ž Ć Č š đ ž ć č', 'a-b-v-g-d-dj-e-z-z-i-j-k-l-lj-m-n-nj-o-p-r-s-t-c-u-f-h-c-c-dz-s-a-b-v-g-d-dj-e-z-z-i-j-k-l-lj-m-n-nj-o-p-r-s-t-c-u-f-h-c-c-dz-s-s-dj-z-c-c-s-dj-z-c-c'],
['lithuanian', 'Ą Č Ę Ė Į Š Ų Ū Ž ą č ę ė į š ų ū ž', 'a-c-e-e-i-s-u-u-z-a-c-e-e-i-s-u-u-z'],
['chinese', '活动日起', 'huodongriqi'],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I don't know but maybe this is more readable? -> "Huo-Dong-Ri-Qi"

-> voku/urlify@a7f818a

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding of Pinyin, I don't think you can do that.

@hifall
Copy link

hifall commented Jun 2, 2017

Any progress on this? This is necessary for Chinese support.

@elleyyu
Copy link

elleyyu commented Jul 13, 2017

Hi, I'm a Chinese user and looking for Chinese slug support, I discover there will be a problem if you use Pinyin to transfer slug, for example,

"中" : "zhong",
"忠" : "zhong",
"终" : "zhong",
"盅" : "zhong",
"钟" : "zhong",
"衷" : "zhong",
"肿" : "zhong",
"冢" : "zhong",
"踵" : "zhong",
"仲" : "zhong",
"众" : "zhong",

they all spell zhong, which means if I use 中心, 衷心, the slugs will be duplicated (zhongxin)
also, they are different meaning in Chinese 🙂

@SuN-80
Copy link
Contributor Author

SuN-80 commented Jul 13, 2017

@elleyyu thanks for your feedback! This commit is based on jifei's PHP class, you should probably report any issue there, if any. ;) Pinyin is purely a representation of the sounds of Mandarin, it completely lacks the semantic cues and contexts inherent in Chinese characters (see this).
This online converter also outputs the same result, and this reverse search too. I believe this is the expected Pinyin translation.

@hifall I replied to your comment earlier, don't know why my message was removed. Basically I was saying I didn't know why tests were not successful, all I can say is it works (see here). Unless someone can help, this pull request will remain open. Sorry.

@SuN-80 SuN-80 mentioned this pull request Oct 31, 2017
@florianeckerstorfer
Copy link
Member

Fixed by #195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants