X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=po%2Fpostats.py;h=7d26e244f2028df1c9824e97ffcd85d230b27f06;hb=506af6e2dad02ccef5f082029c81ccf70115a863;hp=75925f6a920c386e6e94cae64c068054782d36ea;hpb=4fa8163a2d9586047ddc1a859afe3efa21c194fb;p=lyx.git diff --git a/po/postats.py b/po/postats.py old mode 100644 new mode 100755 index 75925f6a92..7d26e244f2 --- a/po/postats.py +++ b/po/postats.py @@ -24,21 +24,23 @@ to retrieve the number of translated/fuzzy/untranslated messages, and generates a PHP web page. Invocation: - postats.py po_files > "pathToWebPages"/i18n.inc + postats.py lyx_version po_files > "pathToWebPages"/i18n.inc """ -# modify this when you change version +# modify this when you change branch # Note that an empty lyx_branch variable (ie svn trunk) # will "do the right thing". -lyx_version="1.6.0svn" lyx_branch="" +# these po-files will be skipped: +ommitted = ('en.po') import os import sys # Reset the locale import locale -locale.setlocale(locale.LC_ALL, '') +locale.setlocale(locale.LC_ALL, 'C') +os.environ['LC_ALL'] = 'C' def extract_number(line, issues, prop): """ @@ -138,5 +140,4 @@ $branch_tag = "%s"; // The data itself $podata = array (%s -)?> -""" % (lyx_version, branch_tag, ",".join([run_msgfmt(po) for po in sys.argv[1:]])) +)?>""" % (sys.argv[1], branch_tag, ",".join([run_msgfmt(po) for po in sys.argv[2:] if po not in ommitted]))