Repository navigation
💥 Transliterate Grantha letters, with their vowel forms, by default - #1107
Merged
Merged
Conversation
rathesDot
force-pushed
the
grantha-syllables
branch
2 times, most recently
from
October 23, 2026 10:44
d557720 to
253ef1a
Compare
ஜன்னல் gave 'ஜṉṉal': grantha.json held only the six bare consonants
(ஜ் …), and only with { grantha: true }. Each consonant now has its full
row of vowel forms, shaped like script.json and numbered on from it, and
Grantha is on unless { grantha: false }. This changes default output.
rathesDot
force-pushed
the
grantha-syllables
branch
from
October 23, 2026 10:46
253ef1a to
8366bc5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Words with Grantha letters came out half in Tamil script:
getIso15919('ஜன்னல்')gaveஜṉṉal, andgetIPA('சந்தோஷம்')gavet͡ɕan̪toːஷm. Two reasons:grantha.jsonheld only the six bare consonants (ஜ், ஷ், …). A Grantha letter with a vowel (ஜ, ஜா, ஷோ) was never mapped, even with{ grantha: true }.tuஷ்pirayōkam.Change
grantha.jsonhas the same shape asscript.json: one row per Grantha consonant (ஜ், ஶ், ஷ், ஸ், ஹ், க்ஷ்), with the dead consonant followed by its 12 vowel forms.indexcontinues fromscript.json(247–324). I generated the rows from the six existing consonants andscript.json's vowel row, nothing typed by hand.{ grantha: false }keeps the old behaviour. The only change inindex.tsis that default; the lookup is unchanged.granthaScriptsnapshot and its shape (6 rows × 13), plus words with Grantha syllables.Breaking
granthaScriptrows grow from 1 entry to 13.So this should be released as 1.0.0. I'll open the release pull request once this is merged, as
CLAUDE.mddescribes. learn-tamil.com only looks letters up with.flat().find(...), so the shape change doesn't affect it.Note: ஸ்ரீ gives
srī, not the conventionalśrī. It's written with ஸ (s), and I didn't add a special case.Checks
pnpm test(8 passed,scriptsnapshot unchanged, newgranthaScriptsnapshot),pnpm eslint,pnpm tsc --noEmitandpnpm format --checkall pass.