German, French, Italian, Spanish, Portuguese and Polish texts for the screens, and a check for the editor's special characters

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-19 14:44:13 +02:00
parent 851c1772e5
commit 7f1fe36b3e
7 changed files with 1085 additions and 6 deletions
+5
View File
@@ -109,6 +109,11 @@ def check():
plural = ' | ' in source
if plural and forms and len(text.split('|')) not in (1, forms):
problems.append(f'{code}: {key} needs {forms} forms separated by " | "')
if not plural and '|' in text:
problems.append(f'{code}: {key} has a | that isn\'t a plural form')
# The editor's vue-i18n reads { } and @ as instructions: only placeholders and its {'x'} literals are allowed.
if key.startswith('editor.') and re.search(r"[{}@]", re.sub(r"\{'[^']*'\}", '', PLACEHOLDER.sub('', text))):
problems.append(f'{code}: {key} has {{, }} or @ outside a placeholder; the editor would misread it')
if key.startswith('screen.') and drawable:
shown = PLACEHOLDER.sub('', text).replace('|', '')
unknown = sorted(set(shown) - drawable - {'\n'})