Skip to content

Commit

Permalink
Merge pull request #19 from voitau/master
Browse files Browse the repository at this point in the history
Update section to p
  • Loading branch information
voitau authored Apr 3, 2020
2 parents eb5ed26 + 1992761 commit 2b7c8cd
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Minimal reference implenentation of [Markdown Localization Specification](https:

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 or Wget command:
```sh
curl -o- https://raw.githubusercontent.com/markdown-localization/mdlm-sh/v0.0.15/install.sh | bash
curl -o- https://raw.githubusercontent.com/markdown-localization/mdlm-sh/v0.0.16/install.sh | bash
```
```sh
wget -qO- https://raw.githubusercontent.com/markdown-localization/mdlm-sh/v0.0.15/install.sh | bash
wget -qO- https://raw.githubusercontent.com/markdown-localization/mdlm-sh/v0.0.16/install.sh | bash
```
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`, or `~/.bashrc`).

Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{ # this ensures the entire script is downloaded #

MDLM_VERSION="0.0.15"
MDLM_VERSION="0.0.16"
MDLM_REMOTE_FILE="https://raw.githubusercontent.com/markdown-localization/mdlm-sh/v${MDLM_VERSION}/mdlm.sh"

mdlm_echo() {
Expand Down
12 changes: 6 additions & 6 deletions mdlm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
#
# Functions:
# - mdlm_* - custom functions.
MDLM_VERSION="0.0.15"
MDLM_VERSION="0.0.16"

DEFAULT_LCM_LOCAL="English"

MDLM_HEADER="<!-- l10n:select -->"

MDLM_SECTION_OPEN="<!-- l10n:section"
MDLM_SECTION_CLOSE="l10n:section -->"
MDLM_P_OPEN="<!-- l10n:p"
MDLM_P_CLOSE="l10n:p -->"
MDLM_P_TBD="TBD"

MDLM_IGNORE_START="<!-- l10n:ignore start -->"
Expand Down Expand Up @@ -130,7 +130,7 @@ mdlm_copy_original_to_localized_file() {
command echo "${HEADER}" > "${LCM_FILE}"
command grep -v "${MDLM_HEADER}" "${ORIG_FILE}" \
| sed -e "/$MDLM_IGNORE_START/,/$MDLM_IGNORE_END/d" \
| awk -v RS="(^|\n)#" -v popen="${MDLM_SECTION_OPEN}" -v pclose="${MDLM_SECTION_CLOSE}" -v ptbd="${MDLM_P_TBD}" \
| awk -v RS="(^|\n)#" -v popen="${MDLM_P_OPEN}" -v pclose="${MDLM_P_CLOSE}" -v ptbd="${MDLM_P_TBD}" \
'{ if ($0) print popen "\n#" $0 pclose "\n" ptbd "\n"}' >> "${LCM_FILE}"
}

Expand Down Expand Up @@ -285,8 +285,8 @@ mdlm_original_diff() {
diff --color="${USE_COLORS}" -B \
<(grep -v "${MDLM_HEADER}" "${2}" \
| sed \
-e "/${MDLM_SECTION_CLOSE}/,/${MDLM_SECTION_OPEN}/d" \
-e "/${MDLM_SECTION_OPEN}/d" \
-e "/${MDLM_P_CLOSE}/,/${MDLM_P_OPEN}/d" \
-e "/${MDLM_P_OPEN}/d" \
-e "/$MDLM_IGNORE_START/,/$MDLM_IGNORE_END/d") \
<(grep -v "${MDLM_HEADER}" "${1}" \
| sed \
Expand Down
8 changes: 4 additions & 4 deletions test/example-localized/README-ar.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
![l10n-sync-ar](https://github.com/markdown-localization/markdown-localization-spec/workflows/l10n-sync-ar/badge.svg)
<!-- l10n:ignore end -->

<!-- l10n:section
<!-- l10n:p
## Example A
Here is a text of example.
l10n:section -->
l10n:p -->
## المثال أ

هنا نص المثال. ترجم مع ترجمة جوجل.

<!-- l10n:section
<!-- l10n:p
### References
Some references here.
l10n:section -->
l10n:p -->
### المراجع

بعض المراجع هنا.
8 changes: 4 additions & 4 deletions test/example-localized/README-es.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
![l10n-sync-es](https://github.com/markdown-localization/markdown-localization-spec/workflows/l10n-sync-es/badge.svg)
<!-- l10n:ignore end -->

<!-- l10n:section
<!-- l10n:p
## Example A
Here is an outdated text of example.
l10n:section -->
l10n:p -->
## Ejemplo A

Aquí hay un texto de ejemplo. Traducido con Google Translate.

<!-- l10n:section
<!-- l10n:p
### References
Some references here.
l10n:section -->
l10n:p -->
### Referencias

Algunas referencias aquí.
8 changes: 4 additions & 4 deletions test/example-localized/README-fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
![l10n-sync-fr](https://github.com/markdown-localization/markdown-localization-spec/workflows/l10n-sync-fr/badge.svg)
<!-- l10n:ignore end -->

<!-- l10n:section
<!-- l10n:p
## Example A
Here is a text of example.
l10n:section -->
l10n:p -->
## Exemple A

Voici un texte d'exemple. Traduit avec Google Translate.

<!-- l10n:section
<!-- l10n:p
### References
Some references here.
l10n:section -->
l10n:p -->
### Les références

Quelques références ici.
8 changes: 4 additions & 4 deletions test/example-localized/README-ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
![l10n-sync-ru](https://github.com/markdown-localization/markdown-localization-spec/workflows/l10n-sync-ru/badge.svg)
<!-- l10n:ignore end -->

<!-- l10n:section
<!-- l10n:p
## Example A
Here is a text of example.
l10n:section -->
l10n:p -->
## Пример А

Здесь находится текст примера.

<!-- l10n:section
<!-- l10n:p
### References
Some references here.
l10n:section -->
l10n:p -->

### Ссылки

Expand Down
8 changes: 4 additions & 4 deletions test/example-localized/README-zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
![l10n-sync-zh-Hans](https://github.com/markdown-localization/markdown-localization-spec/workflows/l10n-sync-zh-Hans/badge.svg)
<!-- l10n:ignore end -->

<!-- l10n:section
<!-- l10n:p
## Example A
Here is a text of example.
l10n:section -->
l10n:p -->
## 示例A

这是一个示例文本。 用Google翻译翻译。

<!-- l10n:section
<!-- l10n:p
### References
Some references here.
l10n:section -->
l10n:p -->
### 参考

这里有一些参考。
8 changes: 4 additions & 4 deletions test/example-original/README-fr.md.en-it-fr.expected
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[English](README.md) | **[Français](README-fr.md)** | [Italiano](README-it.md) | *[Add](https://github.com/markdown-localization/markdown-localization-spec#workflow)* <!-- l10n:select -->
<!-- l10n:section
<!-- l10n:p
## Example A

Here is a text of example.
l10n:section -->
l10n:p -->
TBD

<!-- l10n:section
<!-- l10n:p
### References

Some references here.
l10n:section -->
l10n:p -->
TBD

8 changes: 4 additions & 4 deletions test/example-original/README-it.md.en-it-fr.expected
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[English](README.md) | [Français](README-fr.md) | **[Italiano](README-it.md)** | *[Add](https://github.com/markdown-localization/markdown-localization-spec#workflow)* <!-- l10n:select -->

<!-- l10n:section
<!-- l10n:p
## Example A

Here is a text of example.
l10n:section -->
l10n:p -->
TBD

<!-- l10n:section
<!-- l10n:p
### References

Some references here.
l10n:section -->
l10n:p -->
TBD

8 changes: 4 additions & 4 deletions test/example-original/README-it.md.en-it.expected
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[English](README.md) | **[Italiano](README-it.md)** | *[Add](https://github.com/markdown-localization/markdown-localization-spec#workflow)* <!-- l10n:select -->

<!-- l10n:section
<!-- l10n:p
## Example A

Here is a text of example.
l10n:section -->
l10n:p -->
TBD

<!-- l10n:section
<!-- l10n:p
### References

Some references here.
l10n:section -->
l10n:p -->
TBD

0 comments on commit 2b7c8cd

Please sign in to comment.