You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same with weeks, days, hours, minutes, seconds and milliseconds.
In my opinion numbers should be returned for value of 1, since toWords: true is not specified,
I believe the issue is because of guidance from the Norwegian language council (Norwegian: Språkrådet). They define that:
The main rule is that we write small numbers (up to twelve) in letters.
But they continue:
Within the same sentence or paragraph, we should be consistent and choose either numbers or letters. Example: children between 6 and 14 years (not «between six and 14 years»). If the text contains many small and large numbers, it may be appropriate to use numbers throughout the text.
The main trouble with the current results are when using a precision greater than 1, then words and numbers for small numbers are mixed:
TimeSpan.FromMinutes(80).Humanize(2);// returns "ett minutt og 20 sekunder" (one minute and 20 seconds)TimeSpan.FromMinutes(121).Humanize(2);// returns "2 minutter og ett sekund" (2 minutes and one second)
This result does not look good, and I believe the words for 1 ("en/ett") should only be used when toWords: true is specified. This is also according to the language council that states that it is more important to be consistent, and that sentences with multiple values should use numbers.
Since this is a localization issue, I tag the Norwegians that have contributed to translations in the past, so they get the opportunity to express their opinion: @erlendr, @henriksen, @jenscski
I am happy to contribute by fixing this when there is consensus to follow my suggestion 😊
The text was updated successfully, but these errors were encountered:
I agree that consistency is important, and as long as toWords is a binary operator and cannot be used to force numbers, the default option should be to print only numbers. Then the developer can have the choice of one model or the other, but never a mixed model. Seems fair.
The "words below 12" rule seems to be a particular Norwegian one, other languages have different rules, so it's probably better to leave that decision to the developer.
Looks like a misunderstand has lead to Norwegian time span being humanized to word for values of 1:
The same with weeks, days, hours, minutes, seconds and milliseconds.
In my opinion numbers should be returned for value of 1, since
toWords: true
is not specified,I believe the issue is because of guidance from the Norwegian language council (Norwegian: Språkrådet). They define that:
But they continue:
The main trouble with the current results are when using a precision greater than 1, then words and numbers for small numbers are mixed:
This result does not look good, and I believe the words for 1 ("en/ett") should only be used when
toWords: true
is specified. This is also according to the language council that states that it is more important to be consistent, and that sentences with multiple values should use numbers.Since this is a localization issue, I tag the Norwegians that have contributed to translations in the past, so they get the opportunity to express their opinion: @erlendr, @henriksen, @jenscski
I am happy to contribute by fixing this when there is consensus to follow my suggestion 😊
The text was updated successfully, but these errors were encountered: