mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-25 04:21:17 -03:00
refactor(ui): unify search bar placeholder to i18n key header.search.placeholder
- Replace page-specific header.search.placeholders.* keys with a single header.search.placeholder key (value: "Search", no ellipsis) - Keep header.search.notAvailable for the statistics page - Remove unused placeholder/placeholders/notAvailable entries from all 10 locale files; preserve options and searchIn keys - Update Jinja template and JS header to use the new unified key
This commit is contained in:
@@ -202,13 +202,7 @@
|
||||
"statistics": "Statistiken"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Suchen...",
|
||||
"placeholders": {
|
||||
"loras": "LoRAs suchen...",
|
||||
"recipes": "Rezepte suchen...",
|
||||
"checkpoints": "Checkpoints suchen...",
|
||||
"embeddings": "Embeddings suchen..."
|
||||
},
|
||||
"placeholder": "Suchen",
|
||||
"options": "Suchoptionen",
|
||||
"searchIn": "Suchen in:",
|
||||
"notAvailable": "Suche auf Statistikseite nicht verfügbar",
|
||||
|
||||
@@ -202,13 +202,7 @@
|
||||
"statistics": "Stats"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Search...",
|
||||
"placeholders": {
|
||||
"loras": "Search LoRAs...",
|
||||
"recipes": "Search recipes...",
|
||||
"checkpoints": "Search checkpoints...",
|
||||
"embeddings": "Search embeddings..."
|
||||
},
|
||||
"placeholder": "Search",
|
||||
"options": "Search Options",
|
||||
"searchIn": "Search In:",
|
||||
"notAvailable": "Search not available on statistics page",
|
||||
|
||||
@@ -202,13 +202,7 @@
|
||||
"statistics": "Estadísticas"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Buscar...",
|
||||
"placeholders": {
|
||||
"loras": "Buscar LoRAs...",
|
||||
"recipes": "Buscar recetas...",
|
||||
"checkpoints": "Buscar checkpoints...",
|
||||
"embeddings": "Buscar embeddings..."
|
||||
},
|
||||
"placeholder": "Buscar",
|
||||
"options": "Opciones de búsqueda",
|
||||
"searchIn": "Buscar en:",
|
||||
"notAvailable": "Búsqueda no disponible en la página de estadísticas",
|
||||
|
||||
@@ -202,13 +202,7 @@
|
||||
"statistics": "Statistiques"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Rechercher...",
|
||||
"placeholders": {
|
||||
"loras": "Rechercher des LoRAs...",
|
||||
"recipes": "Rechercher des recipes...",
|
||||
"checkpoints": "Rechercher des checkpoints...",
|
||||
"embeddings": "Rechercher des embeddings..."
|
||||
},
|
||||
"placeholder": "Rechercher",
|
||||
"options": "Options de recherche",
|
||||
"searchIn": "Rechercher dans :",
|
||||
"notAvailable": "Recherche non disponible sur la page de statistiques",
|
||||
|
||||
@@ -202,13 +202,7 @@
|
||||
"statistics": "סטטיסטיקה"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "חפש...",
|
||||
"placeholders": {
|
||||
"loras": "חפש LoRAs...",
|
||||
"recipes": "חפש מתכונים...",
|
||||
"checkpoints": "חפש checkpoints...",
|
||||
"embeddings": "חפש embeddings..."
|
||||
},
|
||||
"placeholder": "חיפוש",
|
||||
"options": "אפשרויות חיפוש",
|
||||
"searchIn": "חפש ב:",
|
||||
"notAvailable": "חיפוש לא זמין בדף הסטטיסטיקה",
|
||||
|
||||
@@ -202,13 +202,7 @@
|
||||
"statistics": "統計"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "検索...",
|
||||
"placeholders": {
|
||||
"loras": "LoRAを検索...",
|
||||
"recipes": "レシピを検索...",
|
||||
"checkpoints": "checkpointを検索...",
|
||||
"embeddings": "embeddingを検索..."
|
||||
},
|
||||
"placeholder": "検索",
|
||||
"options": "検索オプション",
|
||||
"searchIn": "検索対象:",
|
||||
"notAvailable": "統計ページでは検索は利用できません",
|
||||
|
||||
@@ -202,13 +202,7 @@
|
||||
"statistics": "통계"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "검색...",
|
||||
"placeholders": {
|
||||
"loras": "LoRA 검색...",
|
||||
"recipes": "레시피 검색...",
|
||||
"checkpoints": "Checkpoint 검색...",
|
||||
"embeddings": "Embedding 검색..."
|
||||
},
|
||||
"placeholder": "검색",
|
||||
"options": "검색 옵션",
|
||||
"searchIn": "검색 범위:",
|
||||
"notAvailable": "통계 페이지에서는 검색을 사용할 수 없습니다",
|
||||
|
||||
@@ -202,13 +202,7 @@
|
||||
"statistics": "Статистика"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Поиск...",
|
||||
"placeholders": {
|
||||
"loras": "Поиск LoRAs...",
|
||||
"recipes": "Поиск рецептов...",
|
||||
"checkpoints": "Поиск checkpoints...",
|
||||
"embeddings": "Поиск embeddings..."
|
||||
},
|
||||
"placeholder": "Поиск",
|
||||
"options": "Опции поиска",
|
||||
"searchIn": "Искать в:",
|
||||
"notAvailable": "Поиск недоступен на странице статистики",
|
||||
|
||||
@@ -202,13 +202,7 @@
|
||||
"statistics": "统计"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "搜索...",
|
||||
"placeholders": {
|
||||
"loras": "搜索 LoRA...",
|
||||
"recipes": "搜索配方...",
|
||||
"checkpoints": "搜索 Checkpoint...",
|
||||
"embeddings": "搜索 Embedding..."
|
||||
},
|
||||
"placeholder": "搜索",
|
||||
"options": "搜索选项",
|
||||
"searchIn": "搜索范围:",
|
||||
"notAvailable": "统计页面不可用搜索",
|
||||
|
||||
@@ -202,13 +202,7 @@
|
||||
"statistics": "統計"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "搜尋...",
|
||||
"placeholders": {
|
||||
"loras": "搜尋 LoRA...",
|
||||
"recipes": "搜尋配方...",
|
||||
"checkpoints": "搜尋 checkpoint...",
|
||||
"embeddings": "搜尋 embedding..."
|
||||
},
|
||||
"placeholder": "搜尋",
|
||||
"options": "搜尋選項",
|
||||
"searchIn": "搜尋範圍:",
|
||||
"notAvailable": "統計頁面無法搜尋",
|
||||
|
||||
@@ -338,7 +338,6 @@ export class HeaderManager {
|
||||
const headerSearch = document.getElementById('headerSearch');
|
||||
const searchInput = headerSearch?.querySelector('#searchInput');
|
||||
const searchButtons = headerSearch?.querySelectorAll('button');
|
||||
const placeholderKey = 'header.search.placeholders.' + this.currentPage;
|
||||
|
||||
if (this.currentPage === 'statistics' && headerSearch) {
|
||||
headerSearch.classList.add('disabled');
|
||||
@@ -353,7 +352,7 @@ export class HeaderManager {
|
||||
if (searchInput) {
|
||||
searchInput.disabled = false;
|
||||
// Use i18nHelpers to update placeholder
|
||||
updateElementAttribute(searchInput, 'placeholder', placeholderKey, {}, '');
|
||||
updateElementAttribute(searchInput, 'placeholder', 'header.search.placeholder', {}, '');
|
||||
}
|
||||
searchButtons?.forEach(btn => btn.disabled = false);
|
||||
}
|
||||
|
||||
@@ -45,8 +45,7 @@
|
||||
|
||||
<!-- Center section: Search -->
|
||||
{% set search_disabled = current_page == 'statistics' %}
|
||||
{% set search_placeholder_key = 'header.search.notAvailable' if search_disabled else 'header.search.placeholders.' ~
|
||||
current_page %}
|
||||
{% set search_placeholder_key = 'header.search.notAvailable' if search_disabled else 'header.search.placeholder' %}
|
||||
{% set header_search_class = 'header-search disabled' if search_disabled else 'header-search' %}
|
||||
<div class="{{ header_search_class }}" id="headerSearch">
|
||||
<div class="search-container">
|
||||
|
||||
Reference in New Issue
Block a user