Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for translations #105

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading