Minimal reference implenentation of Markdown Localization Specification
To install or update mdlm, you should run the install script. To do that, you may either download and run the script manually, or use the following cURL for Bash:
curl -o- https://raw.githubusercontent.com/markdown-localization/mdlm-sh/v0.0.20/install.sh | bash
Or zsh:
curl -o- https://raw.githubusercontent.com/markdown-localization/mdlm-sh/v0.0.20/install.sh | zsh
Running either of the above commands downloads a script and runs it. The script copies mdlm script to ~/.mdlm
, and attempts to add the source lines from the snippet below to the correct profile file (~/.bash_profile
, ~/.bashrc
or ~/.zshrc
).
export MDLM_DIR="$HOME/.mdlm"
alias mdlm='$MDLM_DIR/mdlm.sh'
$ mdlm search
aa (Afaraf) - Afar
ab (Аҧсуа) - Abkhazian
ae (Avesta) - Avestan
af (Afrikaans) - Afrikaans
ak (Akan) - Akan
am (አማርኛ) - Amharic
an (Aragonés) - Aragonese
ar (العَرَبِيَّة) - Arabic
as (অসমীয়া) - Assamese
av (Авар) - Avaric
$ mdlm search uz
uz (Ўзбек) Uzbek
uz-Cyrl (Ўзбек) Uzbek in Cyrillic script
uz-Latn (O‘zbekcha) Uzbek in Latin script
$ mdlm add eo
Creating new localization files for locale - "eo (Esperanto) - Esperanto":
Creating example/README-eo.md. Confirm? [Y/n]
- Created.
Creating README-eo.md. Confirm? [Y/n]
- Created.
Finished. Total files created: 2
As a result, new README-eo.md file will be created. Localization switcher header will be added to original and localized files.
$ mdlm rm eo --yes
Removing localization files for locale - "eo (Esperanto) - Esperanto":
Removing README-eo.md.
- Removed.
Removing example/README-eo.md.
- Removed.
Localization files removed.
As a result, README-eo.md will be removed. Localization switcher header will be updated, or removed, if no other localizations available. Optional --yes
automatically sets yes to all prompts.
$ mdlm status
Localization status for all locales.
example/README.md (English):
* example/README-ru.md (Русский) - synced.
* example/README-ar.md (العَرَبِيَّة) - synced.
* example/README-zh-Hans.md (简体中文) - synced.
* example/README-es.md (Español) - outdated.
* example/README-fr.md (Français) - synced.
README.md (English):
* README-ru.md (Русский) - synced.
Locale argument is optional.
$ mdlm diff es
Localization status for: es (Español) - Spanish.
- example/README-es.md (Español) - outdated.
5c4,5
< Here is an outdated text of example.
---
> Here is a text of example.
>
See CONTRIBUTING.md
Special thanks to nvm-sh/nvm for inpsiration and specifics.