feat(localization): add file size labels and enhance search placeholders in UI components

This commit is contained in:
Will Miao
2025-08-31 20:26:13 +08:00
parent 7f9a3bf272
commit a83f020fcc
4 changed files with 27 additions and 5 deletions

View File

@@ -28,6 +28,14 @@
"korean": "한국어", "korean": "한국어",
"french": "Français", "french": "Français",
"spanish": "Español" "spanish": "Español"
},
"fileSize": {
"zero": "0 Bytes",
"bytes": "Bytes",
"kb": "KB",
"mb": "MB",
"gb": "GB",
"tb": "TB"
} }
}, },
"modelCard": { "modelCard": {
@@ -74,8 +82,15 @@
}, },
"search": { "search": {
"placeholder": "Search...", "placeholder": "Search...",
"placeholders": {
"loras": "Search LoRAs...",
"recipes": "Search recipes...",
"checkpoints": "Search checkpoints...",
"embeddings": "Search embeddings..."
},
"options": "Search Options", "options": "Search Options",
"searchIn": "Search In:", "searchIn": "Search In:",
"notAvailable": "Search not available on statistics page",
"filters": { "filters": {
"filename": "Filename", "filename": "Filename",
"modelname": "Model Name", "modelname": "Model Name",
@@ -93,7 +108,10 @@
"clearAll": "Clear All Filters" "clearAll": "Clear All Filters"
}, },
"theme": { "theme": {
"toggle": "Toggle theme" "toggle": "Toggle theme",
"switchToLight": "Switch to light theme",
"switchToDark": "Switch to dark theme",
"switchToAuto": "Switch to auto theme"
}, },
"actions": { "actions": {
"checkUpdates": "Check Updates", "checkUpdates": "Check Updates",
@@ -165,7 +183,10 @@
"recipes": { "recipes": {
"title": "LoRA Recipes", "title": "LoRA Recipes",
"controls": { "controls": {
"import": "Import Recipe", "import": {
"action": "Import Recipe",
"title": "Import a recipe from image or URL"
},
"refresh": { "refresh": {
"title": "Refresh recipe list" "title": "Refresh recipe list"
}, },
@@ -691,6 +712,7 @@
"cacheClearError": "Error clearing cache: {message}" "cacheClearError": "Error clearing cache: {message}"
}, },
"filters": { "filters": {
"applied": "{message}",
"cleared": "Filters cleared" "cleared": "Filters cleared"
}, },
"downloads": { "downloads": {

View File

@@ -282,7 +282,7 @@ export class FilterManager {
message = `Filtering by ${tagsCount} tag${tagsCount > 1 ? 's' : ''}`; message = `Filtering by ${tagsCount} tag${tagsCount > 1 ? 's' : ''}`;
} }
showToast('filters.applied', { message }, 'success'); showToast('toast.filters.applied', { message }, 'success');
} }
} else { } else {
this.filterButton.classList.remove('active'); this.filterButton.classList.remove('active');

View File

@@ -41,7 +41,7 @@
<button onclick="recipeManager.refreshRecipes()"><i class="fas fa-sync"></i> {{ t('common.actions.refresh') }}</button> <button onclick="recipeManager.refreshRecipes()"><i class="fas fa-sync"></i> {{ t('common.actions.refresh') }}</button>
</div> </div>
<div title="{{ t('recipes.controls.import.title') }}" class="control-group"> <div title="{{ t('recipes.controls.import.title') }}" class="control-group">
<button onclick="importManager.showImportModal()"><i class="fas fa-file-import"></i> {{ t('recipes.controls.import') }}</button> <button onclick="importManager.showImportModal()"><i class="fas fa-file-import"></i> {{ t('recipes.controls.import.action') }}</button>
</div> </div>
<!-- Add duplicate detection button --> <!-- Add duplicate detection button -->
<div title="{{ t('loras.controls.duplicates') }}" class="control-group"> <div title="{{ t('loras.controls.duplicates') }}" class="control-group">

View File

@@ -253,7 +253,7 @@ def test_static_code_analysis():
'checkpoint', 'civitai_api_key', 'div', 'embedding', 'lora', 'show_only_sfw', 'checkpoint', 'civitai_api_key', 'div', 'embedding', 'lora', 'show_only_sfw',
'model', 'type', 'name', 'value', 'id', 'class', 'style', 'src', 'href', 'model', 'type', 'name', 'value', 'id', 'class', 'style', 'src', 'href',
'data', 'width', 'height', 'size', 'format', 'version', 'url', 'path', 'data', 'width', 'height', 'size', 'format', 'version', 'url', 'path',
'file', 'folder', 'image', 'text', 'number', 'boolean', 'array', 'object' 'file', 'folder', 'image', 'text', 'number', 'boolean', 'array', 'object', 'non.existent.key'
} }
# Extract keys from JavaScript files # Extract keys from JavaScript files