EvanHahn / HumanizeDuration.js

361000 becomes "6 minutes, 1 second"
https://evanhahn.github.io/HumanizeDuration.js/
The Unlicense
1.65k stars 175 forks source link

Arabic translation enhancement: Hide unit count with dual forms. #222

Closed 6km closed 5 months ago

6km commented 6 months ago

The issue with is described in #221. I have implemented a solution for it.

I could just check if the language equals ar, but I thought it would be better to add that hideUnitInDualForm property to the humanizer and options!

EvanHahn commented 5 months ago

Thank you! I will take a look soon.

6km commented 5 months ago

@EvanHahn Thanks for your review! I'm working work on it!

  • I don't know much about Arabic. Do you have a place I could learn more about these rules to make sure this is correct for all Arabic speakers?

I didn't find many English resources talking about the dual nouns (Muthanna) in Arabic, but this can help I guess. Number: Singular, Dual, Plural Noun in Arabic

A noun that ends with "ين" or "ان" is a dual noun; that's why we never put a number before it.

EvanHahn commented 5 months ago

Thanks! I'll take another look soon.

EvanHahn commented 5 months ago

This was released in humanize-duration@3.32.1. Thanks for your contribution!

6km commented 5 months ago

This was released in humanize-duration@3.32.1. Thanks for your contribution!

You're welcome!