Nodejs.org: /about/working-groups anchors don't work when translated to Arabic

Created on 2 Jan 2019  Â·  8Comments  Â·  Source: nodejs/nodejs.org

Hello everyone.
When we translated the about/working-groups.md to Arabic language, the anchor tags that lead to the different parts of the page stopped working.

en
url : /en/about/working-groups/#diagnostics

<h3 id="header-diagnostics">
<a href="https://github.com/nodejs/diagnostics">Diagnostics</a>
<a name="diagnostics" class="anchor" href="#diagnostics" aria-labelledby="header-diagnostics"></a>
</h3>

ar
url : /ar/about/working-groups/#التشخيص

<h3 id="header-">
<a href="https://github.com/nodejs/diagnostics">التشخيص</a>
<a name="" class="anchor" href="#" aria-labelledby="header-"></a>
</h3>

Are there any solutions?

@nodejs/node-ar
@celyes @InterstellarClub

All 8 comments

add regexp unicode
for Arabic language
0600-06FF --> "Arabic"

/scripts/plugins/anchor-markdown-headings.js:6:14

@celyes @InterstellarClub

IMO:I also found this problem and I tended to fix that in the code, but consider there're too many non-English characters in translations (the typical is something like CJK or others...). So in the end I had to use a pair of pure Html to do with the anchor link to keep the English characters as the anchor name as well. Yours is also fixed at #2034.

Ref:https://github.com/nodejs/nodejs.org/pull/2028

thank you @Maledong
IMO: easy way to change just range of Arabic Unicode not all anchors, the range so small.

Thanks for your suggestions and in order to keep all the changes in union (Keep the anchor name in English). I take the 2nd choice. :)

IMO:I also found this problem and I tended to fix that in the code, but consider there're too many non-English characters in translations (the typical is something like CJK or others...). So in the end I had to use a pair of pure Html to do with the anchor link to keep the English characters as the anchor name as well. Yours is also fixed at #2034.

Ref:#2028

Still not working with Arabic.
@Aissaoui-Ahmed has managed to solve the problem programmatically.
@Maledong , @InterstellarClub

@celyes:If you see the Nodejs (Arabic), we use a pure HTML tag to point out the anchor link with its English name (See: https://nodejs.org/ar/download/package-manager/).

If you click titles like this following:
image

You'll be directly guided here:
image

Click any Ararbic title, you'll be directly guided where you go, so this problem should be solved.

The problem is that if I'm using PURE HTML, this method isn't so flexible. What I want is: Trying to keep "##" as the header-style, and then keep the pure English anchor name, and we should also support CJK characters.

See: https://github.com/nodejs/nodejs.org/pull/2045

@celyes:An advantage is that you can use pure English as the anchor name , with your own language as the title, this can support all kinds of non-English languages with the English anchor name to keep the same as the English version.

@Aissaoui-Ahmed:The latest solution to the non-English language is #2045, we can keep the origin English as the anchor name by using <!--TheEnglishAnchorName-->, with the title as your own language name.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

celyes picture celyes  Â·  5Comments

luminoso picture luminoso  Â·  3Comments

khaosdoctor picture khaosdoctor  Â·  6Comments

julianduque picture julianduque  Â·  4Comments

JungMinu picture JungMinu  Â·  8Comments