From: Michael Andres Date: Wed, 8 Jun 2011 12:34:39 +0000 (+0200) Subject: Fix createPot script to allow automated translation processing X-Git-Tag: 1.6.11~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cb5e6c9d6daef057792e83c8f2e816d7bf9c4b6;p=platform%2Fupstream%2Fzypper.git Fix createPot script to allow automated translation processing --- diff --git a/po/POTFILES.in b/po/POTFILES.in deleted file mode 100644 index acc06e5..0000000 --- a/po/POTFILES.in +++ /dev/null @@ -1,34 +0,0 @@ -# list of files containing translatable texts -# find ../src \( -name '*.cc' -o -name '*.h' \) -exec grep -Pl '(\_\()|(\_PL\()' {} \; > tmp -# cat tmp | sort > POTFILES.in.new -../src/callbacks/keyring.h -../src/callbacks/locks.h -../src/callbacks/media.cc -../src/callbacks/media.h -../src/callbacks/repo.h -../src/callbacks/rpm.h -../src/Command.cc -../src/Config.cc -../src/info.cc -../src/locks.cc -../src/main.cc -../src/main.h -../src/misc.cc -../src/output/OutNormal.cc -../src/PackageArgs.cc -../src/repos.cc -../src/RequestFeedback.cc -../src/search.cc -../src/solve-commit.cc -../src/SolverRequester.cc -../src/SolverRequester.h -../src/Summary.cc -../src/update.cc -../src/utils/Augeas.cc -../src/utils/getopt.cc -../src/utils/messages.cc -../src/utils/misc.cc -../src/utils/pager.cc -../src/utils/prompt.cc -../src/utils/prompt.h -../src/Zypper.cc diff --git a/po/createPot b/po/createPot index 70b5bbf..c5b318c 100755 --- a/po/createPot +++ b/po/createPot @@ -1,7 +1,15 @@ #!/bin/bash +SOURCE_DIR="${1:-..}" +POTFILE="${2:-po/zypper.pot}" # search for sourcecode-files -SRCFILES=$(cat POTFILES.in | grep -v -P '#.+') +cd "$SOURCE_DIR" +SRCFILES=`find src \ + -type f -name "*.h" \ + -o -name "*.pm" \ + -o -name "*.c" \ + -o -name "*.cc" \ + -o -name "*.cpp"` #calling xgettext with the sourcefiles -xgettext --no-wrap --add-comments --add-location --keyword=_ --keyword=_:1,2 --keyword=__ --keyword=N_ --keyword=_PL:1,2 --foreign-user --copyright-holder="SuSE Linux Products GmbH, Nuernberg" --default-domain=zypper --output=zypper.pot $SRCFILES +xgettext --no-wrap --add-comments --add-location --keyword=_ --keyword=_:1,2 --keyword=__ --keyword=N_ --keyword=_PL:1,2 --foreign-user --copyright-holder="SuSE Linux Products GmbH, Nuernberg" --default-domain=zypper --output="$POTFILE" $SRCFILES