From 379dd73b36c0721ea32d954978197ba6a9d1cf8e Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Sun, 1 Apr 2018 18:31:45 +1000 Subject: [PATCH] Fix translation script for weird OS encodings --- updatetranslations.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/updatetranslations.py b/updatetranslations.py index 8268f323..e18c6960 100755 --- a/updatetranslations.py +++ b/updatetranslations.py @@ -42,7 +42,7 @@ if __name__ == '__main__': for fname in files: filepath = subdir + os.sep + fname if filepath.endswith('.go'): - content = open(filepath, 'r').read() + content = open(filepath, 'r', encoding='UTF-8').read() matches = re.findall(r'\.t\("((?:[^"]|\\")+)"\)', content) for match in matches: @@ -64,7 +64,7 @@ if __name__ == '__main__': for fname in files: filepath = subdir + os.sep + fname if fname == 'help.go': - content = open(filepath, 'r').read() + content = open(filepath, 'r', encoding='UTF-8').read() matches = re.findall(r'\`([^\`]+)\`', content) for match in matches: @@ -83,7 +83,7 @@ if __name__ == '__main__': for fname in files: filepath = subdir + os.sep + fname if fname == 'nickserv.go': - content = open(filepath, 'r').read() + content = open(filepath, 'r', encoding='UTF-8').read() matches = re.findall(r'\`([^\`]+)\`', content) for match in matches: