Trash output for LANG=ru_RU.UTF-8 (probably all non-ASCII languages)

Bug #1806761 reported by kostyarin
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
Undecided
Russian Ubuntu Translators
snapd
Fix Released
Medium
Unassigned
snapd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

$ LANG=C snap whoami
email: -

$ echo $LANG
ru_RU.UTF-8

$ snap whoami
2018/12/05 00:28:38.375372 main.go:160: argument "abort"'s "<смена ID>s" should be wrapped in <>s
2018/12/05 00:28:38.375488 main.go:160: argument "ack"'s "<файл подтверждения>s" should be wrapped in <>s
2018/12/05 00:28:38.375690 main.go:160: argument "tasks"'s "<смена ID>s" should be wrapped in <>s
2018/12/05 00:28:38.375749 main.go:160: argument "create-key"'s "<имя ключа>s" should be wrapped in <>s
2018/12/05 00:28:38.375822 main.go:160: argument "create-user"'s "<отослать>s" should be wrapped in <>s
2018/12/05 00:28:38.375859 main.go:160: argument "delete-key"'s "<имя ключа>s" should be wrapped in <>s
2018/12/05 00:28:38.375970 main.go:160: argument "export-key"'s "<имя ключа>s" should be wrapped in <>s
2018/12/05 00:28:38.376047 main.go:160: argument "find"'s "<запрос>s" should be wrapped in <>s
2018/12/05 00:28:38.376131 main.go:160: argument "get"'s "<ключ>s" should be wrapped in <>s
2018/12/05 00:28:38.376256 main.go:160: argument "interface"'s "<интерфейс>s" should be wrapped in <>s
2018/12/05 00:28:38.376348 main.go:160: argument "known"'s "<тип подтверждения>s" should be wrapped in <>s
2018/12/05 00:28:38.376369 main.go:160: argument "known"'s "<фильт заголовков>s" should be wrapped in <>s
2018/12/05 00:28:38.376444 main.go:160: argument "login"'s "<отослать>s" should be wrapped in <>s
2018/12/05 00:28:38.376564 main.go:160: argument "prepare-image"'s "<модель подтверждения>s" should be wrapped in <>s
2018/12/05 00:28:38.376587 main.go:160: argument "prepare-image"'s "<корневая директория>s" should be wrapped in <>s
2018/12/05 00:28:38.376711 main.go:160: argument "services"'s "<сервис>s" should be wrapped in <>s
2018/12/05 00:28:38.376783 main.go:160: argument "logs"'s "<сервис>s" should be wrapped in <>s
2018/12/05 00:28:38.376838 main.go:160: argument "start"'s "<сервис>s" should be wrapped in <>s
2018/12/05 00:28:38.376892 main.go:160: argument "stop"'s "<сервис>s" should be wrapped in <>s
2018/12/05 00:28:38.376945 main.go:160: argument "restart"'s "<сервис>s" should be wrapped in <>s
2018/12/05 00:28:38.377015 main.go:160: argument "set"'s "<конфигурационное значение>s" should be wrapped in <>s
2018/12/05 00:28:38.377108 main.go:160: argument "sign-build"'s "<имя файла>s" should be wrapped in <>s
2018/12/05 00:28:38.377565 main.go:160: argument "wait"'s "<ключ>s" should be wrapped in <>s
2018/12/05 00:28:38.377664 main.go:160: argument "watch"'s "<смена ID>s" should be wrapped in <>s
email: -

$ echo $?
0

I've got this "should be wrapped in <>s" output for every snap command, if LANG is ru_RU.UTF-8.

$ LANG=C snap version
snap 2.36.1
snapd 2.36.1
series 16
ubuntu 18.10
kernel 4.18.0-11-generic

$ uname -a
Linux x556uq 4.18.0-11-generic #12-Ubuntu SMP Tue Oct 23 19:22:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

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

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

Changed in snap (Ubuntu):
status: New → Confirmed
Revision history for this message
Igor Zubarev (igor.zubarev) wrote :

Confirm. It's irritating.

Revision history for this message
Igor Zubarev (igor.zubarev) wrote :

