Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change names of Brahmic Scripts as per Unicode #36

Open
ManasMadrecha opened this issue Jun 30, 2021 · 1 comment
Open

Change names of Brahmic Scripts as per Unicode #36

ManasMadrecha opened this issue Jun 30, 2021 · 1 comment

Comments

@ManasMadrecha
Copy link

ManasMadrecha commented Jun 30, 2021

Why?

  1. Unicode already has done the standardization of what the scripts should be called.
  2. It is duplicate work to maintain a separate Array of "sanscript" specific names of scripts.
  3. Using Intl.DisplayNames in JS, we can easily get the standard names of the script. These can then be programmatically inserted into Sanscript.t(text, "here", "here")
  4. Unicode specific scripts' names can also be easily inserted into HTML's lang attribute like hi-Deva or hi-Latn.
  5. Having sanscript's scripts' names like devanagari, bengali, etc. serves no purpose. They cannot be used inside HTML's lang. Also, we if anyway want the full names of the scripts we can always use Intl.DisplayNames. But this doesn't work with sanscript's scripts' names
  6. For the scripts which doesn't have Unicode support, only those should be kept the same as being currently used, as they will never be used inside HTML's lang anyway, e.g. sanskritOCR

Approach

Of course, this will be a breaking change, so for the time being, you can simply copy+paste the current .json files inside the brahmic folder into Unicode-based names.

For e.g., for gujarati, bengali, etc. scripts, you can create new Gujr.json, Beng.json files with the same content as the gujarati.json, bengali.json, respectively.

@ManasMadrecha ManasMadrecha changed the title Change names of Scripts as per Unicode Change names of Brahmic Scripts as per Unicode Jun 30, 2021
@vvasuki
Copy link
Member

vvasuki commented Jun 30, 2021

Let's make this a non-breaking change by ensuring the following:

  • All script names in use in the library conform to Intl.DisplayNames. (One must add a comment in the code to this effect.)
  • In Sanscript.t, handle old names by mapping to any new names from the previous step.
  • In Sanscript.t, handle hi-Deva etc. by mapping to Intl.DisplayNames.

If the above is clear, please go ahead and send a pull request.

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

No branches or pull requests

2 participants