Skip to content

Commit 64581fc

Browse files
Update CONTRIBUTING.md and CONTRIBUTING-it.md with RTL/LTR linter error fixing guidelines
Added a section to CONTRIBUTING.md and CONTRIBUTING-it.md explaining how to fix RTL/LTR Markdown linter errors, including when to use ‏ and ‎ with practical examples for contributors working on files with mixed RTL and LTR text
1 parent 4159bc9 commit 64581fc

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

docs/CONTRIBUTING-it.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,52 @@ Se riesci a stamparlo e conservarne l'essenza, non è un tutorial interattivo.
262262
263263
- È possibile specificare più di un file da controllare, utilizzando un singolo spazio per separare ogni voce.
264264
- Se specifichi più di un file, i risultati della build si basano sul risultato dell'ultimo file controllato. Dovresti essere consapevole che potresti ottenere il passaggio di build verdi a causa di ciò, quindi assicurati di ispezionare il registro di build alla fine della Pull Request facendo clic su "Show all checks" -> "Details".
265+
266+
267+
### Come risolvere gli errori del linter RTL/LTR
268+
269+
Se viene eseguito il linter RTL/LTR Markdown Linter (sui file `*-ar.md`, `*-he.md`, `*-fa.md`, `*-ur.md`) e si vedono errori o warning:
270+
271+
- **Parole LTR** (ad esempio "HTML", "JavaScript") in testo RTL: aggiungi `‏` immediatamente dopo ogni segmento LTR;
272+
- **Simboli LTR** (ad esempio "C#", "C++"): aggiungi `‎` immediatamente dopo ogni simbolo LTR;
273+
274+
#### Esempi
275+
276+
**SCORRETTO**
277+
```html
278+
<div dir="rtl" markdown="1">
279+
* [كتاب الأمثلة في R](URL) - John Doe (PDF)
280+
</div>
281+
```
282+
**CORRETTO**
283+
```html
284+
<div dir="rtl" markdown="1">
285+
* [كتاب الأمثلة في R&rlm;](URL) - John Doe&rlm; (PDF)
286+
</div>
287+
```
288+
---
289+
**SCORRETTO**
290+
```html
291+
<div dir="rtl" markdown="1">
292+
* [Tech Podcast - بودكاست المثال](URL) – Ahmad Hasan, محمد علي
293+
</div>
294+
```
295+
**CORRETTO**
296+
```html
297+
<div dir="rtl" markdown="1">
298+
* [Tech Podcast - بودكاست المثال](URL) – Ahmad Hasan,&rlm; محمد علي
299+
</div>
300+
```
301+
---
302+
**SCORRETTO**
303+
```html
304+
<div dir="rtl" markdown="1">
305+
* [أساسيات C#](URL)
306+
</div>
307+
```
308+
**CORRETTO**
309+
```html
310+
<div dir="rtl" markdown="1">
311+
* [أساسيات C#&lrm;](URL)
312+
</div>
313+
```

docs/CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,52 @@ If you can print it out and retain its essence, it's not an Interactive Tutorial
286286
287287
- You may specify more than one file to check, using a single space to separate each entry.
288288
- If you specify more than one file, results of the build are based on the result of the last file checked. You should be aware that you may get passing green builds due to this so be sure to inspect the build log at the end of the Pull Request by clicking on "Show all checks" -> "Details".
289+
290+
291+
### Fixing RTL/LTR linter errors
292+
293+
If you run the RTL/LTR Markdown Linter (on `*-ar.md`, `*-he.md`, `*-fa.md`, `*-ur.md` files) and see errors or warnings:
294+
295+
- **LTR words** (e.g. “HTML”, “JavaScript”) in RTL text: append `&rlm;` immediately after each LTR segment;
296+
- **LTR symbols** (e.g. “C#”, “C++”): append `&lrm;` immediately after each LTR symbol;
297+
298+
#### Examples
299+
300+
**BAD**
301+
```html
302+
<div dir="rtl" markdown="1">
303+
* [كتاب الأمثلة في R](URL) - John Doe (PDF)
304+
</div>
305+
```
306+
**GOOD**
307+
```html
308+
<div dir="rtl" markdown="1">
309+
* [كتاب الأمثلة في R&rlm;](URL) - John Doe&rlm; (PDF)
310+
</div>
311+
```
312+
---
313+
**BAD**
314+
```html
315+
<div dir="rtl" markdown="1">
316+
* [Tech Podcast - بودكاست المثال](URL) – Ahmad Hasan, محمد علي
317+
</div>
318+
```
319+
**GOOD**
320+
```html
321+
<div dir="rtl" markdown="1">
322+
* [Tech Podcast - بودكاست المثال](URL) – Ahmad Hasan,&rlm; محمد علي
323+
</div>
324+
```
325+
---
326+
**BAD**
327+
```html
328+
<div dir="rtl" markdown="1">
329+
* [أساسيات C#](URL)
330+
</div>
331+
```
332+
**GOOD**
333+
```html
334+
<div dir="rtl" markdown="1">
335+
* [أساسيات C#&lrm;](URL)
336+
</div>
337+
```

0 commit comments

Comments
 (0)