free-programming-books/docs
Gabriele Ciccotelli caa05be694
Add RTL/LTR Markdown linter for mixed-direction text consistency and PR annotation (#11877)
* Add RTL/LTR Markdown linter for mixed-direction text consistency and PR annotation

Introduce a Python-based linter (scripts/rtl_ltr_linter.py) to automatically detect and annotate issues related to mixed Right-To-Left (RTL) and Left-To-Right (LTR) text in Markdown files. The linter analyzes list items, book entries, and metadata for potential bidirectional text rendering problems, such as missing Unicode directionality markers (RLM/LRM) and improper handling of LTR keywords or symbols in RTL contexts.

Key features:
- Scans all Markdown files in the repository, with full logs saved as workflow artifacts.
- Annotates only changed or added lines in pull requests, providing targeted feedback in the GitHub Actions Job Summary.
- Detects common RTL/LTR issues, including:
  - Missing directionality markers after LTR keywords (e.g., "HTML") or symbols (e.g., "C#") in RTL text.
  - BIDI (bidirectional) mismatches that may affect text display.
  - Incorrect ordering of author names and metadata in RTL contexts.
- Configurable via rtl_linter_config.yml for keywords, symbols, and severity levels.
- Includes a GitHub Actions workflow (rtl-ltr-linter.yml) for automated checks on PRs.

* Add test cases for RTL/LTR linter in English and Arabic book lists

Add sample entries to free-programming-books-en.md and free-programming-books-ar.md to test the RTL/LTR Markdown linter.
These test cases include various combinations of RTL and LTR text, keywords, symbols, and metadata to verify that the linter correctly detects directionality issues and outputs the expected logs and annotations.

* Restore original book lists after RTL/LTR linter test cases

Revert test entries in free-programming-books-en.md and free-programming-books-ar.md, restoring the original book lists. This commit removes temporary test data used for validating the RTL/LTR Markdown linter, preparing the repository for merging the PR with a clean state.

No functional changes to the linter or configuration files; only test content has been removed.

* Update RTL/LTR linter workflow and script: run only on RTL file changes or "RTL" label, fail only on errors

The GitHub Actions workflow for the RTL/LTR Markdown linter now runs only if:
- The PR modifies .md files related to RTL languages (ar, he, fa, ur), or
- The PR has the "RTL" label.
The linter script has been updated to fail the check only if errors are found on changed lines, not for warnings.

* Only upload linter artifact if linter step runs

Prevent warning about missing artifact by uploading the linter output log only if the linter step was executed (success or failure). This avoids unnecessary warnings when the linter is skipped because no RTL files were changed and no RTL label is present.

* Test workflow: modify non-RTL markdown file

Modified free-programming-books-en.md to verify that the RTL/LTR linter workflow does not run when only non-RTL markdown files are changed and the "RTL" label is not present.

* Test workflow: modify RTL markdown file to trigger linter

Modified free-programming-books-ar.md to verify that the RTL/LTR linter workflow runs as expected when an RTL markdown file is changed.

* Fix RTL/LTR BIDI issues in some markdown files

Applied directional markers (‎, ‏) and other formatting fixes to resolve BIDI (bidirectional text) errors and warnings reported by the linter in several .md files.

* Fix workflow: upload linter log only if linter step has not been skipped

Updated the workflow to upload the linter output artifact only when the linter step was actually executed (not skipped)

* Add debug step to check linter outcome in workflow

Added a debug step after the linter execution in the workflow to print the outcome and conclusion of the run_linter step.

* Set continue-on-error for linter step to allow artifact upload and debug

* Remove workflow debug step and update markdown file

Removed the debug step from the RTL/LTR linter workflow and applied further changes to a markdown file.

* Fix RTL/LTR BIDI issues in some markdown files

Applied directional markers (‎, ‏) and other formatting fixes to resolve BIDI (bidirectional text) errors and warnings reported by the linter in several .md files. This commit is a second batch of corrections to improve RTL/LTR rendering and pass the linter checks.

* Fix RTL/LTR BIDI issues in some markdown files

Applied directional markers (‎, ‏) and other formatting fixes to resolve BIDI (bidirectional text) errors and warnings reported by the linter in several .md files. This commit is a third batch of corrections to improve RTL/LTR rendering and pass the linter checks.

* Do not produce log file if no issues found

Updated the linter script to avoid creating the log file when no issues, warnings, or notices are found. If no issues are detected, the script now prints a "::notice ::No issues found"

* Always print annotation with number of errors and warnings found

Updated the linter script to always print an annotation indicating how many errors and warnings were found, even if there are none.

* Fix: always print summary annotation with number of issues found

* Add a missing newline character at end of file free-courses-he.md

* Update linter configuration and revert markdown files to pre-fix state

Updated the organization of keywords and symbols in the linter configuration file. Reverted all markdown files to their original state prior to the fixes.

* Update free-programming-books-he.md with fixes

* Update free-programming-books-he.md with further fixes

* Update free-programming-books-he.md with fixes

* Update free-programming-books-fa_IR.md with fixes

* Update free-programming-books-he.md with further fixes

* Update free-programming-books-ar.md with fixes

* Update free-programming-books-ar.md with further fixes

* Update free-podcasts-screencasts-ar.md with fixes

* Update free-podcasts-screencasts-fa_IR.md with fixes

* Update free-courses-he.md with fixes

* Update free-courses-he.md with further fixes

* Update free-courses-fa_IR.md with fixes

* Update free-courses-fa_IR.md with further fixes

* Update free-courses-ar.md with fixes

* Update free-courses-ar.md with further fixes

* Update free-courses-ar.md with further fixes

* Update free-courses-ur.md with fixes

* Update some markdown files with further improvements

* Fix alignment of nested lists in free-programming-books-fa_IR.md

* 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
2025-05-28 10:46:25 -04:00
..
CODE_OF_CONDUCT-bn.md Updated code-of-conduct-bn with native translation. (bangla review requested) (#9816) 2023-10-04 21:47:26 -04:00
CODE_OF_CONDUCT-bs.md feat: Add docs/readme.md + update crosslinks (#6700) 2022-02-11 12:27:07 -05:00
CODE_OF_CONDUCT-de.md feat: Add docs/readme.md + update crosslinks (#6700) 2022-02-11 12:27:07 -05:00
CODE_OF_CONDUCT-el.md feat: Add docs/readme.md + update crosslinks (#6700) 2022-02-11 12:27:07 -05:00
CODE_OF_CONDUCT-es.md Corrections in the text (#7253) 2022-10-02 16:23:45 -04:00
CODE_OF_CONDUCT-fa_IR.md Fa_ir minor edits (Farsi feedback requested!) (#9640) 2023-10-02 09:53:52 -04:00
CODE_OF_CONDUCT-fil.md feat: Add docs/readme.md + update crosslinks (#6700) 2022-02-11 12:27:07 -05:00
CODE_OF_CONDUCT-fr.md feat: Add docs/readme.md + update crosslinks (#6700) 2022-02-11 12:27:07 -05:00
CODE_OF_CONDUCT-hi.md feat: Add docs/readme.md + update crosslinks (#6700) 2022-02-11 12:27:07 -05:00
CODE_OF_CONDUCT-id.md fix grammar in code_of_conduct-id.md (#10765) 2023-11-21 19:17:07 -05:00
CODE_OF_CONDUCT-it.md feat: Add docs/readme.md + update crosslinks (#6700) 2022-02-11 12:27:07 -05:00
CODE_OF_CONDUCT-ja.md Fix the brackets surrounding the link from full-width to half-width(ja) (#11486) 2024-10-12 11:44:18 -04:00
CODE_OF_CONDUCT-km.md Added: km code of conduct (khmer review requested) (#9967) 2023-10-09 21:08:48 -04:00
CODE_OF_CONDUCT-kn.md Kannada Docs (Waiting for resources) (#9072) 2023-10-09 12:15:54 -04:00
CODE_OF_CONDUCT-ko.md Fixed typo CODE_OF_CONDUCT-ko.md (korean review requested) (#10003) 2023-10-15 19:06:41 -04:00
CODE_OF_CONDUCT-ml.md Create CODE_OF_CONDUCT-ml.md (#11010) 2023-12-18 10:18:34 -05:00
CODE_OF_CONDUCT-mr.md Update CODE_OF_CONDUCT-mr.md (#10987) 2023-11-21 13:24:40 -05:00
CODE_OF_CONDUCT-no.md Create Norwegian code of conduct (#8628) 2022-11-01 12:11:07 -04:00
CODE_OF_CONDUCT-np.md Add Translation for Nepali in docs: CODE_OF_CONDUCT (#8336) 2022-10-14 21:54:13 -04:00
CODE_OF_CONDUCT-pl.md feat: Add docs/readme.md + update crosslinks (#6700) 2022-02-11 12:27:07 -05:00
CODE_OF_CONDUCT-pt_BR.md Fixes some grammar typo and adds missing translations. (#8444) 2022-10-15 18:32:00 -04:00
CODE_OF_CONDUCT-ru.md feat: Add docs/readme.md + update crosslinks (#6700) 2022-02-11 12:27:07 -05:00
CODE_OF_CONDUCT-si.md Added Code of Conduct in Sinhala language (review requested) (#10172) 2023-10-15 17:24:10 -04:00
CODE_OF_CONDUCT-sl.md Slovenian translation for Code of conduct (#7763) 2022-10-07 11:30:42 -04:00
CODE_OF_CONDUCT-sv.md Add translation for Swedish in docs: CONTRIBUTING & CODE_OF_CONDUCT (#7461) 2022-10-03 21:15:39 -04:00
CODE_OF_CONDUCT-te.md Create CODE_OF_CONDUCT-te.md (#7691) 2022-10-12 21:53:50 -04:00
CODE_OF_CONDUCT-th.md Add/code-of-conduct-th.md (#7129) 2022-10-01 00:51:23 -04:00
CODE_OF_CONDUCT-tr.md Create CODE_OF_CONDUCT-tr.md and link with README.md (#9006) 2022-10-27 23:43:23 -07:00
CODE_OF_CONDUCT-uk.md Update CODE_OF_CONDUCT-uk.md (#10678) 2023-10-24 14:12:54 -04:00
CODE_OF_CONDUCT-vi.md update docs (#7636) 2022-10-05 14:16:17 -04:00
CODE_OF_CONDUCT-zh.md Add CodeOfConduct-zh.md (#6930) 2022-07-18 21:29:06 +02:00
CODE_OF_CONDUCT.md feat: Add docs/readme.md + update crosslinks (#6700) 2022-02-11 12:27:07 -05:00
CONTRIBUTING-ca.md add contributing translation for catalan (#8575) 2022-11-15 11:53:44 -05:00
CONTRIBUTING-de.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING-el.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING-es.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING-fa_IR.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING-fil.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING-fr.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING-hi.md Pull Request: Add Hindi Translation for CONTRIBUTING.md (Changes Made) (#11299) 2024-10-07 21:49:23 -04:00
CONTRIBUTING-id.md Enhance Indonesian translation (review assistance requested) (#10393) 2024-01-03 11:39:24 -05:00
CONTRIBUTING-it.md Add RTL/LTR Markdown linter for mixed-direction text consistency and PR annotation (#11877) 2025-05-28 10:46:25 -04:00
CONTRIBUTING-ja.md Fix typos and update links in CONTRIBUTING-ja.md (#11644) 2024-10-22 14:37:11 -04:00
CONTRIBUTING-kn.md Kannada Docs (Waiting for resources) (#9072) 2023-10-09 12:15:54 -04:00
CONTRIBUTING-ko.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING-np.md Add some free courses in Nepali and Translate Contributing in Nepali (#8803) 2022-11-01 12:39:16 -04:00
CONTRIBUTING-pt_BR.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING-ru.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING-sv.md Add translation for Swedish in docs: CONTRIBUTING & CODE_OF_CONDUCT (#7461) 2022-10-03 21:15:39 -04:00
CONTRIBUTING-te.md create CONTRIBUTING-te.md (#7695) 2022-10-13 21:02:24 -04:00
CONTRIBUTING-vi.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING-zh.md fix: remove invalid symbols and keep them consistent with the original (#11073) 2024-02-27 12:38:30 -05:00
CONTRIBUTING-zh_TW.md format: syntax of in-process anotation should be *(🚧 in process)* (#7036) 2023-11-29 17:15:41 -05:00
CONTRIBUTING.md Add RTL/LTR Markdown linter for mixed-direction text consistency and PR annotation (#11877) 2025-05-28 10:46:25 -04:00
HOWTO-ar.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-bn.md Update HOWTO-bn.md (#10715) 2023-10-24 23:02:17 -04:00
HOWTO-bs.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-de.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-el.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-es.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-fa_IR.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-fil.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-fr.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-he.md add hebrew translation (hebrew reviewers requested) (#9877) 2023-10-06 10:42:14 -04:00
HOWTO-hi.md docs(HOWTO): Translated alot of Text in Hindi and added few links (#7406) 2022-10-03 20:47:40 -04:00
HOWTO-id.md Enhance Indonesian translation (review assistance requested) (#10393) 2024-01-03 11:39:24 -05:00
HOWTO-it.md Fix small type in HOWTO-it.md (#7846) 2022-10-16 21:04:46 -04:00
HOWTO-ja.md Fix missing backticks(ja) (#11487) 2024-10-12 11:44:53 -04:00
HOWTO-km.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-kn.md Kannada Docs (Waiting for resources) (#9072) 2023-10-09 12:15:54 -04:00
HOWTO-ko.md chore: keeping spelling consistencies same. GitHub and YouTube trademarks (#6739) 2022-03-07 10:04:22 -05:00
HOWTO-ml.md Add Malayalam Translation (Fix for PR 10014) (#11000) 2023-12-12 12:48:43 -05:00
HOWTO-nl.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-no.md Create Norwegian How to (#8632) 2022-11-15 18:25:02 -05:00
HOWTO-np.md Add translation for Nepali in docs: HOWTO (#8260) 2022-10-13 22:45:30 -04:00
HOWTO-pl.md Update howto-pl.md (#9240) 2022-12-25 13:09:49 -05:00
HOWTO-pt_BR.md Fixes some grammar typo and adds missing translations. (#8444) 2022-10-15 18:32:00 -04:00
HOWTO-pt_PT.md Pt pt translation_how to (#8821) 2022-10-22 14:10:17 -04:00
HOWTO-ru.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-sl.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-sv.md Add translation for Swedish in docs: CONTRIBUTING & CODE_OF_CONDUCT (#7461) 2022-10-03 21:15:39 -04:00
HOWTO-ta.md Added HOWTO file for Tamil Language (#9746) 2023-10-03 11:02:57 -04:00
HOWTO-te.md Fixed typos and errors in HOWTO-te.md file (#7896) 2022-10-09 19:08:31 -04:00
HOWTO-th.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-tr.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-uk.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-vi.md update docs (#7636) 2022-10-05 14:16:17 -04:00
HOWTO-zh.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO-zh_TW.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
HOWTO.md docs(howto): Homogenize HowTo's format across translated files (#6724) 2022-02-28 11:04:55 -05:00
README.md Pull Request: Add Hindi Translation for CONTRIBUTING.md (Changes Made) (#11299) 2024-10-07 21:49:23 -04:00

Read Me

Translations

Volunteers have translated many of our Contributing, How-to, and Code of Conduct documents into languages covered by our lists:

You might notice that there are some missing translations here - perhaps you would like to help out by contributing a translation?