LP only imported a fraction of the snappy translation template

Bug #1758684 reported by Gunnar Hjalmarsson
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Undecided
Unassigned
Ubuntu Translations
Fix Released
High
Gunnar Hjalmarsson
snapd (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Now when bug #1747272 finally has been fixed, I have noticed a snappy import issue. Below I have attached the version of snappy.pot which was created during the snapd build on 2018-03-24 and stripped. Next attachment is the version of snappy.pot which was actually imported to bionic. The latter includes 37 strings instead of 398...

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

And this is the diff.

summary: - LP only imported a fraction of the translation template
+ LP only imported a fraction of the snappy translation template
Changed in ubuntu-translations:
importance: Undecided → High
tags: added: rls-bb-incoming
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

It may be worth mentioning that previously, the built/stripped POT files included some odd formatting (see latest attachment). I can't tell if it's in accordance with the gettext spec., but in any case LP might have got confused.

It seems to have been ok in artful, though.

https://translations.launchpad.net/ubuntu/artful/+source/snapd/+pots/snappy

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
AsciiWolf (asciiwolf) wrote :

@gunnarhj: Artful has older version of snapd. It was ok with older version of snapd in bionic as well.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Yeah, I'm not sure of cause and effect; just shared my observations. Someone on the LP side must look into it.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Since it's very late in the cycle, I uploaded the complete template and approved manually, and it was imported successfully without complaints.

So maybe it was some kind of temporary glitch. I'll keep this bug open for a while to follow up what happens next time the package is uploaded.

Changed in ubuntu-translations:
status: New → In Progress
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

This mystery is not resolved. The POT stripped from the source, when snapd 2.32.3.2+18.04 was built on 2018-04-11, includes 481 strings, while only 456 strings were recognized when the POT was imported to LP. 25 strings were ignored.

Again I could upload the complete POT manually without complaints, but this is an issue which must be investigated and fixed.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Well, it just repeated itself.

Stripped template: 478 strings
Imported template: 400 strings

Stripped template added manually.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

... and with 2.32.9+18.04:

- Stripped: 483 strings
- Imported: 452 strings

Fixed manually again.

Revision history for this message
William Grant (wgrant) wrote :

snapd is producing bad POTs. Comparing snapd_2.32.9+18.04_arm64_translations.tar.gz and snapd_2.32.9+18.04_i386_translations.tar.gz:

$ diff -u {arm64,i386}/source/po/snappy.pot | diffstat
 snappy.pot | 1622 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 1620 insertions(+), 2 deletions(-)

Changed in launchpad:
status: New → Invalid
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks, William, that seems to move this issue forward quite a bit.

As regards the latest example I posted about (comment #17), the build for s390x created a snappy.pot with precisely 452 strings. Apparently that one was the latest to be imported to LP.

https://launchpad.net/ubuntu/bionic/+upload/18265691/+files/snapd_2.32.9+18.04_s390x_translations.tar.gz

So something needs to be done on the snapd side about it. Is there a reasonable explanation why not all the strings are extracted during the builds for all architectures?

When monitoring this issue, I've consequently looked at the tarballs built for amd64, and they seem to be more reliable. So a possible workaround might be to only run the update-pot script when building for amd64. LP only needs one template, after all.

Changed in snapd (Ubuntu):
milestone: ubuntu-18.04 → none
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

2.33.1+18.04:

Imported: 118 strings

Didn't find any build which generated a plausible number of strings, i.e. amd64 isn't reliable either. I uploaded the amd64 POT for 2.32.9+18.04 (again) manually. (Not sure that was an excellent measure, though.)

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2018-06-24 04:58, Gunnar Hjalmarsson wrote:
> (Not sure that was an excellent measure, though.)

It wasn't. Uploaded the armhf POT from 2.33.1+18.04 (412 strings).

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks, its slightly mysterious why these files are truncated. I added https://github.com/snapcore/snapd/pull/5402 and https://github.com/snapcore/snapd/pull/5404 with better error checking and extra canary checks to get to the bottom of this.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

This was fixed in snapd 2.34:

https://github.com/snapcore/snapd/pull/5408

When snapd 2.34.2+18.04 was built, all the 513 translatable strings were extracted on all the architectures and successfully imported to LP.

Changed in snapd (Ubuntu):
status: Confirmed → Fix Released
Changed in ubuntu-translations:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.