Skip to content

Commit

Permalink
Fix: Fix for the non-English character generation of Anchor Link (#2045)
Browse files Browse the repository at this point in the history
* Fix: Fix for the non-English character generation of Anchor Link

I. In the recent days we've fixed the non-English character generation
of anchor link by directly using the pure HTML tags, however a better
way is:

1) Check whether the current title has the comment symbol (<!---->).
2) If yes, just take the characters out of the symbol as the anchor
link's name, with the real text as the title behind it.
3) If not, just do replacements as what it used to be.

The advantage is that you can keep the anchor link the same as what
it is in the English version or define by yourself. What's more: It's
much more flexible when your change the level of titles, compared with
#2028.

II. Add '--fix' for local test to automatically fix some simple
formation typo errors.

* fix_comment
  • Loading branch information
Maledong authored and fhemberger committed Feb 9, 2019
1 parent 1b7fe43 commit 5747b3a
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 71 deletions.
36 changes: 18 additions & 18 deletions locale/ar/about/working-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ title: مجموعات العمل
## مجموعات العمل الحالية

* [addon API](#addon-api)
* [القياس](#القياس)
* [البناء](#البناء)
* [التشخيص](#التشخيص)
* [دوكر](#دوكر)
* [التوعية](#التوعية)
* [القياس](#benchmarking)
* [البناء](#build)
* [التشخيص](#diagnostics)
* [دوكر](#docker)
* [التوعية](#evangelism)
* [i18n](#i18n)
* [الإصدارات](#الإصدارات)
* [الحماية](#الحماية)
* [التدفق](#التدفق)
* [الموقع](#الموقع)
* [الإصدارات](#release)
* [الحماية](#security)
* [التدفق](#streams)
* [الموقع](#website)

### [addon-api](https://github.com/nodejs/nan)

Expand All @@ -38,7 +38,7 @@ title: مجموعات العمل
يمكنك الإطلاع على القائمة الحالية للاعضاء هنا:
[README](https://github.com/nodejs/nan#collaborators).

### [القياس](https://github.com/nodejs/benchmarking)
### <!--benchmarking-->[القياس](https://github.com/nodejs/benchmarking)

يتمثل الغرض من مجموعة القياس الحصول على توافق حول مجموعة من المعايير المتفق عليها و الخاصة بالأداء التي يمكن استعمالها لأجل:

Expand All @@ -51,7 +51,7 @@ title: مجموعات العمل
* إضافة تنفيذ دوري لجملة من المعايير المختارة لنسخ Node.js
* تتبع و نشر نتائج الأداء بين مختلف الاصدارات و النسخ المبنية

### [البناء](https://github.com/nodejs/build)
### <!--build-->[البناء](https://github.com/nodejs/build)

إن غرض مجموعة البناء هو إنشاء و صيانة بنية تحتية مؤتمتة و موزعة.

Expand All @@ -61,7 +61,7 @@ title: مجموعات العمل
* إجراء اختبارات الأداء و المقارنات.
* إنشاء و تسيير حاويات البناء

### [التشخيص](https://github.com/nodejs/diagnostics)
### <!--diagnostics-->[التشخيص](https://github.com/nodejs/diagnostics)

تهدف مجموعة التشخيص إلى تحديد مجموعة من واجهات التشخيص المحددة و الموثقة و القابلة للتوسع لاستعمالها من طرف أدوات Node.js و بيئات جافاسكريبت الإفتراضية.

Expand All @@ -76,7 +76,7 @@ title: مجموعات العمل
* تحديد و إضافة واجهات / واجهات برمجة تطبيقات لتمكين توليد مقالب عند الحاجة.
* تحديد و إضافة هيكلية مشتركة للمقالب التي تم توليدها، و ذلك لأجل دعم الأدوات التي تهدف لاستقصاء تلك المقالب.

### [دوكر](https://github.com/nodejs/docker-node)
### <!--docker-->[دوكر](https://github.com/nodejs/docker-node)

إن غرض مجموعة العمل الخاصة بالدوكر هو بناء وصيانة وتحسين اسطوانات الدوكر الرسمية لمشروع Node.js.

Expand All @@ -85,7 +85,7 @@ title: مجموعات العمل
* اتخاذ القرارات المتعلقة بتحسين و تطبيق الاسطوانات و / أو إجراء اصلاحات عليها.
* صيانة و تحسين التوثيق الخاص بهذه الاسطوانات.

### [التوعية](https://github.com/nodejs/evangelism)
### <!--evangelism-->[التوعية](https://github.com/nodejs/evangelism)

تقوم مجموعة التوعية بإبراز انجازات Node.js و تسمح للمجتمع بمعرفة كيفية المساهمة في المشروع.

Expand Down Expand Up @@ -145,7 +145,7 @@ title: مجموعات العمل
* [nodejs-uk - Ukrainian (Українська)](https://github.com/nodejs/nodejs-uk)
* [nodejs-vi - Vietnamese (Tiếng Việt)](https://github.com/nodejs/nodejs-vi)

### [الإصدارات الطويلة الأمد](https://github.com/nodejs/LTS)
### <!--release-->[الإصدارات الطويلة الأمد](https://github.com/nodejs/LTS)
تقوم هذه المجموعة بإدارة عمليات الأصدار للنسخ الجديدة من Node.js.

تشمل مسؤولياتها:
Expand All @@ -156,7 +156,7 @@ title: مجموعات العمل
* تولي تسيير الدعم طويل الأمد و الفروع الحالية، بما في ذلك إدماج التغييرات اللازمة لتلك الفروع
* تحديد السياسة المتعلقة بما سيتم اضافته للاصدارات

### [الحماية](https://github.com/nodejs/security-wg)
### <!--security-->[الحماية](https://github.com/nodejs/security-wg)

تتولى مجموعة الحماية جميع المسائل المرتبطة بتأمين Node.js.

Expand All @@ -177,7 +177,7 @@ title: مجموعات العمل
* التوصية بالتحسينات الأمنية للمشروع الأساسي للنود جي اس.
* تسهيل و ترويج توسع الخدمات الأمنية القوية و النظام البيئي لموفر المنتجات

### [التدفق](https://github.com/nodejs/readable-stream)
### <!--streams-->[التدفق](https://github.com/nodejs/readable-stream)
تكرس هذه المجموعة عملها لدعم و تحسين واجهات برمجة التطبيقات الخاص بالتدفقات في النظام البيئي للنود جي اس و مدير حزم النود. نحن نهدف لخلق واجهات برمجة تطبيقات قابلة للتركيب و تحل مشكلة تمثيل حدث مرات عدة بطريقة معروفة وسهلة. يتم إدخال التحسينات على واجهة برمجة التطبيق حسب حاجة النظام البيئي. إن العمليات المشتركة إضافة إلى التوافق مع الإصدارات الاقدم مع حلول أخرى هي مهمة المجموعة.

تشمل المسؤوليات:
Expand All @@ -189,7 +189,7 @@ title: مجموعات العمل
* التوصية بإدراج نسخ الـ `readable-stream` ضمن Node.js.
* التراسل حول مستقبل التدفقات لإعطاء المجتمع لمحة مسبقة عن التغييرات.

### [الموقع](https://github.com/nodejs/nodejs.org)
### <!--website-->[الموقع](https://github.com/nodejs/nodejs.org)

تهدف مجموعة العمل الخاصة بالموقع إلى تطوير وصيانة الموقع المتاح للعموم الخاص بمشروع Node.js.

Expand Down
12 changes: 6 additions & 6 deletions locale/ar/download/package-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ title: Installing Node.js via package manager
* [NetBSD](#netbsd)
* [nvm](#nvm)
* [OpenBSD](#openbsd)
* [openSUSE and SLE](#opensuse-and-sle)
* [openSUSE و SLE](#opensuse-and-sle)
* [macOS](#macos)
* [SmartOS و illumos](#smartos-and-illumos)
* [Solus](#solus)
Expand All @@ -26,7 +26,7 @@ title: Installing Node.js via package manager

----------------------------

<h2>آندرويد<a name="android" class="anchor" href="#android" ></a></h2>
## <!--android-->آندرويد

لا يزال دعم النود جي اس على الاندرويد قيد التجربة، لذلك فإن الملفات الثنائية المنتجة قبلا لا تزال غير متوفرة من قبل مطوري النود جي اس.

Expand All @@ -46,7 +46,7 @@ pkg install nodejs
pacman -S nodejs npm
```

<h2>التوزيعات المبنية على ديبيان أو اوبنتو، لينكس للمؤسسات / فيدورا و حزم سناب<a name="debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages" class="anchor" href="#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages"></a></h2>
## <!--debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages-->التوزيعات المبنية على ديبيان أو اوبنتو، لينكس للمؤسسات / فيدورا و حزم سناب

يتم توفير [الملف الثنائي الرسمي للنود جي اس](https://github.com/nodesource/distributions/blob/master/README.md) من قبل NodeSource.

Expand Down Expand Up @@ -124,7 +124,7 @@ $ nvm uninstall 8
pkg_add node
```

## openSUSE and SLE
## <!--opensuse-and-sle-->openSUSE و SLE

يتوفر النود جي اس في المستودعات الرئيسية تحت الحزم الاتية:

Expand Down Expand Up @@ -181,7 +181,7 @@ pkgin -y install nodejs
cd pkgsrc/lang/nodejs && bmake install
```

<h2>SmartOS و illumos<a name="smartos-and-illumos" class="anchor" href="#smartos-and-illumos"></a></h2>
## <!--smartos-and-illumos-->SmartOS و illumos

تأتي اسطوانة SmartOS مثبتة افتراضيا مع pkgsrc. على توزيعات أخرى من illumos، قم بتثبيت **[pkgsrc](https://pkgsrc.joyent.com/install-on-illumos/)** أولا و عندها يمكنك تثبيت الحزمة الثنائية اعتياديا:

Expand Down Expand Up @@ -213,7 +213,7 @@ sudo eopkg install nodejs
xbps-install -Sy nodejs
```

<h2>ويندوز<a name="windows" class="anchor" href="#windows"></a></h2>
## <!--windows-->ويندوز

قم بتحميل [المثبت الخاص بويندوز](https://nodejs.org/#download) مباشرة من موقع [nodejs.org](https://nodejs.org).

Expand Down
2 changes: 1 addition & 1 deletion locale/es/download/package-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pkgin -y install nodejs
cd pkgsrc/lang/nodejs && bmake install
```

## SmartOS e illumos
## SmartOS y illumos

Las imágenes de SmartOS vienen con pkgsrc pre-instalado. En otras distribuciones de illumos, primero instale **[pkgsrc](https://pkgsrc.joyent.com/install-on-illumos/)**, luego usted puede instalar el paquete binario de la manera usual:

Expand Down
12 changes: 6 additions & 6 deletions locale/ja/download/package-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ title: パッケージマネージャを利用した Node.js のインストー

* [Android](#android)
* [Arch Linux](#arch-linux)
* [Debian と Ubuntu ベースの Linux ディストリビューション、エンタープライズ Linux/Fedora と Snap パッケージ](#debian-ubuntu-linux-linux-fedora-snap)
* [Debian と Ubuntu ベースの Linux ディストリビューション、エンタープライズ Linux/Fedora と Snap パッケージ](#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages)
* [FreeBSD と OpenBSD](#freebsd-openbsd)
* [Gentoo](#gentoo)
* [NetBSD](#netbsd)
* [openSUSE と SLE](#opensuse-sle)
* [openSUSE と SLE](#opensuse-and-sle)
* [macOS](#macos)
* [SmartOS と illumos](#smartos-illumos)
* [SmartOS と illumos](#smartos-and-illumos)
* [Solus](#solus)
* [Void Linux](#void-linux)
* [Windows](#windows)
Expand Down Expand Up @@ -48,7 +48,7 @@ pacman -S nodejs npm
```


## Debian と Ubuntu ベースの Linux ディストリビューション、エンタープライズ Linux/Fedora と Snap パッケージ
## <!--debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages-->Debian と Ubuntu ベースの Linux ディストリビューション、エンタープライズ Linux/Fedora と Snap パッケージ

<!-- [Official Node.js binary distributions](https://github.com/nodesource/distributions/blob/master/README.md) are provided by NodeSource. -->
[Node.js 公式のバイナリディストリビューション](https://github.com/nodesource/distributions/blob/master/README.md)が NodeSource によって提供されています。
Expand Down Expand Up @@ -120,7 +120,7 @@ pkgin -y install nodejs


<!-- ## openSUSE and SLE -->
## openSUSE と SLE
## <!--opensuse-and-sle-->openSUSE と SLE

<!-- [Download Node.js via openSUSE one-click](http://software.opensuse.org/download.html?project=devel%3Alanguages%3Anodejs&package=nodejs). -->
[openSUSE one-click を利用して Node.js をダウンロード](http://software.opensuse.org/download.html?project=devel%3Alanguages%3Anodejs&package=nodejs)する。
Expand Down Expand Up @@ -185,7 +185,7 @@ cd pkgsrc/lang/nodejs && bmake install
```

<!-- ## SmartOS and illumos -->
## SmartOS と illumos
## <!--smartos-and-illumos-->SmartOS と illumos

<!-- SmartOS images come with pkgsrc pre-installed. On other illumos distributions, first install **[pkgsrc](https://pkgsrc.joyent.com/install-on-illumos/)**, then you may install the binary package as normal: -->
SmartOS のイメージには pkgsrc が付属しています。一方、illumos ディストリビューションの場合は、まず **[pkgsrc](https://pkgsrc.joyent.com/install-on-illumos/)** をインストールし、それから、通常通りバイナリパッケージをインストールすることが出来ます:
Expand Down
12 changes: 6 additions & 6 deletions locale/ko/download/package-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ title: 패키지 매니저로 Node.js 설치하기
* [NetBSD](#netbsd)
* [nvm](#nvm)
* [OpenBSD](#openbsd)
* [openSUSE와 SLE](#opensuse-and-sle)
* [openSUSE 와 SLE](#opensuse-and-sle)
* [macOS](#macos)
* [SmartOS와 illumos](#smartos-and-illumos)
* [SmartOS 와 illumos](#smartos-and-illumos)
* [Solus](#solus)
* [Void Linux](#void-linux)
* [Windows](#windows)
Expand All @@ -65,7 +65,7 @@ pkg install nodejs
Currently, Termux Node.js binaries are linked against `system-icu` (depending on `libicu` package).
-->
<h2>안드로이드<a name="android" class="anchor" href="#android"></a></h2>
## <!--android-->안드로이드

Node.js의 안드로이드 지원은 현재 시험 단계에 있기 때문에 Node.js 개발자들이 제공하는 미리 컴파일된 바이너리가 아직 없습니다.

Expand Down Expand Up @@ -99,7 +99,7 @@ pacman -S nodejs npm
[Official Node.js binary distributions](https://github.com/nodesource/distributions/blob/master/README.md) are provided by NodeSource.
-->
<h2>데비안과 우분투 기반 리눅스 배포판. 엔터프라이즈 리눅스/페도라와 Snap 패키지<a name="debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages" class="anchor" href="#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages"></a></h2>
## <!--debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages-->데비안과 우분투 기반 리눅스 배포판. 엔터프라이즈 리눅스/페도라와 Snap 패키지

[공식 Node.js 바이너리 배포판](https://github.com/nodesource/distributions/blob/master/README.md)은 NodeSource가 제공합니다.

Expand Down Expand Up @@ -284,7 +284,7 @@ zypper install nodejs4
```
-->

<h2>openSUSE와 SLE<a name="opensuse-and-sle" class="anchor" href="#opensuse-and-sle"></a></h2>
## <!--opensuse-and-sle-->openSUSE 와 SLE

다음 패키지 아래 주 저장소에서 Node.js를 사용할 수 있습니다.

Expand Down Expand Up @@ -398,7 +398,7 @@ Or build manually from pkgsrc:
cd pkgsrc/lang/nodejs && bmake install
```
-->
<h2>SmartOS와 illumoss<a name="smartos-and-illumos" class="anchor" href="#smartos-and-illumos"></a></h2>
## <!--smartos-and-illumos-->SmartOS 와 illumoss

SmartOS 이미지에는 미리 설치된 pkgsrc가 포함되어 있습니다. illumos 배포판에서는 먼저
**[pkgsrc](https://pkgsrc.joyent.com/install-on-illumos/)**를 설치하고 평소처럼
Expand Down
20 changes: 7 additions & 13 deletions locale/zh-cn/download/package-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ pacman -S nodejs npm
```

<!--
请不要把此改成 ## 的形式,因为自动生成器会完全忽略非英语字符,导致生成的 anchor 名称与上面实际的名称不符合,导致无法正确跳转到所要的位置。
相关修复:https://github.com/nodejs/nodejs.org/pull/2028
If your title has non-English characters, please
put your anchor name into the comment symbol before
your real title.
-->
<h2>基于 Linux 的 Debian 和 Ubuntu 发行版,Enterprise Linux/Fedora 和 Snap packages<a name="debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages" class="anchor" href="#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages"></a></h2>
## <!--debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages--> 基于 Linux 的 Debian 和 Ubuntu 发行版,Enterprise Linux/Fedora 和 Snap packages

[Node.js 官方二进制发行版](https://github.com/nodesource/distributions/blob/master/README.md) 由 NodeSource 提供。

Expand Down Expand Up @@ -131,11 +132,8 @@ Node.js 也可以通过 ports 系统获取。
```bash
pkg_add node
```
<!--
请不要把此改成 ## 的形式,因为自动生成器会完全忽略非英语字符,导致生成的 anchor 名称与上面实际的名称不符合,导致无法正确跳转到所要的位置。
相关修复:https://github.com/nodejs/nodejs.org/pull/2028
-->
<h2>openSUSE 和 SLE<a name="opensuse-and-sle" class="anchor" href="#opensuse-and-sle"></a></h2>

## <!--opensuse-and-sle-->openSUSE 和 SLE

在以下安装包中,Node.js在以下主版本库中可用:

Expand Down Expand Up @@ -192,11 +190,7 @@ pkgin -y install nodejs
cd pkgsrc/lang/nodejs && bmake install
```

<!--
请不要把此改成 ## 的形式,因为自动生成器会完全忽略非英语字符,导致生成的 anchor 名称与上面实际的名称不符合,导致无法正确跳转到所要的位置。
相关修复:https://github.com/nodejs/nodejs.org/pull/2028
-->
<h2>SmartOS 和 illumos<a name="smartos-and-illumos" class="anchor" href="#smartos-and-illumos"></a></h2>
## <!--smartos-and-illumos-->SmartOS 和 illumos

SmartOS 镜像随 pkgsrc 预装。在其它的 illumos 发布版中,先安装 **[pkgsrc](https://pkgsrc.joyent.com/install-on-illumos/)**,然后你可以正常安装二进制文件包:

Expand Down
13 changes: 4 additions & 9 deletions locale/zh-tw/download/package-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ Node.js 及 npm 套件可由公有軟體庫取得。
```bash
pacman -S nodejs npm
```
<!--請不要把此改成 ## 的形式,因為自動產生器會完全忽略非英語字元,導致生成的 anchor 名稱與上面實際的名稱不符合,導致無法正確跳轉到所要的位置。
相關修復:https://github.com/nodejs/nodejs.org/pull/2028-->
<h2>Debian 及 Ubuntu 系列發行版,企業版 Linux/Fedora 和 Snap packages<a name="debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages" class="anchor" href="#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages"></a></h2>

## <!--debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages-->Debian 及 Ubuntu 系列發行版,企業版 Linux/Fedora 和 Snap packages

[官方 Node.js 二進制發行版](https://github.com/nodesource/distributions/blob/master/README.md) 透過 NodeSource 提供.

Expand Down Expand Up @@ -129,9 +128,7 @@ Node.js 可於 ports 系統中取得。
pkg_add node
```

<!--請不要把此改成 ## 的形式,因為自動產生器會完全忽略非英語字元,導致生成的 anchor 名稱與上面實際的名稱不符合,導致無法正確跳轉到所要的位置。
相關修復:https://github.com/nodejs/nodejs.org/pull/2028-->
<h2>openSUSE 及 SLE<a name="opensuse-and-sle" class="anchor" href="#opensuse-and-sle"></a></h2>
## <!--opensuse-and-sle-->openSUSE 及 SLE

主要軟體庫中都提供了下列套件:

Expand Down Expand Up @@ -189,9 +186,7 @@ pkgin -y install nodejs
cd pkgsrc/lang/nodejs && bmake install
```

<!--請不要把此改成 ## 的形式,因為自動產生器會完全忽略非英語字元,導致生成的 anchor 名稱與上面實際的名稱不符合,導致無法正確跳轉到所要的位置。
相關修復:https://github.com/nodejs/nodejs.org/pull/2028-->
<h2>SmartOS 及 illumos<a name="smartos-and-illumos" class="anchor" href="#smartos-and-illumos"></a></h2>
## <!--smartos-and-illumos-->SmartOS 及 illumos

SmartOS 映像檔已經預載了 pkgsrc,其他的 illumos 發行版則需要先**[安裝pkgsrc](https://pkgsrc.joyent.com/install-on-illumos/)**,接著你就可以依照平常的方式安裝二進制套件:

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"load-schedule": "curl -sS https://github.com/raw/nodejs/Release/master/schedule.json -o source/schedule.json",
"start": "npm run serve",
"test": "npm run test:lint && npm run test:unit && npm run test:smoke",
"test:lint": "standard && htmllint **/*.hbs && stylint layouts/css",
"test:lint": "standard --fix && htmllint **/*.hbs && stylint layouts/css",
"test:unit": "tape tests/**/*.test.js | faucet",
"test:smoke": "tape tests/*.smoketest.js | faucet"
},
Expand Down
Loading

0 comments on commit 5747b3a

Please sign in to comment.