Skip to content

Python 3: find a suitable and compatible replacement for txt2tags #8734

@josephsl

Description

@josephsl

Hi,

Similar to #8375:

Background:

NVDA's documentation is written with txt2tags (t2t) markup, similar to how people would use Markdown markup and then generate HTML, wiki pages and what not. At the moment this works for Python 2.7, but could pose a problem for Python 3 transition.

Apart from postproc/heading conversion problem (#3031), txt2tags continues to prefer Python 2. Although there was an experimental Python 3 branch, there hasn't been any updates since 2010.

Also, as NVDA was localized into more languages, other issues with our current docs translation process emerged, including byte order marks, encoding problems, typos and resulting syntax errors and what not. In the past, there has been a discussion on NvDA translations list regarding using a different docs translation process, with some peple suggesting using Markdown/Gettext for documentation translation management, similar to how add-on entries on community add-ons website are locailzed.

Although this issue won't have immediate impact, it will become a showstopper once we declare transition to Python 3. Thus, to minimize shock throughout the community (especially for translators and code contributors), I propose that we find a suitable and compatible alternative to t2t.

#Dependency requirements:

  1. Compatible with both Python 2.7 and at least 3.5.
  2. Making it easier for translators to localize documentation and minimizes errors.
  3. A suitable path for moving from t2t to the new format.

Steps to reproduce:

Try compiling NVDA with Python 3 (scons, ignoring a bit about winreg module name).

Actual behavior:

Various errors are thrown by Python due te txt2tags issues.

Expected behavior:

NVDA compiles in Python 3 mode.

System configuration:

NVDA Installed/portable/running from source:

Not applicable

NVDA version:

N/A

Windows version:

N/A

Name and version of other software in use when reproducing the issue:

Python 2.7.15, 3.7.0, txt2tags 2.5

Other information about your system:

N/A

Other questions:

Does the issue still occur after restarting your PC?

Yes

Have you tried any other versions of NVDA?

Yes

Possible new dependencies:

The closest is Markdown (md), as the add-ons community and contributors using GitHub are familiar with this. Also, it might be possible to use Ikiwiki's Gettext plug-in to transform po into md files.

Other suggestions are welcome.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions