From: Jaroslav Kysela Date: Sat, 20 Jun 2015 14:42:26 +0000 (+0200) Subject: intl: little optimization to po utils X-Git-Tag: v4.2.1~2288 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b935caf646be2ed390114c458c8d3b18fa3a3f94;p=thirdparty%2Ftvheadend.git intl: little optimization to po utils --- diff --git a/support/poc.py b/support/poc.py index b32391435..81475fb7b 100755 --- a/support/poc.py +++ b/support/poc.py @@ -122,7 +122,9 @@ def to_c(po_files): sep = '' for s in strings: if s != strings[s]: - sys.stdout.write('%s"%s", "%s"' % (sep, cstr(s), cstr(strings[s]))); + a = cstr(s) + b = cstr(strings[s]) + sys.stdout.write('%s"%s", "%s"' % (sep, a, b)); sep = ',\n' sys.stdout.write('%sNULL, NULL' % sep) sys.stdout.write('\n};\n\n'); diff --git a/support/pojs.py b/support/pojs.py index e42ce269d..3c829aae7 100755 --- a/support/pojs.py +++ b/support/pojs.py @@ -111,7 +111,10 @@ def cnv(fn): sep = '' for s in po.strings: if s != po.strings[s]: - sys.stdout.write("%s'%s':'%s'" % (sep, jsstr(s), jsstr(po.strings[s]))) + a = jsstr(s) + b = jsstr(po.strings[s]) + if a != b: + sys.stdout.write("%s'%s':'%s'" % (sep, a, b)) sep = ',\n' sys.stdout.write("\n}\n");