potiuk commented on PR #55327:
URL: https://github.com/apache/airflow/pull/55327#issuecomment-3268382975

   > In addition to the rules provided in the i18n jsfiddle, we might want to 
consider rules for floats. See discussion in the 
[Factorio](https://crowdin.com/project/factorio/discussions/228) project as an 
example.
   
   Good point, but I don't think we have floats in Airflow UI phrases. Lookling 
at the current phrases we have exclusively counts and strings - and it's quite 
unlikely we will ever have floats. 
   
   And even if we would have i18next library we use already has all the rules 
necessary it seems for example 
https://www.i18next.com/translation-function/formatting (for decimal 
formatiing, but also dates, time, relative time etc. ). Also for plural forms 
for decimal numbers, they seem to be included already - for example `_other` in 
PL is used for decimal formatting. The jsfiddle just uses ints and does not 
explain where `_other` is used (if you choose pl as language, you will see that 
_other is not possible to be generated), so I looked it up - actually yesterday 
- and in PL this is the form which will be used for "everything else" including 
decimals (and I belive i18next will properly choose the right forms for each 
language. And I saw also similar _other in other languages.
   
   > Also, it is conceivable there might be cases where translators want to add 
a case that's not defined in i18n for their language, e.g. _two if they want to 
use the equivalent of "both" for some reason.
   
   Yep, if we get to the point i18next has the option to use custom formatters 
https://www.i18next.com/translation-function/formatting and we can specify 
which formatters we should use when it comes to it.
   
   I actualy found i18next (it seems it's been refactored and rewritten failrly 
recently) as very comprehensive and helpful for all internationalisation rules.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to