mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 05:46:17 +00:00
feat: adding translations
This commit is contained in:
@@ -96,7 +96,7 @@
|
||||
"search_library": "Search library",
|
||||
"recent_searches": "Recent Searches",
|
||||
"suggestions": "Suggestions",
|
||||
"clear_history": "Clear history",
|
||||
"clear_history": "Clear",
|
||||
"remove_from_history": "Remove from history",
|
||||
"loading": "Loading...",
|
||||
"no_results": "No results",
|
||||
|
||||
@@ -93,8 +93,16 @@
|
||||
},
|
||||
"header": {
|
||||
"search": "Buscar juegos",
|
||||
"search_library": "Buscar en la librería",
|
||||
"recent_searches": "Búsquedas Recientes",
|
||||
"suggestions": "Sugerencias",
|
||||
"clear_history": "Limpiar",
|
||||
"remove_from_history": "Eliminar del historial",
|
||||
"loading": "Cargando...",
|
||||
"no_results": "Sin resultados",
|
||||
"home": "Inicio",
|
||||
"catalogue": "Catálogo",
|
||||
"library": "Librería",
|
||||
"downloads": "Descargas",
|
||||
"search_results": "Resultados de búsqueda",
|
||||
"settings": "Ajustes",
|
||||
|
||||
@@ -93,11 +93,19 @@
|
||||
},
|
||||
"header": {
|
||||
"search": "Buscar jogos",
|
||||
"search_library": "Buscar na biblioteca",
|
||||
"recent_searches": "Buscas Recentes",
|
||||
"suggestions": "Sugestões",
|
||||
"clear_history": "Limpar",
|
||||
"remove_from_history": "Remover do histórico",
|
||||
"loading": "Carregando...",
|
||||
"no_results": "Sem resultados",
|
||||
"home": "Início",
|
||||
"catalogue": "Catálogo",
|
||||
"library": "Biblioteca",
|
||||
"downloads": "Downloads",
|
||||
"search_results": "Resultados da busca",
|
||||
"settings": "Ajustes",
|
||||
"home": "Início",
|
||||
"version_available_install": "Versão {{version}} disponível. Clique aqui para reiniciar e instalar.",
|
||||
"version_available_download": "Versão {{version}} disponível. Clique aqui para fazer o download."
|
||||
},
|
||||
|
||||
@@ -30,11 +30,19 @@
|
||||
},
|
||||
"header": {
|
||||
"search": "Procurar jogos",
|
||||
"search_library": "Procurar na biblioteca",
|
||||
"recent_searches": "Pesquisas Recentes",
|
||||
"suggestions": "Sugestões",
|
||||
"clear_history": "Limpar",
|
||||
"remove_from_history": "Remover do histórico",
|
||||
"loading": "A carregar...",
|
||||
"no_results": "Sem resultados",
|
||||
"home": "Início",
|
||||
"catalogue": "Catálogo",
|
||||
"library": "Biblioteca",
|
||||
"downloads": "Transferências",
|
||||
"search_results": "Resultados da pesquisa",
|
||||
"settings": "Definições",
|
||||
"home": "Início",
|
||||
"version_available_install": "Versão {{version}} disponível. Clica aqui para reiniciar e instalar.",
|
||||
"version_available_download": "Versão {{version}} disponível. Clica aqui para fazer o download."
|
||||
},
|
||||
|
||||
@@ -93,8 +93,16 @@
|
||||
},
|
||||
"header": {
|
||||
"search": "Поиск",
|
||||
"search_library": "Поиск в библиотеке",
|
||||
"recent_searches": "Недавние поиски",
|
||||
"suggestions": "Предложения",
|
||||
"clear_history": "Очистить",
|
||||
"remove_from_history": "Удалить из истории",
|
||||
"loading": "Загрузка...",
|
||||
"no_results": "Нет результатов",
|
||||
"home": "Главная",
|
||||
"catalogue": "Каталог",
|
||||
"library": "Библиотека",
|
||||
"downloads": "Загрузки",
|
||||
"search_results": "Результаты поиска",
|
||||
"settings": "Настройки",
|
||||
|
||||
@@ -39,13 +39,16 @@
|
||||
&__clear-text-button {
|
||||
color: globals.$muted-color;
|
||||
cursor: pointer;
|
||||
padding: 2px 6px;
|
||||
padding: 0;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
transition: color ease 0.2s;
|
||||
background: transparent;
|
||||
border: none;
|
||||
|
||||
&:hover {
|
||||
color: #ffffff;
|
||||
background-color: rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ export function SearchDropdown({
|
||||
className="search-dropdown__clear-text-button"
|
||||
onClick={onClearHistory}
|
||||
>
|
||||
clear
|
||||
{t("clear_history")}
|
||||
</button>
|
||||
</div>
|
||||
<ul className="search-dropdown__list">
|
||||
|
||||
@@ -8,7 +8,6 @@ export interface SearchHistoryEntry {
|
||||
}
|
||||
|
||||
const LEVELDB_KEY = "searchHistory";
|
||||
const LEGACY_STORAGE_KEY = "search-history";
|
||||
const MAX_HISTORY_ENTRIES = 15;
|
||||
|
||||
export function useSearchHistory() {
|
||||
@@ -21,24 +20,10 @@ export function useSearchHistory() {
|
||||
isInitialized.current = true;
|
||||
|
||||
try {
|
||||
let data = (await levelDBService.get(LEVELDB_KEY, null, "json")) as
|
||||
const data = (await levelDBService.get(LEVELDB_KEY, null, "json")) as
|
||||
| SearchHistoryEntry[]
|
||||
| null;
|
||||
|
||||
if (!data) {
|
||||
const legacyData = localStorage.getItem(LEGACY_STORAGE_KEY);
|
||||
if (legacyData) {
|
||||
try {
|
||||
const parsed = JSON.parse(legacyData) as SearchHistoryEntry[];
|
||||
await levelDBService.put(LEVELDB_KEY, parsed, null, "json");
|
||||
localStorage.removeItem(LEGACY_STORAGE_KEY);
|
||||
data = parsed;
|
||||
} catch {
|
||||
localStorage.removeItem(LEGACY_STORAGE_KEY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (data) {
|
||||
setHistory(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user