Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix errors reported by flake8
  • Loading branch information
sushain97 committed Jun 19, 2017
commit f9f50fbe51a6a8064de8d269f315881f5f187540
1 change: 1 addition & 0 deletions assets/strings/localisation-tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def dumpJSON(f, data):
def loadJSON(f):
return json.loads(f.read(), object_pairs_hook=OrderedDict)


if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Manipulate localisation files', formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('actions', nargs='+', help="new/create: creates a new localisation file\n"
Expand Down
1 change: 1 addition & 0 deletions tools/localise-html.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def run(html_path, json_path, out_path, conf_path, fallback_path):
with open(out_path, 'w') as out:
out.write("".join(parser.output))


if __name__ == "__main__":
argparser = argparse.ArgumentParser(description='Localise an HTML file using a json file from stdin')
argparser.add_argument('template', help='HTML file to localise')
Expand Down