From ccb7a81d8684a376bfd872db307ca4bcde887a92 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 2 Oct 2011 18:09:36 +0000 Subject: - fix for keymap test operator - cleanup pep8 warnings and unused py imports py pep8 cleanup --- po/clean_po.py | 16 ++++++++-------- po/merge_po.py | 9 ++++----- 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'po') diff --git a/po/clean_po.py b/po/clean_po.py index 2cbd2cb33ac..685ec585ffd 100755 --- a/po/clean_po.py +++ b/po/clean_po.py @@ -133,12 +133,12 @@ def do_clean(po, pot_messages): if pot_messages.get(msgid): t = po_messages.get(msgid) if not t: - print(('Reusing full item from commented ' + \ - 'lines for msgid \'%s\'') % (msgid)) + print("Reusing full item from commented " + "lines for msgid '%s'" % msgid) po_messages[msgid] = commented_messages[msgid] elif not t['translation']: - print(('Reusing translation from commented ' + \ - 'lines for msgid \'%s\'') % (msgid)) + print("Reusing translation from commented " + "lines for msgid '%s'" % msgid) m = commented_messages[msgid] t['translation'] = m['translation'] t['translation_lines'] = m['translation_lines'] @@ -153,17 +153,17 @@ def do_clean(po, pot_messages): first = True for x in item['message_lines']: if first: - handle.write("msgid \"%s\"\n" % (x)) + handle.write("msgid \"%s\"\n" % x) else: - handle.write("\"%s\"\n" % (x)) + handle.write("\"%s\"\n" % x) first = False first = True for x in item['translation_lines']: if first: - handle.write("msgstr \"%s\"\n" % (x)) + handle.write("msgstr \"%s\"\n" % x) else: - handle.write("\"%s\"\n" % (x)) + handle.write("\"%s\"\n" % x) first = False handle.write("\n") diff --git a/po/merge_po.py b/po/merge_po.py index b4a1ffa399e..b0b29a3ac8e 100755 --- a/po/merge_po.py +++ b/po/merge_po.py @@ -23,7 +23,6 @@ # update the pot file according the POTFILES.in -import os import sys import collections @@ -145,17 +144,17 @@ def main(): first = True for x in item['message_lines']: if first: - handle.write("msgid \"%s\"\n" % (x)) + handle.write("msgid \"%s\"\n" % x) else: - handle.write("\"%s\"\n" % (x)) + handle.write("\"%s\"\n" % x) first = False first = True for x in item['translation_lines']: if first: - handle.write("msgstr \"%s\"\n" % (x)) + handle.write("msgstr \"%s\"\n" % x) else: - handle.write("\"%s\"\n" % (x)) + handle.write("\"%s\"\n" % x) first = False handle.write("\n") -- cgit v1.2.3