From baa2e650a5e53303b13a8d0ffe50e30237cb403b Mon Sep 17 00:00:00 2001 From: Sworddragon Date: Fri, 6 May 2011 18:27:06 +0200 Subject: Set the root directory of teeworlds as the main directory for scripts --- scripts/update_localization.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts/update_localization.py') diff --git a/scripts/update_localization.py b/scripts/update_localization.py index bb80d8b2..08c1866e 100644 --- a/scripts/update_localization.py +++ b/scripts/update_localization.py @@ -2,6 +2,7 @@ import os, re, sys match = re.search('(.*)/', sys.argv[0]) if match != None: os.chdir(match.group(1)) +os.chdir('../') source_exts = [".c", ".cpp", ".h"] @@ -13,7 +14,7 @@ def parse_source(): stringtable[fields[0]] = "" process_line(fields[1]) - for root, dirs, files in os.walk("../src"): + for root, dirs, files in os.walk("src"): for name in files: filename = os.path.join(root, name) @@ -80,11 +81,11 @@ srctable = parse_source() print("%-40s %8s %8s %8s" % ("filename", "total", "new", "old")) -for filename in os.listdir("../data/languages"): +for filename in os.listdir("data/languages"): if not ".txt" in filename: continue if filename == "index.txt": continue - filename = "../data/languages/" + filename + filename = "data/languages/" + filename generate_languagefile(filename, srctable, load_languagefile(filename)) -- cgit 1.4.1