]> git.deb.at Git - deb/packages.git/blobdiff - cron.d/500update_mo
Add Hungarian translation (sections+langs)
[deb/packages.git] / cron.d / 500update_mo
index ec37c4fd0b0e699c6a661e109655deab72b6bb40..073e8429d5b520ebc9e54494432150a8010d1002 100755 (executable)
@@ -2,17 +2,59 @@
 
 . `dirname $0`/../config.sh
 
-gettextfiles=$(find cgi-bin lib -not -name 'LanguageNames.pm' -a -not -name 'Sections.pm' -a \( -name '*.pl' -o -name '*.pm' \));
-gettextfiles="$gettextfiles bin/create_index_pages"
-podomains="pdo sections langs"
+cd "$topdir"
+gettextfiles="
+lib/Packages/CGI.pm
+lib/Packages/Config.pm
+lib/Packages/DB.pm
+lib/Packages/DoDownload.pm
+lib/Packages/DoFilelist.pm
+lib/Packages/DoIndex.pm
+lib/Packages/DoNewPkg.pm
+lib/Packages/DoSearch.pm
+lib/Packages/DoSearchContents.pm
+lib/Packages/DoShow.pm
+lib/Packages/Page.pm
+lib/Packages/Search.pm
+lib/Packages/SrcPage.pm
+lib/Packages/Template.pm
+lib/Packages/Dispatcher.pm
+bin/create_index_pages
+"
+templatefiles="
+templates/config.tmpl
+templates/config/architectures.tmpl
+templates/config/archive_layout.tmpl
+templates/config/mirrors.tmpl
+templates/html/download.tmpl
+templates/html/error.tmpl
+templates/html/filelist.tmpl
+templates/html/foot.tmpl
+templates/html/head.tmpl
+templates/html/index.tmpl
+templates/html/menu.inc
+templates/html/messages.tmpl
+templates/html/newpkg.tmpl
+templates/html/search.tmpl
+templates/html/search_contents.tmpl
+templates/html/show.tmpl
+templates/html/suite_index.tmpl
+templates/html/tag_index.tmpl
+templates/rfc822/search.tmpl
+templates/rss/newpkg.tmpl
+templates/txt/index.tmpl
+"
+podomains="pdo templates sections langs"
 
 # Update pot
 #
 # Common options for all calls
-xgettext_opts="--language=Perl --keyword=_ --keyword=N_ --keyword=_g --foreign-user --add-comments"
+xgettext_opts="--language=Perl --keyword=N_ --keyword=_g --foreign-user --add-comments"
 
 echo gettextfiles=$gettextfiles
+echo templatefiles=$templatefiles
 xgettext $xgettext_opts -d pdo -o ${podir}/pdo.pot ${gettextfiles}
+$topdir/bin/ttxgettext templates ${templatefiles} >${podir}/templates.pot
 xgettext $xgettext_opts -d sections -o ${podir}/sections.pot ${libdir}/Packages/Sections.pm
 xgettext $xgettext_opts -d langs -o ${podir}/langs.pot ${libdir}/Packages/I18N/LanguageNames.pm
 
@@ -40,8 +82,8 @@ for lang in ${polangs}
 do
   for domain in ${podomains}
   do
-    mv ${domain}.${lang}.po ${domain}.${lang}.po.tmp
-    msgmerge -q -F -o ${domain}.${lang}.po ${domain}.${lang}.po.tmp ${domain}.pot
+    cp ${domain}.${lang}.po ${domain}.${lang}.po.tmp
+    msgmerge --previous --quiet --sort-by-file -o ${domain}.${lang}.po ${domain}.${lang}.po.tmp ${domain}.pot
     rm ${domain}.${lang}.po.tmp
     # normalize paths in .po files
     perl -p -i -e "s,^#:\s*\Q${topdir}\E,#: .,go" ${domain}.${lang}.po