summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f205ef)
raw | patch | inline | side by side (parent: 7f205ef)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 2 Jun 2008 07:50:13 +0000 (07:50 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 2 Jun 2008 07:50:13 +0000 (07:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11131 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/update-locale | patch | blob | history |
index e93a247064e584c0ae48f877d5779f88cdbe8487..fce0d7db318ab4fa988c26bef7ec915a3fef5001 100755 (executable)
--- a/gosa-core/update-locale
+++ b/gosa-core/update-locale
for f in locale/${l_path}??/LC_MESSAGES; do
[[ "$f" == "locale/${l_path}??/LC_MESSAGES" ]] && break
echo -n "* merging $f/messages.po: "
- [ -f $f/messages.po ] && msgmerge $f/messages.po locale/${l_path}messages.po --output-file=$f/messages.po.new &> /dev/null
+ [ ! -f $f/messages.po ] && touch $f/messages.po
+ msgmerge $f/messages.po locale/${l_path}messages.po --output-file=$f/messages.po.new &> /dev/null
# Do an extra check for dummy dir 'locale/en/LC_MESSAGES'
if [ $? -ne 0 ]; then
y) ASSUME_Y=1;
;;
h|--help)
- echo "Usage: $(basename $0) [-g] [-y] method"
- echo " method can be 'core' or 'plugin'"
+ echo "Usage: $(basename $0) [-g] [-y]"
echo " -g extract strings from GOsa and generate po files"
echo " -y assume yes"
exit 1
done
shift $(($OPTIND - 1))
-# Check method
-if [ "$1" != "plugin" -a "$1" != "core" ]; then
- echo "Need explicit method 'core' or 'plugin' to create locale."
- exit 1
-fi
-if [ "$1" == "plugin" ]; then
+# If there's a plugin.dsc in ., then assume "plugin"
+if [ -f plugin.dsc ]; then
l_path=""
else
l_path="core/"