carpedm20 / emoji

emoji terminal output for Python
Other
1.87k stars 273 forks source link

Add Russian emoji language #277

Closed step0ne closed 9 months ago

step0ne commented 9 months ago

I have problem with 'й' and 'Й'. Trying to fix by adding this cases to adapt_emoji_name, but some emoji don't process by this function. So i fix this inplace in data_dict.py by replacing "й" to "и". Can u create new release with Russian?

cvzi commented 9 months ago

I see the problem with Й. It happens because Й can be described in two ways in Unicode: As a single unicode point: Й as \u0419 and as two unicode points: И + ̆ as \u0418\u0306

The ̆ symbol is not matched by regular expression class \w.

You can add the ̆ symbol to the regular expression here: https://github.com/carpedm20/emoji/blob/master/emoji/core.py#L24 Just insert \u0306 after the existing \u0303

And then you can keep the й and Й and it should work.

step0ne commented 9 months ago

I had fixed this problem. Thanks for comment😊 Could you make code review? And if it possible to make new version off library?

cvzi commented 9 months ago

Looks good to me!

@TahirJalilov you can merge and release a new version

TahirJalilov commented 9 months ago

@step0ne Thank you for your PR. And of course, thank you @cvzi for everything you do for this project ))