jupyter-book / myst-spec

MyST is designed to create publication-quality, computational documents written entirely in Markdown.
https://mystmd.org/spec
MIT License
14 stars 6 forks source link

Avoiding english keywords (where possible) #56

Open chrisjsewell opened 1 year ago

chrisjsewell commented 1 year ago

If we wish MyST to be a "global" spec, then I think it should strive to meet:

avoiding syntax keywords that are hard-coded English

Granted, this is very difficult, especially with roles and directives (and their options), but when thinking about new features, syntax extension etc, I think we should always bear this in mind

One thing in particular to note, is that currently the myst-spec, and by extension mystjs, hard-codes directive names to be english. This is not the case for docutils directives, which have a translation module https://github.com/docutils/docutils/tree/master/docutils/docutils/parsers/rst/languages, so for example you can do this:

$ echo ":::{tip}\nhi\n:::" | myst-docutils-demo --myst-enable-extensions=colon_fence
<aside class="admonition tip">
<p class="admonition-title">Tip</p>
<p>hi</p>
</aside>

$ echo ":::{astuce}\nhi\n:::" | myst-docutils-demo --language=fr --myst-enable-extensions=colon_fence
<aside class="admonition tip">
<p class="admonition-title">Astuce</p>
<p>hi</p>
</aside>

I wanted to bring this up, especially as we were recently talking about admonitions: #49

rowanc1 commented 1 year ago

Love it.

Some other links: