Bug #17693

Weblate committed a PO file that doesn't pass lint_po

Added by sajolida 2020-05-06 16:24:31 . Updated 2020-05-15 21:32:37 .

Status:
Confirmed
Priority:
Elevated
Assignee:
zen
Category:
Internationalization
Target version:
Start date:
Due date:
% Done:

0%

Feature Branch:
Type of work:
Sysadmin
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

I got the following log from Git when trying to push changes to the mirrors pool today:

Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 2 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 351 bytes | 351.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: .--- Requesting update of website underlays... ----------------
remote: |
remote: | Already up-to-date.
remote: | From puppet-git.lizard:mirror-pool
remote: |    0fabacf..76dcc8c  master     -> origin/master
remote: | Updating 0fabacf..76dcc8c
remote: | Fast-forward
remote: |  mirrors.json | 8 ++++----
remote: |  1 file changed, 4 insertions(+), 4 deletions(-)
remote: | Already up-to-date.
remote: | Already up-to-date.
remote: | Already up-to-date.
remote: | Ping received.
remote: |
remote: | scanning doc/upgrade.es.po
remote: | scanning doc/first_steps/welcome_screen/bridge_mode.es.po
remote: | Content-type: text/html
remote: |
remote: | <!DOCTYPE html>
remote: |
remote: | <html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
remote: |
remote: | <head>
remote: |
remote: |
remote: | <base href="/" />
remote: |
remote: |
remote: | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
remote: | <title>Tails - Error</title>
remote: |
remote: |
remote: | <link rel="icon" href="/favicon.ico" type="image/x-icon" />
remote: |
remote: | <link rel="stylesheet" href="/style.css" type="text/css" />
remote: |
remote: | <link rel="stylesheet" href="/local.css?reload-2020-05-01" type="text/css" />
remote: |
remote: |
remote: | <script src="/lib/js/mirror-dispatcher.js" type="text/javascript"></script>
remote: |
remote: |
remote: |
remote: | </head>
remote: |
remote: |
remote: | <body class="en">
remote: |
remote: |
remote: | <div class="banner" role="banner">
remote: |   <a class="tails" href="/index.en.html"><span>Tails</span></a>
remote: |   <div id="search-and-donate">   
remote: |
remote: |     <div class="donate">
remote: |       <a href="https://tails.boum.org/donate/?r=topbar" class="en"><span>Donate</span></a>
remote: |       <a href="https://tails.boum.org/donate/?r=topbar" class="de"><span>Spenden</span></a>
remote: |       <a href="https://tails.boum.org/donate/?r=topbar" class="es"><span>Donar</span></a>
remote: |       <a href="https://tails.boum.org/donate/?r=topbar" class="fa"><span>اهدا کردن</span></a>
remote: |       <a href="https://tails.boum.org/donate/?r=topbar" class="fr"><span>Faire un don</span></a>
remote: |       <a href="https://tails.boum.org/donate/?r=topbar" class="it"><span>Dona</span></a>
remote: |       <a href="https://tails.boum.org/donate/?r=topbar" class="pt"><span>Faça uma doação</span></a>
remote: |     </div>
remote: |   </div>
remote: | </div>
remote: |
remote: |
remote: |
remote: | <div class="page">
remote: |
remote: | <div class="pageheader">
remote: | <div class="header">
remote: | <span>
remote: | <span class="parentlinks">
remote: | <ul id="crumbs">
remote: | <li><a href="/index.en.html"><img src="/lib/home.png"></a></li>
remote: |
remote: |
remote: |
remote: |
remote: | <li><a href="/">The Amnesic Incognito Live System</a></li>
remote: |
remote: |
remote: |
remote: |
remote: | <li>Error</li>
remote: |
remote: | </ul>
remote: | </span>
remote: | <span class="title">
remote: | Error
remote: | </span>
remote: | </span>
remote: | </div>
remote: |
remote: |
remote: | <div class="actions">
remote: | <ul>
remote: |
remote: |
remote: | <li><a href="./recentchanges/">RecentChanges</a></li>
remote: |
remote: |
remote: |
remote: |
remote: | <li><a href="/ikiwiki.cgi?do=prefs">Preferences</a></li>
remote: |
remote: |
remote: |
remote: |
remote: |
remote: | </ul>
remote: | </div>
remote: |
remote: |
remote: |
remote: |
remote: |
remote: |
remote: | </div>
remote: |
remote: | <div id="pagebody">
remote: |
remote: | <div id="content" role="main">   
remote: | <p class="error">Error: Invalid po file /tmp/ikiwiki-po-filter-in.M005HUJDrE:
remote: | /tmp/ikiwiki-po-filter-in.M005HUJDrE:176: &#39;msgid&#39; and &#39;msgstr&#39; entries do not both end with &#39;\n&#39;
remote: | msgfmt: found 1 fatal error
remote: |
remote: | </p>
remote: | </div>
remote: |
remote: |
remote: |
remote: |
remote: |
remote: | </div>
remote: |
remote: | <div id="footer" class="pagefooter" role="contentinfo">
remote: |
remote: | <!-- from The Amnesic Incognito Live System -->
remote: | </div>
remote: |
remote: | </div>
remote: |
remote: | <script type="text/javascript">  
remote: |   var linkelements = document.querySelectorAll('.use-mirror-pool');
remote: |   // Avoid a traceback if mirror-dispatcher.js is not available.
remote: |   if (typeof replaceUrlPrefixWithRandomMirror !== "undefined" && linkelements.length > 0) {
remote: |     replaceUrlPrefixWithRandomMirror(linkelements);
remote: |   }
remote: | </script>
remote: |
remote: | </body>
remote: | </html>
remote: |
remote: `--------------------------------------------------------------
To d53ykjpeekuikgoq.onion:mirror-pool.git  
   0fabacf..76dcc8c  master -> master

I’ve never seen that before when pushing to this repo.

Also, the changes that I pushed (76dcc8c) are in origin/master but I can see them in https://tails.boum.org/mirrors.json.

Marking this as Urgent as it breaks downloads and upgrades for our users on the day after a release.


Subtasks


History

#1 Updated by sajolida 2020-05-06 16:25:25

groente ---^ zen —-^

#2 Updated by sajolida 2020-05-06 16:35:00

@CyrilBrulebois thinks that it might be related to Bug #17005.

#3 Updated by sajolida 2020-05-06 16:50:40

  • Subject changed from "Invalid po file" when pushing to mirror-pool.git and /mirrors.json not updated to Weblate committed a PO file that doesn't pass lint_po
  • Category changed from Infrastructure to Internationalization
  • Assignee changed from Sysadmins to zen
  • Priority changed from Urgent to Elevated

@CyrilBrulebois hunted down the source of problem (afaf222680), I fixed it in 1fc793b76b, and mirrors.json is up-to-date now.

Sorry for the noise sysadmins but I didn’t think it was possible to get ikiwiki back to life myself.

Pending issue is to understand how Weblate committed afaf222680 on May 5 if it breaks lint_po.

Reassigning to @zen for this analysis as it might break the build of the website any time again.

#4 Updated by hefee 2020-05-15 21:32:37

sajolida It was never been part of the requirements, that Weblate should be able to push only if it passes `lint_po`. (zen puppet-tails:files/gitolite/hooks/tails-weblate-update.hook) Because everyone else can push non clean po files and if Weblate ones get blocked, than they pile up on Weblate instance and we do not see them at all. and more important, the actual translator won’t get feedback, that they have broke the process. If you look at the diff the translator did not broke it, it was broken before of their change:

<code class="diff">
-"Para usar puentes elige configurar puentes (bridges) en el\n"
-"<span class=\"application\">Tails Greeter</span>:\n"
+"Para usar puentes elige configurar puentes (bridges) en la Pantalla de "
+"Bienvenida:\n"
</code>

the “\n” exist there before.

The solution for those kind of issues is to add checks in Weblate, that give direct feedback to translators. Implementing those checks is on the todo list, but they are not high priority.