Skip to content

Fix Polish compound ordinals before thousand and million scales - #697

Open
NetBr3ak wants to merge 1 commit into
savoirfairelinux:masterfrom
NetBr3ak:fix/polish-ordinal-hundreds
Open

NetBr3ak wants to merge 1 commit into
savoirfairelinux:masterfrom
NetBr3ak:fix/polish-ordinal-hundreds

Conversation

@NetBr3ak

Copy link
Copy Markdown

Polish ordinal conversion currently raises IndexError for values such as 110000 and 120000. The compound form indexes the one-item cardinal HUNDREDS tuple at position 1. After that lookup is corrected, the formatter also needs to join the compound without spaces and use the combining form 'jedno' rather than 'pierwszo'.

Use the existing ordinal combining forms when a scale follows, and assemble that compound separately from any preceding cardinal words. Examples:

  • 110000: IndexError becomes studziesięciotysięczny.
  • 121000: sto dwudziesty pierwszytysięczny becomes studwudziestojednotysięczny.
  • 1110000: IndexError becomes milion studziesięciotysięczny.

The new regression file covers the affected branches, the million scale, a preceding cardinal group, and unchanged unscaled ordinals. All 1496 tests pass on Python 3.11/Linux. Coverage, Flake8, and isort pass. Existing tests are unchanged.

Found through source inspection and reproduced locally. Prepared with OpenAI Codex assistance. This does not include the separate spelling corrections in #660.

Użyj form złożeniowych setek przed tysiącem i milionem. Złóż końcowy liczebnik bez spacji i zachowaj odstęp po wcześniejszej części głównej. Forma jedno zastępuje pierwszo w złożeniu.

Nowy plik regresji, bez zmian istniejących testów. Pełny zestaw: 1496 testów zaliczonych. Pokrycie źródeł 97%, języka polskiego 100%, testów 100%. Flake8 dla 140 śledzonych lub nowych plików Pythona i isort zaliczone.
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.

1 participant