Replace hardcoded French strings with i18n calls
Initialize i18n before auth so t() works when rendering auth-dependent UI, and build the command palette lazily so translations are loaded first. Bump service worker cache version.
This commit is contained in:
@@ -847,7 +847,7 @@ export function renderSearchResults(data, query, tagFilter) {
|
||||
const header = buildSearchResultsHeader(data, query, tagFilter);
|
||||
area.appendChild(header);
|
||||
if (data.results.length === 0) {
|
||||
area.appendChild(el("p", { style: "color:var(--text-muted);margin-top:20px" }, [document.createTextNode("Aucun résultat trouvé.")]));
|
||||
area.appendChild(el("p", { style: "color:var(--text-muted);margin-top:20px" }, [document.createTextNode(t("search.no_results"))]));
|
||||
return;
|
||||
}
|
||||
const container = el("div", { class: "search-results" });
|
||||
@@ -965,7 +965,7 @@ export function renderAdvancedSearchResults(data, query, tagFilter) {
|
||||
header.appendChild(sortDiv);
|
||||
|
||||
// Save search button
|
||||
const saveBtn = el("button", { class: "search-save-btn", type: "button", title: "Sauvegarder cette recherche" });
|
||||
const saveBtn = el("button", { class: "search-save-btn", type: "button", title: t("search.save_search") });
|
||||
saveBtn.innerHTML = '<i data-lucide="bookmark-plus" style="width:14px;height:14px"></i> Sauver';
|
||||
saveBtn.addEventListener("click", async () => {
|
||||
const inclEl = document.getElementById("search-include-input");
|
||||
@@ -1063,7 +1063,7 @@ export function renderAdvancedSearchResults(data, query, tagFilter) {
|
||||
|
||||
// Empty state
|
||||
if (data.results.length === 0) {
|
||||
area.appendChild(el("p", { style: "color:var(--text-muted);margin-top:20px" }, [document.createTextNode("Aucun résultat trouvé.")]));
|
||||
area.appendChild(el("p", { style: "color:var(--text-muted);margin-top:20px" }, [document.createTextNode(t("search.no_results"))]));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user