This bug also prevents the use of snap command autocomplete, echoing these 
error messages when TAB is pressed....
```
$ snap [TAB]2021/08/26 11:39:40.041113 main.go:176: description of 
prepare-image's "<target-dir>" is lowercase in locale "pt_BR": "o directório de 
destino"

```


I found that there is a typo in the file 
"/usr/share/locale-langpack/pt/LC_MESSAGES/snappy.mo".
```
$ dpkg -S /usr/share/locale-langpack/pt/LC_MESSAGES/snappy.mo
language-pack-pt-base: /usr/share/locale-langpack/pt/LC_MESSAGES/snappy.mo
$ dpkg -l language-pack-pt-base
ii  language-pack-pt-base 1:20.04+20210802 all          translations for 
language Portuguese
```

An available workaround is to fix the file manually...
```
sudo sed -i 's/o directório de destino/O diretório de destino/' 
/usr/share/locale-langpack/pt/LC_MESSAGES/snappy.mo
```
Probably must be fixed into language-pack-pt-base translation sources.


Or.... this can be interpreted as a bug in snapd that imposes capitalization 
rules on translations, at some "main.go" at line 176, as the message says.
I've downloaded snapd sources and found this validation on "cmd/snap/main.go":
```
$ cd /tmp && apt source snapd
$ sed '174,177!d' /tmp/snapd-*/cmd/snap/main.go
                // note IsLower != !IsUpper for runes with no upper/lower.
                if unicode.IsLower(r) && !strings.HasPrefix(desc, 
"login.ubuntu.com") && !strings.HasPrefix(desc, cmdName) {
                        noticef("description of %s's %q is lowercase: %q", 
cmdName, optName, desc)
                }
```

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1932579

Title:
  snap pt_BR locale shows warning every time

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1932579/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to