Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Sep 2017 08:22:26 +0200
From:      Romain =?iso-8859-1?Q?Tarti=E8re?= <romain@FreeBSD.org>
To:        Karli =?iso-8859-1?Q?Sj=F6berg?= <karli@inparadise.se>, Zach <zleslie@freebsd.org>, ports@freebsd.org, puppet@freebsd.org
Subject:   Re: gettextsetup warnings
Message-ID:  <20170921062226.GA65348@blogreen.org>
In-Reply-To: <20170920130652.GA64379@blogreen.org>
References:  <08c976dd-c1c3-4fb5-8455-4495aa74b75e@email.android.com> <20170919160959.fzkfc5kheny47naq@celtis.u.larch.space> <20170919224759.GA25389@blogreen.org> <1505886363.2296.61.camel@inparadise.se> <20170920064116.GA54261@blogreen.org> <20170920074323.GA56396@blogreen.org> <20170920130652.GA64379@blogreen.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 20, 2017 at 03:06:52PM +0200, Romain Tarti=C3=A8re wrote:
> Unfortunately, changing locales works on my computer =E2=80=A6
> [...]
> =E2=80=A6 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-set=
up/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=E2=80=A6  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/41ea629eca9112510613d966a8e0639f3=
cb91da1

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

Romain

--=20
Romain Tarti=C3=A8re <romain@FreeBSD.org>  http://people.FreeBSD.org/~romai=
n/
pgp: 8234 9A78 E7C0 B807 0B59  80FF BA4D 1D95 5112 336F (ID: 0x5112336F)
(plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated)

--C7zPtVaVf+AK4Oqc
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGzBAEBCAAdFiEEgjSaeOfAuAcLWYD/uk0dlVESM28FAlnDWp4ACgkQuk0dlVES
M2+ljgv+LjaK0iXnzkOI70bfCtM/cq7s6A0wTZL/q6aLw8B5b7Xu2kQtrufOa+il
dKxLW4Y6olOQWGqWMu7zM2RGhU3/3DmVMd5tLaKsHGsjzaK8fUAjp1lbnryYe3bE
UusDnf4+pnNBHgSjTw0PLHPSgXsCMISnrSlTDj4hnn3Uah9qygVPqTiTTXrbjFYQ
fPWc6LBeiscmIkR32Var5pbVtTRfHKO5GZQmpc0a1GSywIujkKfr4IhZ0P+RENYV
cK40oM809syfcKIULlCoeDs+HkWagYC3C4VtAYghe4NECAf5qrQTckZKXG0ZhAzY
i648w0GaA867PLkCvj3NU7YBQFYQLWXEWKE6N18t+HDK7Tmd9cKtqCWHLfNv/yne
IMZm0BYvVDDhoAxnUV18mEhWWyvsC/Zb3X18uvR9wuUNviSTD1ohD6iPYGRraK0C
VIPKpt1bqpc4RbGBe3nJ/Cz6hRei/GDCvhRrz5LhE1Q7yZfQg+7bXvt29pjjPsnP
tFI3mOJX
=dPDE
-----END PGP SIGNATURE-----

--C7zPtVaVf+AK4Oqc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170921062226.GA65348>