baha-bouali opened a new pull request, #72604:
URL: https://github.com/apache/airflow/pull/72604

   Arabic inflects a counted noun four ways, but dayjs's `ar` locale stores a
   single template per unit, so every count above one took the 3-10 form: a
   two-hour deadline read "2 ساعات" where the dual is required, and an 
eleven-day
   one read "11 أيام" instead of "11 يومًا".
   
   The dual must also agree in case with whatever governs it, and it is the only
   form that spells its case out rather than carrying it in an unwritten vowel.
   Every humanized duration in this UI sits under a preposition -- خلال in the
   deadline rule, and dayjs's own منذ / بعد around every relative time -- so the
   oblique is the form these positions require.
   
   Locales with comparable plural systems -- Hebrew, Russian, Polish -- already
   pass a function instead of a template; Arabic was simply never migrated.
   PR body
   
   Arabic durations in the UI were both mis-pluralised and mis-inflected.
   
   dayjs's `ar` locale stores one template per unit (`"%d ساعات"`), so every
   count above one rendered the 3–10 form: a two-hour deadline read "2 ساعات",
   an eleven-day one "11 أيام". Arabic has four plural categories, and the
   dual and 11–99 forms are different words.
   
   The dual also has to agree in case with what governs it — and it is the
   only form that spells its case out. Every humanized duration here sits
   under a preposition (`خلال` in the deadline rule, and dayjs's own `منذ` /
   `بعد` around every relative time), so the oblique `ساعتين` is required,
   not the citation form `ساعتان`.
   
   Hebrew, Russian and Polish already pass a function instead of a template;
   Arabic was never migrated. This applies the same treatment locally.
   
   ### Before (DUAL)
   
   <img width="552" height="185" alt="image" 
src="https://github.com/user-attachments/assets/eb1c2002-6cea-48bb-9835-ed725af17f8e";
 />
   
   
   ### After (DUAL , with accusative form)
   <img width="448" height="186" alt="image" 
src="https://github.com/user-attachments/assets/f86297b5-6ffc-4ea5-9765-1270952318dd";
 />
   
   
   ### Before (Plural - some) 
   
   <img width="558" height="186" alt="image" 
src="https://github.com/user-attachments/assets/cd34209c-3e31-4309-a964-4ee28bdf3cbb";
 />
   
   ### After (Plural - some)
   <img width="418" height="178" alt="image" 
src="https://github.com/user-attachments/assets/0e228036-a09b-4592-b476-6d97e234351e";
 />
   
   
   
   ### After (Singular) : correct as before
   
   <img width="442" height="186" alt="image" 
src="https://github.com/user-attachments/assets/7040a428-a26b-48c7-b235-6cc9af14f0b9";
 />
   
   Counts of 3 and above are checked against `Intl.DurationFormat`, which
   reads the same CLDR data, across every count in each unit's humanize
   window. The dual is pinned explicitly, since Intl formats a standalone
   duration and so returns the nominative.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes : Claude Code, every line reviewed by the submitter.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to