Project

General

Profile

Feature #17358

Enable Markdown checks on Weblate

Added by sajolida 4 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Internationalization
Target version:
-
Start date:
Due date:
% Done:

0%

Feature Branch:
https://salsa.debian.org/hefee/puppet-tails:hefee/17358-markdown-checks-on-weblate
Type of work:
Sysadmin
Blueprint:
Starter:
Affected tool:
Translation Platform

Description

According to one of our sysadmins, Weblate was updated to 3.5 but without the Markdown checks.

Having Markdown checks was deemed as a requirement before doing #16221, see #16221#note-7, which would simplify quite a bit the work of technical writers and translators.


Related issues

Blocked by Tails - Bug #16943: Upgrade to Weblate 3.x Resolved
Blocks Tails - Bug #16221: Stop using DocBook-style CSS classes In Progress 12/13/2018

History

#1 Updated by sajolida 4 months ago

  • Blocked by Bug #16943: Upgrade to Weblate 3.x added

#2 Updated by sajolida 4 months ago

  • Blocks Bug #16221: Stop using DocBook-style CSS classes added

#3 Updated by hefee 4 months ago

We (@drebs and me) didn't enabled the Markdown checks by purpose.
As there are three Markdown checks it was unclear, if we want all enabled or if they will break current workflow and we moved the decision to a later state, when we have more input.

#     'weblate.checks.markup.MarkdownRefLinkCheck',
#     'weblate.checks.markup.MarkdownLinkCheck',
#     'weblate.checks.markup.MarkdownSyntaxCheck',

The upstream documentation is not so informative.
https://docs.weblate.org/en/latest/user/checks.html#markdown-references
https://docs.weblate.org/en/latest/user/checks.html#markdown-links
https://docs.weblate.org/en/latest/user/checks.html#markdown-syntax

@sajolida: Can you tell us, if you had in mind, that we want all three to be enabled?

#4 Updated by intrigeri 4 months ago

  • Affected tool set to Translation Platform

#5 Updated by sajolida 4 months ago

From what nijel told me at FOSDEM'19, MarkdownSyntaxCheck checks that the Markdown in the translation is the same as in the source. For exemple, if there is a bullet list and an emphasis in the source, there should also be a bullet list and an emphasis in the translation.

So I think that markdown-syntax is the important check for us.

markdown-reference seems to relate to reference-style links (as per https://daringfireball.net/projects/markdown/syntax#link) for example:

This is [an example][id] reference-style link.

We never use them on the website.

markdown-links seems to relate to normal links:

This is [an example](http://example.com/ "Title") inline link.

It's unclear to me what the check actually checks. For example, we don't want it to check that the URL is the same in the source and the translation as we might be pointing to a different URL in different languages.

#6 Updated by hefee 4 months ago

  • Assignee changed from Sysadmins to drebs

sajolida wrote:

From what nijel told me at FOSDEM'19, MarkdownSyntaxCheck checks that the Markdown in the translation is the same as in the source. For exemple, if there is a bullet list and an emphasis in the source, there should also be a bullet list and an emphasis in the translation.

So I think that markdown-syntax is the important check for us.

ACK. It doesn't check a lot of Markdown syntax. It only checks for
https://github.com/WeblateOrg/weblate/blob/master/weblate/checks/markup.py#L52

# __word__
# **word**
# _word_
# *word*
# `code`
# ~~world~~

markdown-reference seems to relate to reference-style links (as per https://daringfireball.net/projects/markdown/syntax#link) for example:

[...]

We never use them on the website.

Okay so skip this.

markdown-links seems to relate to normal links:

[...]

It's unclear to me what the check actually checks. For example, we don't want it to check that the URL is the same in the source and the translation as we might be pointing to a different URL in different languages.

Well this one checks, if the translated string has also links in the translated string. Weblate is aware, that links may be different for different languages.

https://github.com/WeblateOrg/weblate/blob/master/weblate/checks/markup.py#L251

# We don't check actual remote link targets as those might
# be localized as well (consider links to Wikipedia).
# Instead we check only relative links and templated ones.

So to conclude this I would say:

Let's enable the two checks:

    'weblate.checks.markup.MarkdownLinkCheck',
    'weblate.checks.markup.MarkdownSyntaxCheck',

#7 Updated by sajolida 4 months ago

+1

Thanks for reading the cooooode!

#8 Updated by hefee about 1 month ago

  • Status changed from Confirmed to Needs Validation
  • Assignee changed from drebs to zen
  • Feature Branch set to https://salsa.debian.org/hefee/puppet-tails:hefee/17358-markdown-checks-on-weblate

#9 Updated by zen about 1 month ago

  • Status changed from Needs Validation to Resolved

I have just merged this. Thanks for carefully making sure this wouldn't break translation workflow, i was worried with this. :-)

Also available in: Atom PDF