Skip to content

transliteration after translation to traditional version of indian/nepal/srilanka/bangladesh languages#542

Open
zawa8 wants to merge 3 commits into
translate-tools:masterfrom
zawa8:hscii
Open

transliteration after translation to traditional version of indian/nepal/srilanka/bangladesh languages#542
zawa8 wants to merge 3 commits into
translate-tools:masterfrom
zawa8:hscii

Conversation

@zawa8
Copy link
Copy Markdown

@zawa8 zawa8 commented May 17, 2025

Problem

indian/nepal/srilanka/bangladesh languages are traditional with their matra systems.
so in these countries hindi/marathi/nepali/telugu/bangla/kannada/malayalam/tamil/punjabi/gujarati/sinhala are generally written using latin small case alphabets. so please consider doing transliteration after translation to traditional version of these languages.

using htrlib transliteration lib , i tested and created hscii linguist branch.
with this these languages are not only translated ( example english -> hindi ) but after translation to traditional hindi , transliterated also. so that all can read translated+transliterated pages easily.

How this change fixes it

// linguist/src/app/ContentScript/PageTranslator/PageTranslator.tsx
// linguist/site/translateLocales.ts
import { hsciistr } from 'htrlib';
const hsciistrobz = new hsciistr(hsciistr.from_dikt.ascii_and_indik, hsciistr.tu_dikt.inglish,);
const indiklcodes = ['hi', 'gu', 'pa', 'bn', 'si', 'or', 'kn', 'ml', 'tl', 'ta', ];
return translate(text, from, to, { priority }).then((translatedText) => {
......
if (indiklcodes.includes(to)) { translatedText = hsciistrobz.setistr(translatedText).duztr().istr; }
return translatedText;
})

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