diff --git a/locales/de.json b/locales/de.json index 3022cbbc..8f891921 100644 --- a/locales/de.json +++ b/locales/de.json @@ -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", diff --git a/locales/en.json b/locales/en.json index 9ce05217..d53f41e6 100644 --- a/locales/en.json +++ b/locales/en.json @@ -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", diff --git a/locales/es.json b/locales/es.json index d6b19286..9f3f0d6e 100644 --- a/locales/es.json +++ b/locales/es.json @@ -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", diff --git a/locales/fr.json b/locales/fr.json index b74b0e42..b90adb3d 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -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", diff --git a/locales/he.json b/locales/he.json index 3fffe591..6aa5c16f 100644 --- a/locales/he.json +++ b/locales/he.json @@ -202,13 +202,7 @@ "statistics": "סטטיסטיקה" }, "search": { - "placeholder": "חפש...", - "placeholders": { - "loras": "חפש LoRAs...", - "recipes": "חפש מתכונים...", - "checkpoints": "חפש checkpoints...", - "embeddings": "חפש embeddings..." - }, + "placeholder": "חיפוש", "options": "אפשרויות חיפוש", "searchIn": "חפש ב:", "notAvailable": "חיפוש לא זמין בדף הסטטיסטיקה", diff --git a/locales/ja.json b/locales/ja.json index 28a98520..5d23c720 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -202,13 +202,7 @@ "statistics": "統計" }, "search": { - "placeholder": "検索...", - "placeholders": { - "loras": "LoRAを検索...", - "recipes": "レシピを検索...", - "checkpoints": "checkpointを検索...", - "embeddings": "embeddingを検索..." - }, + "placeholder": "検索", "options": "検索オプション", "searchIn": "検索対象:", "notAvailable": "統計ページでは検索は利用できません", diff --git a/locales/ko.json b/locales/ko.json index 78536f45..1e613351 100644 --- a/locales/ko.json +++ b/locales/ko.json @@ -202,13 +202,7 @@ "statistics": "통계" }, "search": { - "placeholder": "검색...", - "placeholders": { - "loras": "LoRA 검색...", - "recipes": "레시피 검색...", - "checkpoints": "Checkpoint 검색...", - "embeddings": "Embedding 검색..." - }, + "placeholder": "검색", "options": "검색 옵션", "searchIn": "검색 범위:", "notAvailable": "통계 페이지에서는 검색을 사용할 수 없습니다", diff --git a/locales/ru.json b/locales/ru.json index f44a3147..4beeb06c 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -202,13 +202,7 @@ "statistics": "Статистика" }, "search": { - "placeholder": "Поиск...", - "placeholders": { - "loras": "Поиск LoRAs...", - "recipes": "Поиск рецептов...", - "checkpoints": "Поиск checkpoints...", - "embeddings": "Поиск embeddings..." - }, + "placeholder": "Поиск", "options": "Опции поиска", "searchIn": "Искать в:", "notAvailable": "Поиск недоступен на странице статистики", diff --git a/locales/zh-CN.json b/locales/zh-CN.json index b662a132..c1cdbea3 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -202,13 +202,7 @@ "statistics": "统计" }, "search": { - "placeholder": "搜索...", - "placeholders": { - "loras": "搜索 LoRA...", - "recipes": "搜索配方...", - "checkpoints": "搜索 Checkpoint...", - "embeddings": "搜索 Embedding..." - }, + "placeholder": "搜索", "options": "搜索选项", "searchIn": "搜索范围:", "notAvailable": "统计页面不可用搜索", diff --git a/locales/zh-TW.json b/locales/zh-TW.json index f475ce78..370b4cfd 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -202,13 +202,7 @@ "statistics": "統計" }, "search": { - "placeholder": "搜尋...", - "placeholders": { - "loras": "搜尋 LoRA...", - "recipes": "搜尋配方...", - "checkpoints": "搜尋 checkpoint...", - "embeddings": "搜尋 embedding..." - }, + "placeholder": "搜尋", "options": "搜尋選項", "searchIn": "搜尋範圍:", "notAvailable": "統計頁面無法搜尋", diff --git a/static/js/components/Header.js b/static/js/components/Header.js index 9e646f18..9d22390e 100644 --- a/static/js/components/Header.js +++ b/static/js/components/Header.js @@ -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); } diff --git a/templates/components/header.html b/templates/components/header.html index a039bb41..a16dd14e 100644 --- a/templates/components/header.html +++ b/templates/components/header.html @@ -45,8 +45,7 @@ {% 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' %}