Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
intl: little optimization to po utils
  • Loading branch information
perexg committed Jun 20, 2015
1 parent 65a2f92 commit b935caf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion support/poc.py
Expand Up @@ -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');
Expand Down
5 changes: 4 additions & 1 deletion support/pojs.py
Expand Up @@ -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");

Expand Down

0 comments on commit b935caf

Please sign in to comment.