mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
encoding="utf-8" is not supported before Python 3.10.
This was SVN commit r27622.
This commit is contained in:
parent
a6546cc0a4
commit
ae9f47e741
1 changed files with 3 additions and 3 deletions
|
|
@ -35,7 +35,7 @@ def main():
|
|||
translatorMatch = re.compile("(# [^,<]*)(?: <.*>)?(?:, [0-9,-]{4,9})")
|
||||
lastTranslatorMatch = re.compile("(\"Last-Translator: [^,<]*)(?: <.*>)?( ?\\\\n\")")
|
||||
|
||||
for root, folders, filenames in os.walk(projectRootDirectory):
|
||||
for root, folders, _ in os.walk(projectRootDirectory):
|
||||
for folder in folders:
|
||||
if folder == l10nFolderName:
|
||||
if os.path.exists(os.path.join(root, folder, transifexClientFolder)):
|
||||
|
|
@ -44,10 +44,10 @@ def main():
|
|||
for file in files:
|
||||
usernames = []
|
||||
reached = False
|
||||
for line in fileinput.input(file.replace("\\", "/"), inplace=True, encoding="utf-8"):
|
||||
for line in fileinput.input(file.replace("\\", "/"), inplace=True):
|
||||
if reached:
|
||||
if line == "# \n":
|
||||
line = ""
|
||||
line = ""
|
||||
m = translatorMatch.match(line)
|
||||
if m:
|
||||
if m.group(1) in usernames:
|
||||
|
|
|
|||
Loading…
Reference in a new issue