Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

fix(webv2): localize the settings menu shortcut tooltip

joshistoaste183e7d492c5
diff --git a/invokeai/frontend/webv2/public/locales/en.json b/invokeai/frontend/webv2/public/locales/en.json
index 546c5a32cc..b4896741f6 100644
--- a/invokeai/frontend/webv2/public/locales/en.json
+++ b/invokeai/frontend/webv2/public/locales/en.json
@@ -231,6 +231,7 @@
"save": "Save",
"seed": "Seed",
"settings": "Settings",
+ "settingsWithShortcut": "Settings ({{hotkey}})",
"nextPage": "Next page",
"somethingWentWrong": "Something went wrong.",
"swap": "Swap",
diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/AppMenu.tsx b/invokeai/frontend/webv2/src/workbench/shell/topbar/AppMenu.tsx
index 8a8de54400..87895a6fa9 100644
--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/AppMenu.tsx
+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/AppMenu.tsx
@@ -161,16 +161,9 @@ const SettingsMenuAction = ({ onClick }: { onClick: () => void }) => {
// Reads the effective binding, so a remapped or unbound shortcut is never
// advertised as one that still works.
const shortcut = useTopbarShortcut('app.openSettings');
- const label = t('common.settings');
+ const label = shortcut ? t('common.settingsWithShortcut', { hotkey: shortcut }) : t('common.settings');
- return (
- <AppMenuAction
- icon={SettingsIcon}
- label={shortcut ? `${label} (${shortcut})` : label}
- value="settings"
- onClick={onClick}
- />
- );
+ return <AppMenuAction icon={SettingsIcon} label={label} value="settings" onClick={onClick} />;
};
// Sized like the 2xs icon buttons in widget headers; menu items default to a