Skip to content

feat: add Romanian and Hungarian alphabet support - #5

Merged
Halvani merged 1 commit into
mainfrom
feature/romanian-hungarian-alphabets
Aug 21, 2026
Merged

Halvani merged 1 commit into
mainfrom
feature/romanian-hungarian-alphabets

Conversation

@Halvani

@Halvani Halvani commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Changes

Hungarian

  • Alphabet data (hun, 88 chars with multigraphs) already existed in alphabet.json but had no Language enum entry
  • Added Language.Hungarian = "hun" so users can access it via by_language()

Romanian

  • Data existed under rum (shared with Moldovan). Adding Romanian = "rum" would create an enum alias of Moldovan, so by_language(Language.Romanian) would return {"Moldovan": ...}
  • Instead, used ISO 639-3 code ron and added a new ron entry to alphabet.json with the correct modern Romanian alphabet (comma-below diacritics: Ș ș Ț ț, not the legacy cedilla variants Ş ţ)

Tests

  • test_hungarian_alphabet: verifies multigraphs (Cs, Dz, Dzs, Gy, Ly, Ny, Sz, Ty, Zs), accented vowels, and total count (88)
  • test_romanian_alphabet: verifies special characters (Ă ă Â â Î î Ș ș Ț ț) and total count (62)

All 26 tests pass.

Fixes #3

Hungarian: alphabet data (hun) already existed in alphabet.json but had
no Language enum entry. Added Language.Hungarian = "hun" so users can
access it via by_language().

Romanian: data existed under "rum" (shared with Moldovan). Since
Moldovan = "rum" in the enum, adding Romanian = "rum" would create an
enum alias. Instead, used ISO 639-3 code "ron" and added a new "ron"
entry to alphabet.json with the correct modern Romanian alphabet
(comma-below diacritics: Ș ș Ț ț, not the legacy cedilla variants).

Added tests for both alphabets verifying script content and length.

Fixes #3
@Halvani
Halvani merged commit 7a03316 into main Aug 21, 2026
5 checks passed
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.

Support for Romanian and Hungarian alphabets

1 participant