diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-11 10:18:04 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-11 15:43:36 -0400 |
commit | 4b9f4323abfaa0f4030cc29aed97e0716f9c5852 (patch) | |
tree | 1dca8650a1a5857f180aaa7704b7b7ee3ba77d32 /src/lib/Makefile | |
parent | 5bbf15572626010ce6e2bc783d0a980fc24662b2 (diff) |
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.
Diffstat (limited to 'src/lib/Makefile')
-rw-r--r-- | src/lib/Makefile | 11 |
1 files changed, 6 insertions, 5 deletions
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' && \ + :; } > '$@' |