mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 22:52:12 -03:00
feat(localization): add new workflow-related messages for LoRA and recipe actions in multiple languages
This commit is contained in:
12
test_i18n.py
12
test_i18n.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user