[Github-comments] [geany/geany-plugins] Build fails if no translation matching $LINGUAS (#475)

Chris Mayo notifications at xxxxx
Sat Aug 13 15:19:35 UTC 2016


On po/LINGUAS, I was guessing a bit how this bit of po/Makefile.in.in worked:
```
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)
```
I thought I'd tested it but apparently not.

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

Pull request and test results here: https://github.com/geany/geany-plugins/pull/477

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

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

and:

> 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.
https://www.gnu.org/software/gettext/manual/html_node/Installers.html#Installers

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


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/475#issuecomment-239625902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160813/f7497b93/attachment.html>


More information about the Github-comments mailing list