feat(localization): add new workflow-related messages for LoRA and recipe actions in multiple languages

This commit is contained in:
Will Miao
2025-09-02 11:50:20 +08:00
parent be594133f0
commit 91801dff85
10 changed files with 75 additions and 9 deletions

View File

@@ -759,6 +759,16 @@ def test_static_code_analysis():
'data', 'width', 'height', 'size', 'format', 'version', 'url', 'path',
'file', 'folder', 'image', 'text', 'number', 'boolean', 'array', 'object', 'non.existent.key'
}
# Special translation keys used in uiHelpers.js but not detected by regex
uihelpers_special_keys = {
'uiHelpers.workflow.loraAdded',
'uiHelpers.workflow.loraReplaced',
'uiHelpers.workflow.loraFailedToSend',
'uiHelpers.workflow.recipeAdded',
'uiHelpers.workflow.recipeReplaced',
'uiHelpers.workflow.recipeFailedToSend',
}
# Extract keys from JavaScript files
js_dir = os.path.join(os.path.dirname(__file__), 'static', 'js')
@@ -808,6 +818,8 @@ def test_static_code_analysis():
# Combine all used keys
all_used_keys = js_keys.union(html_keys)
# Add special keys from uiHelpers.js
all_used_keys.update(uihelpers_special_keys)
# print(f"Total unique keys used in code: {len(all_used_keys)}")
# Check for missing keys