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

Fixing plural of years and days in Hebrew #1042

Merged
merged 4 commits into from
Sep 21, 2021
Merged

Conversation

guyernest
Copy link
Contributor

Pull Request Checklist

Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:

  • 🧪 Added tests for changed code.
  • 🛠️ All tests pass when run locally (run tox or make test to find out!).
  • 🧹 All linting checks pass when run locally (run tox -e lint or make lint to find out!).
  • 📚 Updated documentation for changed code.
  • ⏩ Code is up-to-date with the master branch.

If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!

Description of Changes

In some languages (Hebrew and Arabic, for example) the plural of years or days are different than the ones until ten
A more correct way to write plural of years and days for number larger than 10 (similar to Arabic above)
Copy link
Member

@krisfremen krisfremen left a comment

Choose a reason for hiding this comment

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

Hi @guyernest,

Thanks for the PR.

Let's start with getting the tests to pass first, which needs to have the locale's _format_timeframe to be modified in order to use the new keys.

Take a look at the Arabic locale to see the _format_timeframe implementation, this will probably need to have the "general" keys moved to the new keys.

@guyernest
Copy link
Contributor Author

Thank you for your attention and I apologize for missing these tests failures.
I've fixed the format, added a couple of tests, and verified they are passing now.

@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #1042 (70a0310) into master (a4f1797) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1042   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2166      2168    +2     
  Branches       344       345    +1     
=========================================
+ Hits          2166      2168    +2     
Impacted Files Coverage Δ
arrow/locales.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4f1797...70a0310. Read the comment docs.

Copy link
Member

@krisfremen krisfremen left a comment

Choose a reason for hiding this comment

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

Hi @guyernest,

looks great in terms of code and passing tests!

The only thing left is the code style, if you take a look at the GitHub Actions, there's a few cosmetic fixups needed, you can do all of them automatically by running tox -e lint.

Other than that, everything else looks good to go!

@guyernest
Copy link
Contributor Author

I didn't notice any change in the files, however, it might be some whitespace characters or new lines that I don't see.

I hope now it will pass the workflow smoothly

Copy link
Member

@krisfremen krisfremen left a comment

Choose a reason for hiding this comment

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

@guyernest Thanks for fixing up your PR! That looks great!

Looks good to me!

Copy link
Member

@anishnya anishnya left a comment

Choose a reason for hiding this comment

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

Looks good to me as well.

@anishnya anishnya merged commit 9b45719 into arrow-py:master Sep 21, 2021
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.

3 participants