Skip to content

Commit

Permalink
add hotkey hint to settings, improve translations
Browse files Browse the repository at this point in the history
  • Loading branch information
tkohlmeier committed Jan 19, 2025
1 parent c308e39 commit b690b77
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/renderer/Core/I18n/getCoreResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const getCoreResources = (): { namespace: string; resources: Resources<Tr
"de-CH": {
title: "Allgemein",
hotkey: "Hotkey",
hotkeyEnabled: "Hotkey enabled",
hotkeyEnabled: "Hotkey aktiviert",
hotkeyBinding: "Tastenkombination",
validHotkeyBinding: "Gültige Tastenkombination",
invalidHotkeyBinding: "Ungültige Tastenkombination",
Expand Down Expand Up @@ -222,7 +222,7 @@ export const getCoreResources = (): { namespace: string; resources: Resources<Tr
enabled: "Aktiviert",
rescan: "Neuscan",
successfulRescan: "Erfolgreicher Neuscan",
failedRescan: "Fehler beim neu scannen. Überprüfe die Logs für mehr Informationen.",
failedRescan: "Fehler beim neu Scannen. Überprüfe die Logs für mehr Informationen.",
noSettingsAvailable: "Keine Einstellungen verfügbar",
},
},
Expand All @@ -242,6 +242,7 @@ export const getCoreResources = (): { namespace: string; resources: Resources<Tr
excludedItems: "Excluded items",
noExcludedItems: "There are no excluded items",
removeExcludedItem: "Remove item",
hotkeyForManualRescan: "Hotkey for manual rescan",
},
"de-CH": {
title: "Suchmaschine",
Expand All @@ -255,6 +256,7 @@ export const getCoreResources = (): { namespace: string; resources: Resources<Tr
excludedItems: "Ausgeschlossene Elemente",
noExcludedItems: "Es gibt keine ausgeschlossene Elemente",
removeExcludedItem: "Element entfernen",
hotkeyForManualRescan: "Hotkey für manuelles neu Scannen",
},
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { KeyboardShortcut } from "@Core/Components";
import { Setting } from "@Core/Settings/Setting";
import { useTranslation } from "react-i18next";

export const ManualRescanHotkey = () => {
const { t } = useTranslation("settingsSearchEngine");

return <Setting label={t("hotkeyForManualRescan")} control={<KeyboardShortcut shortcut="F5" />} />;
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ExcludedItems } from "./ExcludedItems";
import { Fuzziness } from "./Fuzziness";
import { MaxResultLength } from "./MaxResultLength";
import { RescanInterval } from "./RescanInterval";
import { ManualRescanHotkey } from "./RescanShortcutHint";
import { SearchEngineId } from "./SearchEngineId";

export const SearchEngine = () => {
Expand All @@ -26,6 +27,7 @@ export const SearchEngine = () => {
setAutomaticRescanEnabled={setAutomaticRescanEnabled}
/>
<RescanInterval automaticRescanEnabled={automaticRescanEnabled} />
<ManualRescanHotkey />
<Fuzziness />
<MaxResultLength />
</SettingGroup>
Expand Down

0 comments on commit b690b77

Please sign in to comment.