Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamp NLS support. Drop intltool, code po/Makefile.am manually
Using $(shell ...) probably isn't portable, so may need to be expanded by the configure script. But this is a start... Using gettextize seemed to pull in a bunch of other crap; I'd rather just disable NLS support on crappy platforms where the msgfmt tool doesn't exist, or where dgettext() isn't even available in -lintl. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
- Loading branch information
David Woodhouse
authored and
David Woodhouse
committed
Nov 3, 2011
1 parent
655eb0b
commit b976ecb
Showing
6 changed files
with
66 additions
and
23 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
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
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
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
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,34 @@ | ||
POTFILESIN = $(shell grep -v '^\#' $(srcdir)/POTFILES.in) | ||
POTFILES = $(POTFILESIN:%=$(top_srcdir)/%) | ||
LINGUAS = $(shell cat $(srcdir)/LINGUAS) | ||
MOFILES = $(LINGUAS:=.mo) | ||
POFILES = $(LINGUAS:=.po) | ||
|
||
noinst_DATA = $(MOFILES) | ||
|
||
SUFFIXES = .mo | ||
|
||
.po.mo: | ||
rm -f && $(MSGFMT) -o $@ $< | ||
|
||
clean-local: | ||
rm -f $(MOFILES) | ||
|
||
install-data-hook: all | ||
linguas="$(LINGUAS)"; \ | ||
for l in $$linguas; do \ | ||
dir="$(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES"; \ | ||
$(mkdir_p) $$dir; \ | ||
echo Installing $$l.mo to $$dir/$(PACKAGE).mo ; \ | ||
$(INSTALL_DATA) $$l.mo $$dir/$(PACKAGE).mo; \ | ||
done | ||
|
||
$(GETTEXT_PACKAGE).pot: $(POTFILES) Makefile | ||
rm -f $@ && \ | ||
xgettext --directory=$(top_srcdir) \ | ||
--add-comments --keyword=_ --keyword=N_ \ | ||
--files-from=$(srcdir)/POTFILES.in --from-code=UTF-8 \ | ||
--package-name="@PACKAGE@" --package-version="@VERSION@" \ | ||
--msgid-bugs-address=openconnect-devel@lists.infradead.org -o $@ | ||
|
||
EXTRA_DIST = $(POFILES) LINGUAS POTFILES.in |
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