Skip to content

Commit

Permalink
Fix for translations
Browse files Browse the repository at this point in the history
  • Loading branch information
macarooni-man committed Nov 14, 2024
1 parent cf70bfa commit 04e1fcd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions build-tools/locale-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
if os.path.basename(script) == 'amseditor.py' and node.lineno < 880:
continue

if "-XX:+UseG1GC" in string or "xbox-achievements-enabled: true" in string:
continue

if "namespace eval tabdrag" in string or re.match('^\<.*\>$', string) or re.match('[A-Z][a-z]+\.[A-Z][a-z]+', string):
continue

Expand Down Expand Up @@ -128,6 +131,11 @@ def process_locale(code, *a):
return

key = string.lower().strip()

# Remove content between dollar signs for the key
if '$' in key:
key = re.sub(r'\$[^$]*\$', '$$', key)

if key not in locale_data:
locale_data[key] = {}

Expand Down
2 changes: 1 addition & 1 deletion source/locales.json

Large diffs are not rendered by default.

0 comments on commit 04e1fcd

Please sign in to comment.