diff --git a/i18n/english.js b/i18n/english.js index c781cb28..3085c494 100644 --- a/i18n/english.js +++ b/i18n/english.js @@ -192,7 +192,8 @@ const ui = { default: "Search options", packagesCache: "Packages available in the cache", noPackageFound: "No package found", - packageLengthErr: "Package name must be between 2 and 64 characters." + packageLengthErr: "Package name must be between 2 and 64 characters.", + registryPlaceholder: "Search packages" }, legend: { default: "The package is fine.", diff --git a/i18n/french.js b/i18n/french.js index 18df5fec..7ab82e02 100644 --- a/i18n/french.js +++ b/i18n/french.js @@ -192,7 +192,8 @@ const ui = { default: "Options de recherche", packagesCache: "Packages disponibles dans le cache", noPackageFound: "Aucun package trouvé", - packageLengthErr: "Le nom du package doit être compris entre 2 et 64 caractères." + packageLengthErr: "Le nom du package doit être compris entre 2 et 64 caractères.", + registryPlaceholder: "Recherche de packages" }, legend: { default: "Rien à signaler.", diff --git a/public/components/views/search/search.js b/public/components/views/search/search.js index 9c622bdb..11dab755 100644 --- a/public/components/views/search/search.js +++ b/public/components/views/search/search.js @@ -156,6 +156,8 @@ export class SearchView { } reset() { + const lang = currentLang(); + const searchViewContainer = document.querySelector("#search--view .container"); searchViewContainer.innerHTML = ""; const form = document.createElement("form"); @@ -165,7 +167,7 @@ export class SearchView { iconSearch.classList.add("icon-search"); const input = document.createElement("input"); input.type = "text"; - input.placeholder = "fastify, express..."; + input.placeholder = window.i18n[lang].search.registryPlaceholder; input.name = "package"; input.id = "package"; formGroup.appendChild(iconSearch); diff --git a/views/index.html b/views/index.html index ed957541..c43afa67 100644 --- a/views/index.html +++ b/views/index.html @@ -92,7 +92,7 @@
- +