We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e45599d commit c9ea647Copy full SHA for c9ea647
LocalizationMappingTable.py
@@ -1,8 +1,9 @@
1
import platform
2
import re
3
+from pathlib import Path
4
5
-def FillLocalizationMappingTable (devKitPath) -> str:
6
+def FillLocalizationMappingTable (devKitPath: Path) -> dict[str, str]:
7
# Dynamically generate a mapping table from GSLocalization.h
8
pattern = None
9
system = platform.system ()
@@ -17,8 +18,5 @@ def FillLocalizationMappingTable (devKitPath) -> str:
17
18
with open(gsLocalizationPath, 'r', encoding='utf-8') as f:
19
gsLocalizationContent = f.read ()
20
- if not pattern:
21
- return {}
22
-
23
patternRegex = re.compile (pattern, re.MULTILINE)
24
return { m.group(1): m.group(2) for m in patternRegex.finditer (gsLocalizationContent) }
0 commit comments