X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=po%2Fpostats.py;h=fe486517c0e7cb1c193b9e43c0f4f3211c2537fc;hb=37ebfdfcb5ba1a1efd403de8d1a054314b63bd55;hp=c8c37ec67aac3190665667a7955d6836aeef527c;hpb=103e8fdd90d803a8200c3260a4bf7b57ac31e976;p=lyx.git diff --git a/po/postats.py b/po/postats.py index c8c37ec67a..fe486517c0 100755 --- a/po/postats.py +++ b/po/postats.py @@ -26,6 +26,7 @@ and generates a PHP web page. Invocation: postats.py lyx_version po_files > "pathToWebPages"/i18n.inc """ +from __future__ import print_function # modify this when you change branch # Note that an empty lyx_branch variable (ie svn trunk) @@ -93,7 +94,7 @@ def run_msgfmt(pofile): The function runs msgfmt on it and returns corresponding php code. """ if not pofile.endswith('.po'): - print >> sys.stderr, "%s is not a po file" % pofile + print("%s is not a po file" % pofile, file=sys.stderr) sys.exit(1) dirname = os.path.dirname(pofile) @@ -127,12 +128,12 @@ array ( 'langcode' => '%(langcode)s', "date" => "%(date)s", if __name__ == "__main__": if lyx_branch: - branch_tag = "branches/%s" % lyx_branch + branch_tag = lyx_branch else: - branch_tag = "trunk" + branch_tag = "master" - print """ -""" % (sys.argv[1], branch_tag, ",".join([run_msgfmt(po) for po in sys.argv[2:] if po not in ommitted])) +)?>""" % (sys.argv[1], branch_tag, ",".join([run_msgfmt(po) for po in sys.argv[2:] if po not in ommitted])))