Set HTML lang attribute for documentation#13133
Conversation
While this is certainly an improvement reporter of #8856 asked specifically about setting reading direction and closing this issue when this PR is merged makes it pretty easy for this problem to be forgotten. IMO #8856 should either remain open until reading direction is added for all languages or this should be done as part of this PR. |
|
@feerrenrut Is updating the translated *.t2t files in this manner safe? |
That's true. However, I'm not comfortable setting text direction without getting people of the affected localizations involved. For most rtl languages, some text like numbers might need an explicit |
Not really, this COULD cause merge conflicts. Really only the |
|
@feerrenrut Good to know. I should still have access to that repo due to my work on the NL translation. Should I commit the changes there or should we first discuss this with translation teams? |
|
Converting this to a draft until a translation strategy is determined. |
@bramd it's would be nice to give some advanced warning (an email to the NVDA translators mailing list), but I don't expect any opposition to this. |
|
Lang attribute is good, cause it will allow adding language recognition for reading with our synthesizers.
|
|
even it will be good to solve the problem with rtl direction, as now hebrew has a structure difference problem due to this. There is an ugly hack in the t2t file itself. |
|
This PR is still blocked by only changing this in the "en" file. |
|
Closing as abandoned, superseded by #14546 |
Supersedes #13133 Closes #8856 with nvaccess/mrconfig#83 Summary of the issue: The generated HTML from t2t (changes, quick reference, user guide) has no lang attribute set. So, it will not read in the correct TTS language. Right to left languages also do not render correctly without an dir="rtl" attribute. Description of user facing changes When translators add values to the attributes, the correct TTS language will be used when reading NVDA documentation and the layout direction of text will be appropriate. Description of development approach PR to mrconfig to support locale.t2tconf: add locale.t2tconf as a translatable file in nvaccess/mrconfig#83 Create a base template for translators to add their own lang and dir attribute values.
Link to issue number:
Closes #8856
Summary of the issue:
The generated HTML from t2t (changes, quick reference, user guide) has no lang attribute set. So, it will not read in the correct TTS language.
Description of how this pull request fixes the issue:
Include a locale.t2tconfig for every language to set the lang attribute and ensure it is included in all documents.
Testing strategy:
Opened a few generated HTML documents and ensured the lang attribute was present and set correctly.
Known issues with pull request:
Some languages may need RTL (right to left) as a reading direction which would require the
dir="rtl"attribute as well. However, at least setting lang will improve things and not break anything.Change log entries:
New features
Changes
Bug fixes
For Developers
Code Review Checklist: