Skip to content

Commit

Permalink
Convert t2t to markdown, then to HTML (nvaccess#15945)
Browse files Browse the repository at this point in the history
Closes nvaccess#8734
Part of nvaccess#15014
Related nvaccess/nvda-misc-deps#30, nvaccess#16002, nvaccess#15950, nvaccess#15939, nvaccess#15981

Summary of the issue:
In order to migrate to Crowdin, we must convert txt2tags to markdown.
In order transition safely, beta will build docs from t2t to markdown to html.
Eventually the t2t will be removed and the markdown will become the source of truth.

Description of user facing changes
The user Guide no longer has numbered sections

Translators and documentation writers now use extended markdown syntax rather than txt2tags.

Description of development approach
The build system performs certain pre-processing and post-processing when converting t2t to HTML.
This equivalent system should be retained - i.e. the translator and documentation contribution experience should remain the same for markdown to HTML.
Additionally, when converting t2t to markdown, new processing rules had to be created.

There is no universal standard for custom anchors in markdown.
As such text2tags doesn't have default rules for this. To retain our custom anchors, I added rules for a common markdown extended syntax.
Similarly a shortcut is used for generating table of contents.
See nvaccess/nvda-misc-deps#30

Setting the language code is done using the user_docs folder name, and the direction of RTL is manually set for the 3 current languages that require it, Persian, Arabic, Hebrew.

Special Catalan processing for adding hreflang attributes is converted to a markdown extension syntax of {hreflang=en}

The key commands file is generated using a custom made markdown python extension.
  • Loading branch information
seanbudd authored Jan 9, 2024
1 parent 243991c commit dac5aa2
Show file tree
Hide file tree
Showing 18 changed files with 467 additions and 374 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ dlldata.c
.sconsign.dblite
user_docs/*/*.html
user_docs/*/*.css
user_docs/*/keyCommands.t2t
user_docs/build.t2tConf
# TODO remove when migrating from t2t to md as markdown files will be committed.
user_docs/*/*.md
extras/controllerClient/x86/nvdaController.h
extras/controllerClient/x64
extras/controllerClient/arm64
Expand Down
Loading

0 comments on commit dac5aa2

Please sign in to comment.