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

add basic farsi support #354

Merged
merged 9 commits into from
Aug 4, 2022
Merged

Conversation

HKalbasi
Copy link
Contributor

Changes proposed in this pull request:

  • add basic farsi support.

Status

  • READY
  • HOLD
  • WIP (Work-In-Progress)

How to verify this change

You can check tests if you know Farsi.

Additional notes

This motivates me.

@coveralls
Copy link

coveralls commented Dec 16, 2020

Pull Request Test Coverage Report for Build 2799369812

  • 117 of 118 (99.15%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 96.349%

Changes Missing Coverage Covered Lines Changed/Added Lines %
num2words/lang_FA.py 76 77 98.7%
Totals Coverage Status
Change from base Build 2798639601: 0.04%
Covered Lines: 6831
Relevant Lines: 7014

💛 - Coveralls

@mromdhane mromdhane self-requested a review January 22, 2021 14:50
@erozqba
Copy link
Collaborator

erozqba commented Jan 24, 2021

@HKalbasi could you please, add some tests for the missing lines on the coverage https://coveralls.io/builds/35770814/source?filename=num2words%2Flang_FA.py

@HKalbasi
Copy link
Contributor Author

@erozqba Done.

@erozqba
Copy link
Collaborator

erozqba commented Jan 24, 2021

@HKalbasi has you can see the tests are failing, could you fix them, pelase?

@HKalbasi
Copy link
Contributor Author

Just one of them remains, But I don't know what is the problem and how to solve it. Maybe it is due to python2 problem with unicode?

@mromdhane
Copy link
Contributor

mromdhane commented Jan 25, 2021

@HKalbasi The test failed: Can you check it please

`FAIL: test_ordinal (tests.test_fa.Num2WordsFATest)


Traceback (most recent call last):

File "/home/travis/build/savoirfairelinux/num2words/tests/test_fa.py", line 43, in test_ordinal

'بیست و سوم'

AssertionError: '\xd8\xa8\xdb\x8c\xd8\xb3\xd8\xaa \xd9\x88 \xd8\xb3\xd9\x87\xd9\x85' != '\xd8\xa8\xdb\x8c\xd8\xb3\xd8\xaa \xd9\x88 \xd8\xb3\xd9\x88\xd9\x85`

@HKalbasi
Copy link
Contributor Author

I had seen it. But I don't know what those cryptic characters mean. When I print them those are this:

ب�ست � س�� != ب�ست � س��

It seems there is a unicode issue with python2 which I know nothing about them. You did not have the same problem before? For example, for Arabic? Any idea?

By the way, python2 is dead more than one year. Do you still need to check it in the CI?

@erozqba
Copy link
Collaborator

erozqba commented Jan 25, 2021

I had seen it. But I don't know what those cryptic characters mean. When I print them those are this:

ب�ست � س�� != ب�ست � س��

It seems there is a unicode issue with python2 which I know nothing about them. You did not have the same problem before? For example, for Arabic? Any idea?

By the way, python2 is dead more than one year. Do you still need to check it in the CI?

We should probably remove it any time soon, but sadly python 2.7 still continue to be used a lot.

@HKalbasi
Copy link
Contributor Author

We should probably remove it any time soon

Do I have to do anything else or just wait?

but sadly python 2.7 still continue to be used a lot.

Yes, but they do not need the latest version of this library.

@mrodriguezg1991 mrodriguezg1991 merged commit d719952 into savoirfairelinux:master Aug 4, 2022
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.

None yet

5 participants