summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0cc4607)
raw | patch | inline | side by side (parent: 0cc4607)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 10 Jun 2008 14:25:21 +0000 (14:25 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 10 Jun 2008 14:25:21 +0000 (14:25 +0000) |
Use gosa-all messages.po or (when first not accessible) gosa-core messages.po as dictionary when doing a '../../gosa-core/update-locale' inside the plugin directory to speed up translations.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11281 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11281 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/update-locale | patch | blob | history |
index fce0d7db318ab4fa988c26bef7ec915a3fef5001..033ba84a3fcbb35167e3731820ff4aec61e171e7 100755 (executable)
--- a/gosa-core/update-locale
+++ b/gosa-core/update-locale
[[ "$f" == "locale/${l_path}??/LC_MESSAGES" ]] && break
echo -n "* merging $f/messages.po: "
[ ! -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
+
+ # If we're in a plugin of a trunk checkout, we can use the gosa-all messages.po as a dictionary
+ DICT_FILE_ALL="$ORIG/../../gosa-all/gosa/${f/locale/locale/core}/messages.po"
+ DICT_FILE_CORE="$ORIG/../../gosa-core/${f/locale/locale/core}/messages.po"
+ DICT=""
+ [ -r $DICT_FILE_ALL ] && DICT="-C $DICT_FILE_ALL"
+ [ ${#DICT} -eq 0 ] && [ -r $DICT_FILE_CORE ] && DICT="-C $DICT_FILE_CORE"
+ msgmerge $DICT $f/messages.po locale/${l_path}messages.po --output-file=$f/messages.po.tmp &> /dev/null
+
+ # Filter out duplicates
+ msguniq $f/messages.po.tmp --output-file=$f/messages.po.new &> /dev/null
+ rm $f/messages.po.tmp
# Do an extra check for dummy dir 'locale/en/LC_MESSAGES'
if [ $? -ne 0 ]; then