Feature #16279

Research how to isolate the [[!meta directives that need translation in PO files

Added by sajolida 2019-01-04 19:29:53 . Updated 2019-01-16 16:18:42 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Target version:
Start date:
2019-01-04
Due date:
% Done:

0%

Feature Branch:
Type of work:
Discuss
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

From this thread on tails-l10n: http://lists.autistici.org/message/20181118.155100.286e6cc2.en.html

Translators have a hard time (and make mistakes) when translating big blobs of ‘[[!meta’ directives in a single PO string.

This only happens on HTML files, like /install.html:

https://git.tails.boum.org/tails/tree/wiki/src/install.fr.po

And not on Markdown files, like /news/version_3.11.mdwn:

https://git.tails.boum.org/tails/tree/wiki/src/news/version_3.11.fr.po

We are using the following ‘[[!meta’ directives:

  • All over the place
    • date
    • title
  • Sometimes
    • script
    • stylesheet
  • In very rare occasions
    • google-site-verification
    • redir
    • robots

From these, it only makes sense to translate the ‘title’ directives.

The rest are actually harmful to translate, so ideally they shouldn’t even appear in PO files. For example, translators sometimes translate dates.

How can we make these easier to translate and less error prone?

* Wrapping ‘title’ into a ’

’ seems to work remarkably well. See commit in attachment.

  • Is it realistic to patch ikiwiki/PO plugin/po4a/whoever to skip other directives? If we do this, then we would also solve the problem of isolating ‘title’ directives because they would be the only ones left.
  • Any other option?

Files


Subtasks


Related issues

Related to Tails - Bug #16221: Stop using DocBook-style CSS classes In Progress 2018-12-13
Related to Tails - Feature #16367: Wrap [[!meta title directives in <div> in HTML sources Resolved 2019-01-16
Related to Tails - Feature #16366: Teach po4a to ignore the [[!meta directives that shall not be translated Confirmed 2019-01-16
Blocks Tails - Feature #15941: Core work 2018Q4 → 2019Q2: Technical writing Resolved 2018-09-11

History

#1 Updated by sajolida 2019-01-04 19:31:51

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

#2 Updated by sajolida 2019-01-04 19:32:04

  • blocks Feature #15941: Core work 2018Q4 → 2019Q2: Technical writing added

#3 Updated by intrigeri 2019-01-08 18:12:12

> The rest are actually harmful to translate, so ideally they shouldn’t even appear in PO files. For example, translators sometimes translate dates.

hefee raised this exact problem today while discussing the translation platform.

> * Is it realistic to patch ikiwiki/PO plugin/po4a/whoever to skip other directives? If we do this, then we would also solve the problem of isolating ‘title’ directives because they would be the only ones left.

I think that’s the best long-term option. A quick look at the ikiwiki PO plugin implementation suggests that the easiest way is to teach po4a to ignore the directives that shall not be translated when it generated POT files (called by ikiwiki’s sub refreshpot).

Now, if the "Wrapping ‘title’ into a ’

’" trick is cheap to implement, it could be a good idea to go for it until we know who will have time & budget to do that and when (skills needed: Perl and the patience needed to survive working on a parser written in old-school Perl). It won’t solve the “translators translate the meta date” issue but it should help with the rest of the problems this ticket is about.

#4 Updated by sajolida 2019-01-16 16:18:42

  • Subject changed from Isolate in PO files [[!meta directives that need translation to Research how to isolate the [[!meta directives that need translation in PO files
  • Status changed from Confirmed to Resolved
  • Start date changed from 2019-01-16 to 2019-01-04

Ok, so I created Feature #16367 and Feature #16366 for implementing the 2 parts of this plan. I also changed this ticket to be about making plans and can now mark it as resolved.

#5 Updated by sajolida 2019-01-16 16:18:52

  • related to Feature #16367: Wrap [[!meta title directives in <div> in HTML sources added

#6 Updated by sajolida 2019-01-16 16:19:02

  • related to Feature #16366: Teach po4a to ignore the [[!meta directives that shall not be translated added