X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=cron.d%2F500update_mo;h=9676466cd4c7b83d58dda167dbc70b1c54122cea;hb=a25c95422f90812abd754ce588a9fb71de3c1e7f;hp=3b5c844362668ea489fcfb5713f86c990139a037;hpb=3cb141cbaf6a29c81ea464e555df33eaa8a75eec;p=deb%2Fpackages.git diff --git a/cron.d/500update_mo b/cron.d/500update_mo index 3b5c844..9676466 100755 --- a/cron.d/500update_mo +++ b/cron.d/500update_mo @@ -44,7 +44,7 @@ templates/rfc822/search.tmpl templates/rss/newpkg.tmpl templates/txt/index.tmpl " -podomains="pdo templates sections langs" +podomains="pdo templates sections langs debtags" # Update pot # @@ -54,9 +54,12 @@ xgettext_opts="--language=Perl --keyword=N_ --keyword=_g --foreign-user --add-co echo gettextfiles=$gettextfiles echo templatefiles=$templatefiles xgettext $xgettext_opts -d pdo -o ${podir}/pdo.pot.new ${gettextfiles} -$topdir/bin/ttxgettext templates ${templatefiles} >${podir}/templates.pot.new xgettext $xgettext_opts -d sections -o ${podir}/sections.pot.new ${libdir}/Packages/Sections.pm xgettext $xgettext_opts -d langs -o ${podir}/langs.pot.new ${libdir}/Packages/I18N/LanguageNames.pm +$topdir/bin/ttxgettext templates ${templatefiles} >${podir}/templates.pot.new +if [ -f files/debtags/vocabulary ]; then + $topdir/bin/debtags-xgettext files/debtags/vocabulary >${podir}/debtags.pot.new +fi cd $podir @@ -74,7 +77,7 @@ done for domain in ${podomains} do perl -p -i -e "s,^#:\s*\Q${topdir}\E,#: .,go" ${domain}.pot.new - if diff -I"POT-Creation-Date" -q ${domain}.pot.new ${domain}.pot >/dev/null 2>&1 + if [ ! -f ${domain}.pot.new ] || diff -I"POT-Creation-Date" -q ${domain}.pot.new ${domain}.pot >/dev/null 2>&1 then echo "${domain}.pot unchanged" rm ${domain}.pot.new