From 4b9f4323abfaa0f4030cc29aed97e0716f9c5852 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 11 Sep 2013 10:18:04 -0400 Subject: libremessages: add a few more message routines, and make them gettext-aware. - Don't set LANG=C in common.sh - Move TEXTDOMAIN stuff into common.sh; so devtools stuff will use it. - Add _(): Basically an alias for `gettext`, but falls back if gettext is not available. - Add panic(): First showed up in `distcc-tool`, does what it sounds like. - Add prose(), bullet(), and flag(): they do word wrapping and such to make it easy to internationalize `--help` text. - Teach common.mk how to make .pot files based on these routines. --- src/lib/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/lib/Makefile') diff --git a/src/lib/Makefile b/src/lib/Makefile index d7b4049..255bc05 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -10,8 +10,9 @@ include ../../common.mk common.sh: %: %.in %.top Makefile @echo "GEN $@" @{ \ - cat "$*.top" && \ - echo 'if [[ -z $${_INCLUDE_COMMON_SH:-} ]]; then' && \ - echo '_INCLUDE_COMMON_SH=true' && \ - cat "$*.in" && \ - echo 'fi'; } > "$@" + cat '$*.top' && \ + echo && \ + sed -r -e '/encoding problem/d;/LANG=/d' -e 's/mesg=\$$(.)/mesg="$$(_ "$$\1")"/' '$*.in' && \ + echo && \ + cat '$*.bottom' && \ + :; } > '$@' -- cgit v1.2.2