gettextsetup warnings

Romain Tartière romain at FreeBSD.org
Thu Sep 21 06:22:28 UTC 2017


On Wed, Sep 20, 2017 at 03:06:52PM +0200, Romain Tartière wrote:
> Unfortunately, changing locales works on my computer …
> [...]
> … but not on the other nodes I manage :-/
> [...]
> I currently fail at locating what is different between these nodes.

Found the culprit yesterday in the train! But Internet access is flaky
here :-/

The problems is in the gettext-setup gem, which detects the available
locales in a wrong way (it search for .po files, and when found, add the
directory name to the valid locales available):
https://github.com/puppetlabs/gettext-setup-gem/blob/master/lib/gettext-setup/gettext_setup.rb#L97-L102

Since we only have .mo files in the searched directory, you guess why
the 'ja' locale was not considered available.

But in fact the problem is deeper: the hunt for .po files happens in
multiple directories, and if such a file is available in any of these
directories, the locale is enabled…  So on my system, it looks like the
file /usr/local/share/locale/ja/gutenprint_ja.po installed by
print/gutenprint white-listed the 'ja' locale, and then
/var/puppet/share/locale/ja/LC_MESSAGES/puppet.mo could be used.

The patched gettext-setup gem is available here:
https://github.com/smortex/puppet5/commit/41ea629eca9112510613d966a8e0639f3cb91da1

I am currently deploying this on my nodes in case this changes has other
unexpected consequences.

Romain

-- 
Romain Tartière <romain at FreeBSD.org>  http://people.FreeBSD.org/~romain/
pgp: 8234 9A78 E7C0 B807 0B59  80FF BA4D 1D95 5112 336F (ID: 0x5112336F)
(plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20170921/f890e7eb/attachment.sig>


More information about the freebsd-ports mailing list