Another workaround:
sudo rm /usr/share/locale-langpack/ru/LC_MESSAGES/snappy.mo

Revision history for this message
Igor Zubarev (igor.zubarev) wrote :

Or use LANG=C before any snap command

Revision history for this message
kostyarin (k-i-r) wrote :

Yep, and use the LANG=C before every apt command, since it uses the snap.

Revision history for this message
kostyarin (k-i-r) wrote :

Also, I can help edit the ru.po file to get success.

Revision history for this message
kostyarin (k-i-r) wrote :

Hm, probably this bug should be moved to snapd bugs. I'm not sure, but looks like...

Zygmunt Krynicki (zyga)
no longer affects: snap
affects: snap (Ubuntu) → snapd (Ubuntu)
Zygmunt Krynicki (zyga)
Changed in snapd:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Zygmunt Krynicki (zyga)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I've fixed this in the following PR https://github.com/snapcore/snapd/pull/6305

Changed in snapd:
milestone: none → 2.37
Revision history for this message
John Lenton (chipaca) wrote :

Apparently the message

argument "foo"'s "bar" should be wrapped in <>s

is ambiguous, and the ru translator has taken it to mean that it should look like literally "<bar>s" instead of "<bar>".

We'll update the message to say "should start with < and end with >".

We'll also add code to drop the s if it matches <.*>s, to accommodate this mistake. This is brittle but it'll stop the annoying messages.

Could one of you russian-speaking people kindly fix the translations, meanwhile, by working on
https://translations.launchpad.net/ubuntu/cosmic/+source/snapd/+pots/snappy/ru/+translate
?

(there's a lot more un-translated there also, hint hint).

Revision history for this message
kostyarin (k-i-r) wrote :

All "<foo>s" changed to "<foo>". In suggestions. Except this one https://translations.launchpad.net/ubuntu/cosmic/+source/snapd/+pots/snappy/ru/34/+translate

By unknown reason it turns back and a suggestion disappears. I've tried it few times.

Zygmunt Krynicki (zyga)
Changed in snapd:
status: In Progress → Fix Committed
Changed in ubuntu-translations:
assignee: nobody → Russian Ubuntu Translators (ubuntu-l10n-ru)
Revision history for this message
Igor Zubarev (igor.zubarev) wrote :
Revision history for this message
Igor Zubarev (igor.zubarev) wrote :

Unfortunately our translator Artem Sierikov translated strings with "s" in all versions of snapd(((
For trunk series, Artful, Bionic, Cosmic, Yakkety, Zesty

I fixed for Cosmic. Should we fix for trunk and others?

Revision history for this message
Igor Zubarev (igor.zubarev) wrote :

It seems trunk is OK too

Revision history for this message
Denis Denisov (denji0k-deactivatedaccount) wrote :

$ lsb_release -rdc
Description: Ubuntu Disco Dingo (development branch)
Release: 19.04
Codename: disco

LANG=ru_UK.UTF-8 snap whoami
2018/12/23 .... main.go:160: argument "abort"'s "<смена ID>s" should be wrapped in <>s
2018/12/23 .... main.go:160: argument "ack"'s "<файл подтверждения>s" should be wrapped in <>s
......
email: -

Revision history for this message
igor (takenp) wrote :

$ lsb_release -rdc
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic

Got this .mo file reffered in this coment: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1806761/comments/11

put it instead /usr/share/locale-langpack/ru/LC_MESSAGES/snappy.mo
and avoided all troubles.

I'd recommend to fix it in the distro repo as it is fixed in translation file ( I don't know how to do this)

Revision history for this message
Sebastien Bacher (seb128) wrote :

it should be fixed in that version https://launchpad.net/ubuntu/+source/snapd/2.37+19.04~pre1 (which is also being SRUed to older series)

Changed in snapd (Ubuntu):
status: Confirmed → Fix Committed
Zygmunt Krynicki (zyga)
Changed in snapd:
assignee: Zygmunt Krynicki (zyga) → nobody
Revision history for this message
Sebastien Bacher (seb128) wrote :

Is that fixed now? It seems to work fine here

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

Other bug subscribers

Related questions

Remote bug watches

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