Skip to content

Add kazakh language - #40

Merged
matrixik merged 2 commits into
gosimple:masterfrom
gumeniukcom:master
Oct 22, 2019
Merged

matrixik merged 2 commits into
gosimple:masterfrom
gumeniukcom:master

Conversation

@gumeniukcom

Copy link
Copy Markdown
Contributor

Add kazakh language by usual rule and ISO

@matrixik

Copy link
Copy Markdown
Member

Hi, thank you for adding new language. I left some comments inline.

Comment thread languages_substitution.go Outdated
Comment on lines +107 to +114
'ғ': "g",
'һ': "h",
'і': "i",
'ң': "n",
'ө': "o",
'қ': "q",
'ұ': "u",
'ү': "u",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm a little confused. Do we really need all of them here? As far as I checked https://github.com/rainycape/unidecode/blob/master/table.txt almost all of them are already handled correctly.

The only difference I see you change қ to q and unidecode library is changing it to k. We can use your version here if it's better.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Modern translation қ => q, so its correct

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

without this additional subtitution ң converted to n- (and others )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, you are right. Don't know why I mentally removed - from them.

Comment thread languages_substitution.go
Comment on lines +105 to +106
'&': "jane",
'ә': "a",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You missed mapping @ symbol.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

People don't use @ at Kazakh, that's why I used default @=>`` ( empty )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is strange for me. What about writing email address in text (like mail@example.com)?

Personally I would prefer handling @ but will merge it as is for now, and fix if someone complain.

Comment thread languages_substitution.go Outdated
Comment on lines +116 to +124
'Ә': "A",
'Ғ': "G",
'Һ': "H",
'І': "I",
'Ң': "N",
'Ө': "O",
'Қ': "Q",
'Ұ': "U",
'Ү': "U",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See previous comment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ups, they are ordered here by commenting order and not simply from top. This refer to comment that most of them are already handled correctly by unidecode library.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

without this additional subtitution ң converted to n- (and others )

Comment thread slug.go Resolved
Comment thread slug_test.go Resolved
Comment thread languages_substitution.go Resolved
@gumeniukcom
gumeniukcom requested a review from matrixik October 20, 2019 11:48
@matrixik
matrixik merged commit ff4fe77 into gosimple:master Oct 22, 2019
@matrixik

Copy link
Copy Markdown
Member

Thank you for adding this language :-)

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.

2 participants

⌂ 换网址