diff options
author | rofl0r <retnyg@gmx.net> | 2012-09-18 20:41:12 +0200 |
---|---|---|
committer | rofl0r <retnyg@gmx.net> | 2012-09-18 20:41:12 +0200 |
commit | fe33d6997c76c9c053231dbbb9279287d2598d53 (patch) | |
tree | 0dbd946c42eebc2c5cbd468a6178e772bc7cac05 | |
parent | 5f01e61d73695aeb141ac9d45ca0eda844fd0556 (diff) | |
download | gettext-tiny-fe33d6997c76c9c053231dbbb9279287d2598d53.tar.gz |
xgettext: use passed domain
-rwxr-xr-x | src/xgettext.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xgettext.sh b/src/xgettext.sh index 74c5a87..20d3e86 100755 --- a/src/xgettext.sh +++ b/src/xgettext.sh @@ -2,6 +2,7 @@ outputfile= outputdir=. +domain=messages spliteq() { arg=$1 @@ -26,8 +27,8 @@ parsearg() { #-f) expectfilefrom=1;; --version) show_version;; -V) show_version;; - --default-domain=*) : ;; #outputfiles=`spliteq "$1"`.po ;; - -d) shift ;; + --default-domain=*) domain=`spliteq "$1"` ;; + -d) shift ; domain="$1" ;; --files-from=*) : ;; -f) shift ;; --directory=*) : ;; @@ -108,7 +109,7 @@ while true ; do esac done -[ -z "$outputfile" ] && outputfile=messages.po +[ -z "$outputfile" ] && outputfile=${domain}.po [ "$outputfile" = "-" ] && exit 0 if [ "$force" = "1" ] ; then touch $outputdir/$outputfile |