Skip to content

fix: transliterate lowercase Armenian letters and add Ո, Ւ - #229

Open
sirajju wants to merge 1 commit into
simov:masterfrom
sirajju:armenian-lowercase
Open

sirajju wants to merge 1 commit into
simov:masterfrom
sirajju:armenian-lowercase

Conversation

@sirajju

@sirajju sirajju commented Nov 27, 2026

Copy link
Copy Markdown

Armenian support (#119) only added the uppercase letters U+0531–U+0556. Ordinary Armenian text is mostly lowercase, so it gets removed:

slugify('Ոսկի')            // ''
slugify('բարև աշխարհ')     // 'EV'
slugify('Բարև Հայաստան')   // 'BEV-H'

This PR:

  • maps each lowercase letter U+0561–U+0586 to the lowercase of its existing uppercase transliteration (Ժ → JH, ժ → jh, …)
  • adds the two missing letters Ո/ո → O/o and Ւ/ւ → W/w (ISO 9985)
  • rebuilds slugify.js with npm run build and adds a test for every Armenian letter

After this change:

slugify('Ոսկի')                             // 'Oski'
slugify('բարև աշխարհ', { lower: true })     // 'barev-ashxarh'

The lowercase ligature և still maps to EV. I left it alone because #215 already changes it to ev.

Armenian support (simov#119) mapped only the uppercase letters U+0531-U+0556,
so ordinary lowercase Armenian text was removed: slugify('Ոսկի') returned
'' and slugify('բարև աշխարհ') returned 'EV'.

Map each lowercase letter U+0561-U+0586 to the lowercase of its uppercase
transliteration, and add the missing Ո/ո (o) and Ւ/ւ (w).
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