Strange trailing text from snap login in en_GB locale

⟫ snap version
snap    2.26.14
snapd   2.26.14
series  16
ubuntu  17.04
kernel  4.10.0-28-generic
⟫ snap login
E-mail address:
Password of "":amp>

Running under strace to make sure I’m not insane, I see:

write(1, "Password of \"redacted@redact"..., 46Password of "":amp> ) = 46

Looking at cmd_login.go, it seems that i18n might be involved, let’s try with Simplified English:

LANG=en_US.UTF-8 snap login
Email address:
Password of "":

Could you

sudo strace -D -f -vv -e stat -- snap login

so we see where it’s loading the translations from?

[pid  5869] stat("/snap/core/current/usr/share/locale-langpack/en_GB/LC_MESSAGES/", 0xc820072ed8) = -1 ENOENT (No such file or directory)
[pid  5869] stat("/snap/core/current/usr/share/locale/en_GB/LC_MESSAGES/", 0xc820072fa8) = -1 ENOENT (No such file or directory)
[pid  5869] stat("/usr/share/locale-langpack/en_GB/LC_MESSAGES/", {st_dev=makedev(8, 1), st_ino=5148066, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=16, st_size=4422, st_atime=2017/08/01-09:21:40.762973099, st_mtime=2017/04/10-17:17:46, st_ctime=2017/04/24-09:34:29.654644306}) = 0

guess what my next question is :slight_smile:

⟫ dpkg -S /usr/share/locale-langpack/en_GB/LC_MESSAGES/
language-pack-en-base: /usr/share/locale-langpack/en_GB/LC_MESSAGES/
⟫ apt policy language-pack-en-base
  Installed: 1:17.04+20170404
  Candidate: 1:17.04+20170404
  Version table:
 *** 1:17.04+20170404 500
        500 zesty/main amd64 Packages
        500 zesty/main i386 Packages
        100 /var/lib/dpkg/status
1 Like

you win one internet points :smiley:

1 Like

Digging into this some more, it seems like is a bit screwy

I see this too, I didn’t relate it to the locale at that time though, only showed the weird behavior to @mvo while at the previous sprint we both had attended.

Out of interest, @sergiusens what locale were you using at the time?

Same as you, the proper English locale :wink:

I filed #1707908 for the snapd side of this issue

1 Like

We’ve just deployed a Launchpad fix to correctly handle the invalid format string from snapd’s translation template. Existing bad translations will need to be manually fixed, since we can’t reasonably repair them automatically.

1 Like

Which, for the record, I did on

1 Like