diff options
| author | Sworddragon <sworddragon2@aol.com> | 2011-05-06 18:27:06 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-05-09 17:29:40 +0200 |
| commit | baa2e650a5e53303b13a8d0ffe50e30237cb403b (patch) | |
| tree | 5a41661ee0e4e9ad5257e144d19eeb0655400718 /scripts/update_localization.py | |
| parent | 1850851a4762858e17696eaee1dfb65cba238930 (diff) | |
| download | zcatch-baa2e650a5e53303b13a8d0ffe50e30237cb403b.tar.gz zcatch-baa2e650a5e53303b13a8d0ffe50e30237cb403b.zip | |
Set the root directory of teeworlds as the main directory for scripts
Diffstat (limited to 'scripts/update_localization.py')
| -rw-r--r-- | scripts/update_localization.py | 7 |
1 files changed, 4 insertions, 3 deletions
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)) |