diff --git a/packages/web/src/commands/CommandPalette.svelte b/packages/web/src/commands/CommandPalette.svelte
index 9e04dbe37..f801e5073 100644
--- a/packages/web/src/commands/CommandPalette.svelte
+++ b/packages/web/src/commands/CommandPalette.svelte
@@ -81,6 +81,7 @@
import { getLocalStorage } from '../utility/storageCache';
import registerCommand from './registerCommand';
import { formatKeyText, switchCurrentDatabase } from '../utility/common';
+ import { _val } from '../translations';
let domInput;
let filter = '';
@@ -117,7 +118,7 @@
: sortedComands
).filter(x => !x.isGroupCommand),
{
- extract: x => x.text,
+ extract: x => _val(x.text),
pre: '',
post: '',
}
diff --git a/packages/web/src/translations.ts b/packages/web/src/translations.ts
index 5893399a8..0a97dac06 100644
--- a/packages/web/src/translations.ts
+++ b/packages/web/src/translations.ts
@@ -81,3 +81,7 @@ export function _t(key: string, options: TranslateOptions): string {
export function __t(key: string, options: TranslateOptions): () => string {
return () => _t(key, options);
}
+
+export function _val(x: T | (() => T)): T {
+ return typeof x === 'function' ? (x as () => T)() : x;
+}