Project

General

Profile

Feature #16279

Isolate in PO files [[!meta directives that need translation

Added by sajolida 11 days ago. Updated 7 days ago.

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

0%

QA Check:
Feature Branch:
Type of work:
Discuss
Blueprint:
Starter:
Affected tool:

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 '<div>' 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?

0001-Wrap-title-directive-in-a-div.patch View (9.35 KB) sajolida, 01/04/2019 07:23 PM


Related issues

Related to Tails - Bug #16221: Consider stopping to use DocBook-style CSS classes Confirmed 12/13/2018
Blocks Tails - Feature #15941: Core work 2018Q4 → 2019Q2: Technical writing Confirmed 09/11/2018

History

#1 Updated by sajolida 11 days ago

  • Related to Bug #16221: Consider stopping to use DocBook-style CSS classes added

#2 Updated by sajolida 11 days ago

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

#3 Updated by intrigeri 7 days ago

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 '<div>'" 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.

Also available in: Atom PDF