GNU Hello: No localization; Where's the source?


#1
$ snap version
snap    2.35
snapd   2.35
series  16
neon    16.04
kernel  4.15.0-33-generic

$ snap info hello
name:      hello
summary:   GNU Hello, the "hello world" snap
publisher: Canonical✓
contact:   snaps@canonical.com
license:   unset
description: |
  GNU hello prints a friendly greeting. This is part of the snapcraft tour at
  https://snapcraft.io/
commands:
  - hello
  - hello.universe
snap-id:      mVyGrEwiqSi5PugCwyH7WgpoQLemtTd6
tracking:     stable
refresh-date: today at 12:38 CST
channels:                      
  stable:    2.10    (20) 65kB -
  candidate: 2.10    (20) 65kB -
  beta:      2.10.1  (29) 65kB -
  edge:      2.10.42 (34) 65kB -
installed:   2.10    (20) 65kB -

$ locale
LANG=zh_TW.UTF-8
LANGUAGE=zh_TW:zh_CN:en_US:zh_TW:zh_CN
LC_CTYPE="zh_TW.UTF-8"
LC_NUMERIC="zh_TW.UTF-8"
LC_TIME="zh_TW.UTF-8"
LC_COLLATE="zh_TW.UTF-8"
LC_MONETARY="zh_TW.UTF-8"
LC_MESSAGES="zh_TW.UTF-8"
LC_PAPER="zh_TW.UTF-8"
LC_NAME="zh_TW.UTF-8"
LC_ADDRESS="zh_TW.UTF-8"
LC_TELEPHONE="zh_TW.UTF-8"
LC_MEASUREMENT="zh_TW.UTF-8"
LC_IDENTIFICATION="zh_TW.UTF-8"
LC_ALL=

$ snap run hello
Hello, world!

$ which hello
/usr/bin/hello

$ hello
哈囉,大家好!

Gnome calendar is not in spanish
GNU Hello (again, for snapcrafters)
Intent-To-Package: GNU Hello (again, for snapcrafters)
Call for testing: The hello-snapcrafters snap
#2

Regular ping…


#3

Regular ping…


#4

Regular bump…


#5

Are you looking for the source that actually built the snap (ie the snapcraft.yaml)? Or the code for the gnu hello? I believe the gnu hello code is here:
https://www.gnu.org/software/hello/


#6

Yes, that’s what I want.


#7

seems apple localized it in french though (sorry, could not resist :smiley: )

https://developer.apple.com/bonjour/


#8

Regular ping……


#9

Based on the description of the snap, I suspect it is built from the snapcraft.yaml included in this section of the documentation:

https://docs.snapcraft.io/build-snaps/your-first-snap#from-an-app-to-a-snap


#10

There should be somewhere hosting the snap’s source? Apparently there’s a packaging bug in the snap and as an demonstrative snap this is quite not acceptable.


#11

The source of the documentation is here:

I’m not sure it’d be useful to add extra work-arounds to that snapcraft.yaml, since it would reduce its utility as a tutorial.

As for the bug you mentioned, the problem is almost certainly down to snapcraft building autotools projects with a prefix that differs to where the app is actually going to be installed.

Neither of the values for the install-via property are appropriate: one configures the project with a prefix of "", and the other with a temporary directory as the prefix. Neither option is appropriate for apps that compile in absolute paths based on the prefix (as is likely the case with GNU Hello’s bindtextdomain call).


Snaps officially supported by Canonical
#12

I noticed that the hello snap actually output different messages according to it’s providing channel:

$ snap refresh --channel=beta hello
hello (beta) 2.10.1 from Canonical✓ refreshed
$ snap run hello
Hello, snap padawan!
$ snap refresh --channel=edge hello
hello (edge) 2.10.42 from Canonical✓ refreshed
$ snap run hello
Hello, snap guru!

#13

Nevermind, I finally found it:


#14

I have filed a fix here: