forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds nls useflag and includes backported upstream patch to honor LINGUAS. Fixes bug 409969. Closes: gentoo#4072
- Loading branch information
Showing
2 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/Makefile.in b/Makefile.in | ||
index 35e63ae..b73c612 100644 | ||
--- a/Makefile.in | ||
+++ b/Makefile.in | ||
@@ -195,11 +195,16 @@ ifeq ($(shell uname), Darwin) | ||
endif | ||
|
||
# | ||
-# All translation message catalogs | ||
+# All translation message catalogs, filter files based on LINGUAS. | ||
# | ||
TRANSLATIONS_SRC := $(wildcard po/*.po) | ||
-ifdef HAVE_GETTEXT | ||
+ifeq ($(HAVE_GETTEXT), 1) | ||
TRANSLATIONS := $(TRANSLATIONS_SRC:.po=.gmo) | ||
+ifdef LINGUAS | ||
+ TRANSLATIONS_ALL := $(TRANSLATIONS) | ||
+ TRANSLATIONS_WANTED = $(patsubst %,po/%.gmo,$(LINGUAS)) | ||
+ TRANSLATIONS = $(filter $(TRANSLATIONS_WANTED),$(TRANSLATIONS_ALL)) | ||
+endif | ||
else | ||
TRANSLATIONS := | ||
endif | ||
@@ -764,7 +769,7 @@ uninstall: uninstall-translations | show-prefix show-bindir show-sysconfdir show | ||
.PHONY: uninstall | ||
|
||
install-translations: $(TRANSLATIONS) | show-HAVE_GETTEXT | ||
-ifdef HAVE_GETTEXT | ||
+ifeq ($(HAVE_GETTEXT), 1) | ||
@echo "Installing translations..." | ||
$v for i in $(TRANSLATIONS); do \ | ||
$(INSTALL) -m 755 -d $(DESTDIR)$(localedir)/`basename $$i .gmo`/LC_MESSAGES; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters