summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-06-16 13:36:18 -0300
committerJesusaves <cpntb1@ymail.com>2024-06-16 13:36:18 -0300
commit5b3780b0fd8a1c54939513142295621960827914 (patch)
tree700964301204b7c7f92ab41f7dbae38fc12144c4 /lang
parent0157945c153c92b8e021f81cb623bc1e5d0b78db (diff)
downloadtools-5b3780b0fd8a1c54939513142295621960827914.tar.gz
tools-5b3780b0fd8a1c54939513142295621960827914.tar.bz2
tools-5b3780b0fd8a1c54939513142295621960827914.tar.xz
tools-5b3780b0fd8a1c54939513142295621960827914.zip
The code for Domains + copyright year fix
Diffstat (limited to 'lang')
-rwxr-xr-xlang/updatelang.py42
1 files changed, 41 insertions, 1 deletions
diff --git a/lang/updatelang.py b/lang/updatelang.py
index 3398e20..34978ea 100755
--- a/lang/updatelang.py
+++ b/lang/updatelang.py
@@ -26,6 +26,45 @@ oldLangFiles = dict()
langs = set()
itemNamesByName = dict()
+
+def sw(j, k):
+ return j.startswith(k)
+def tmw2_getGroup(oc):
+ ## Define the scopes, they should be completed in order
+ if sw(oc, "npc/002-") or sw(oc, "npc/000-"):
+ return "domain/Nard"
+ elif sw(oc, "npc/005-") or sw(oc, "npc/006-2"):
+ return "domain/Candor"
+ elif sw(oc, "db/") or sw(oc, "npc/functions") or sw(oc, "npc/items") or sw(oc, "npc/config") or sw(oc, "npc/craft") or sw(oc, "npc/016-"):
+ return "domain/Databases"
+ elif sw(oc, "npc/003-") or sw(oc, "npc/004-") or sw(oc, "npc/007-"):
+ return "domain/Tonori"
+ elif sw(oc, "npc/012-") or sw(oc, "npc/013-") or sw(oc, "npc/014-") or sw(oc, "npc/015-"):
+ return "domain/Hurnscald"
+ elif sw(oc, "npc/009-") or sw(oc, "npc/010-") or sw(oc, "npc/011-"):
+ return "domain/Tonori"
+ elif sw(oc, "npc/017-") or sw(oc, "npc/018-"):
+ return "domain/LoF"
+ elif sw(oc, "npc/027-") or sw(oc, "npc/magic"):
+ return "domain/Academy"
+ elif sw(oc, "npc/019-") or sw(oc, "npc/020-") or sw(oc, "npc/021-") or sw(oc, "npc/022-"):
+ return "domain/Kaizei"
+ elif sw(oc, "npc/023-") or sw(oc, "npc/024-") or sw(oc, "npc/001-7"):
+ return "domain/Frostia"
+ elif sw(oc, "npc/001-") or sw(oc, "npc/006-") or sw(oc, "npc/030-"):
+ return "domain/Events"
+ elif sw(oc, "npc/025-") or sw(oc, "npc/026-") or sw(oc, "npc/029-"):
+ return "domain/Fortress"
+ elif sw(oc, "npc/031-") or sw(oc, "npc/032-") or sw(oc, "npc/033-") or sw(oc, "npc/034-") or sw(oc, "npc/soren"):
+ return "domain/Special"
+ elif sw(oc, "npc/042-") or sw(oc, "npc/guilds"):
+ return "domain/Kamelot"
+ elif sw(oc, "npc/boss") or sw(oc, "npc/botcheck") or sw(oc, "npc/commands") or sw(oc, "npc/dev") or sw(oc, "npc/sec_pri") or sw(oc, "npc/test") or sw(oc, "conf/"):
+ return "domain/System"
+ else:
+ return "domain/Other"
+
+
def addStr(text, comment, fileName, lineNum, addNoC):
text = text.replace("\a", "\"");
allStrings.add(text)
@@ -36,6 +75,7 @@ def addStr(text, comment, fileName, lineNum, addNoC):
strComments[text].add("#. code: " + comment.strip() + "\n")
strComments[text].add("#: " + fileName + ":" + str(lineNum) + "\n")
+ strComments[text].add("#: " + tmw2_getGroup(fileName) + ":" + str(len(allStrings)) + "\n")
if addNoC == True:
strComments[text].add("#, no-c-format\n")
@@ -145,7 +185,7 @@ def parseFile(name, readFirstLine):
line1 = ""
line2 = ""
elif readFirstLine:
- firstLine = "Copyright (C) 2010-2015 Evol Online\n"
+ firstLine = "Copyright (C) 2010-2015 Evol Online, (C) 2018-2024 Moubootaur Legends\n"
return (trans, firstLine)