<p>On po/LINGUAS, I was guessing a bit how this bit of po/Makefile.in.in worked:</p>

<pre><code>ALL_LINGUAS = @ALL_LINGUAS@

PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)

USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)

USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)

POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)

DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS

POTFILES = \
# This comment gets stripped out

CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
</code></pre>

<p>I thought I'd tested it but apparently not.</p>

<p>Instead I think the answer is to set ALL_LINGUAS to the available translations, not the value of the user's LINGUAS.<br>
e.g.:<br>
<a href="https://www.redhat.com/archives/libvir-list/2008-April/msg00094.html">https://www.redhat.com/archives/libvir-list/2008-April/msg00094.html</a><br>
<a href="https://pidgin.im/pipermail/commits/2015-March/025530.html">https://pidgin.im/pipermail/commits/2015-March/025530.html</a></p>

<p>Pull request and test results here: <a href="https://github.com/geany/geany-plugins/pull/477" class="issue-link js-issue-link" data-url="https://github.com/geany/geany-plugins/issues/477" data-id="171013201" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#477</a></p>

<p>On expected behaviour:</p>

<blockquote>
<p>After a transition time for packages to be converted, the LINGUAS<br>
environment variable will maintain the standard gettext behaviour and<br>
will work as expected with all package managers. It controls which<br>
language translations are built and installed. An unset value means all<br>
available, an empty value means none, and a value can be an unordered<br>
list of gettext language codes, with or without country codes. Usually<br>
two letter language codes suffice, but can be narrowed down by country<br>
codes with a "ll_CC" formatting, where "ll" is the language code and<br>
"CC" is the country code, e.g., "en_GB".<br>
<a href="https://www.gentoo.org/support/news-items/2016-06-23-l10n-use_expand.html">https://www.gentoo.org/support/news-items/2016-06-23-l10n-use_expand.html</a></p>
</blockquote>

<p>(PR doesn't quite do that  empty value installs all, but I can live with that)</p>

<p>and:</p>

<blockquote>
<p>Unless translations are disabled, all those available are installed together with the package. However, the environment variable LINGUAS may be set, prior to configuration, to limit the installed set.<br>
<a href="https://www.gnu.org/software/gettext/manual/html_node/Installers.html#Installers">https://www.gnu.org/software/gettext/manual/html_node/Installers.html#Installers</a></p>
</blockquote>

<p>There is already pt_BR and zh_CN available, so I don't see en_GB as exceptional.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany-plugins/issues/475#issuecomment-239625902">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ2UNQBShyps4kmGbfeknyLMWrKQgks5qfeCHgaJpZM4Jid3f">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ7AaM97CXkTg4eMkVf4oVYJcVdKJks5qfeCHgaJpZM4Jid3f.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany-plugins/issues/475#issuecomment-239625902"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany-plugins","title":"geany/geany-plugins","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany-plugins"}},"updates":{"snippets":[{"icon":"PERSON","message":"@cjmayo in #475: On po/LINGUAS, I was guessing a bit how this bit of po/Makefile.in.in worked:\r\n```\r\nALL_LINGUAS = @ALL_LINGUAS@\r\n\r\nPO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v \"^\\#\" $(srcdir)/LINGUAS; else echo \"$(ALL_LINGUAS)\"; fi)\r\n\r\nUSER_LINGUAS=$(shell if test -n \"$(LINGUAS)\"; then LLINGUAS=\"$(LINGUAS)\"; ALINGUAS=\"$(ALL_LINGUAS)\"; for lang in $$LLINGUAS; do if test -n \"`grep \\^$$lang$$ $(srcdir)/LINGUAS 2\u003e/dev/null`\" -o -n \"`echo $$ALINGUAS|tr ' ' '\\n'|grep \\^$$lang$$`\"; then printf \"$$lang \"; fi; done; fi)\r\n\r\nUSE_LINGUAS=$(shell if test -n \"$(USER_LINGUAS)\" -o -n \"$(LINGUAS)\"; then LLINGUAS=\"$(USER_LINGUAS)\"; else if test -n \"$(PO_LINGUAS)\"; then LLINGUAS=\"$(PO_LINGUAS)\"; else LLINGUAS=\"$(ALL_LINGUAS)\"; fi; fi; for lang in $$LLINGUAS; do printf \"$$lang \"; done)\r\n\r\nPOFILES=$(shell LINGUAS=\"$(PO_LINGUAS)\"; for lang in $$LINGUAS; do printf \"$$lang.po \"; done)\r\n\r\nDISTFILES = Makefile.in.in POTFILES.in $(POFILES)\r\nEXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS\r\n\r\nPOTFILES = \\\r\n# This comment gets stripped out\r\n\r\nCATALOGS=$(shell LINGUAS=\"$(USE_LINGUAS)\"; for lang in $$LINGUAS; do printf \"$$lang.gmo \"; done)\r\n```\r\nI thought I'd tested it but apparently not.\r\n\r\nInstead I think the answer is to set ALL_LINGUAS to the available translations, not the value of the user's LINGUAS.\r\ne.g.:\r\nhttps://www.redhat.com/archives/libvir-list/2008-April/msg00094.html\r\nhttps://pidgin.im/pipermail/commits/2015-March/025530.html\r\n\r\nPull request and test results here: https://github.com/geany/geany-plugins/pull/477\r\n\r\nOn expected behaviour:\r\n\u003e After a transition time for packages to be converted, the LINGUAS\r\nenvironment variable will maintain the standard gettext behaviour and\r\nwill work as expected with all package managers. It controls which\r\nlanguage translations are built and installed. An unset value means all\r\navailable, an empty value means none, and a value can be an unordered\r\nlist of gettext language codes, with or without country codes. Usually\r\ntwo letter language codes suffice, but can be narrowed down by country\r\ncodes with a \"ll_CC\" formatting, where \"ll\" is the language code and\r\n\"CC\" is the country code, e.g., \"en_GB\".\r\nhttps://www.gentoo.org/support/news-items/2016-06-23-l10n-use_expand.html\r\n\r\n(PR doesn't quite do that  empty value installs all, but I can live with that)\r\n\r\nand:\r\n\r\n\u003e Unless translations are disabled, all those available are installed together with the package. However, the environment variable LINGUAS may be set, prior to configuration, to limit the installed set.\r\nhttps://www.gnu.org/software/gettext/manual/html_node/Installers.html#Installers\r\n\r\nThere is already pt_BR and zh_CN available, so I don't see en_GB as exceptional.\r\n"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany-plugins/issues/475#issuecomment-239625902"}}}</script>