fix: Make bottom panel tab titles reactive to language changes (#5077)

* computed extraMenuItems

* add i18n key option

* underline fix

* Update locales [skip ci]

* restore title

* Update locales [skip ci]

* refactor: Extract tab title logic to helper method for better readability

- Moved complex nested ternary logic from template to getTabDisplayTitle helper
- Improves code readability and maintainability
- Addresses review feedback about using computed/method for performance

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Benjamin Lu
2025-08-18 19:27:21 -04:00
committed by GitHub
parent 75d7a3725b
commit 7a1a2dd654
11 changed files with 45 additions and 33 deletions

View File

@@ -110,10 +110,11 @@ export const useBottomPanelStore = defineStore('bottomPanel', () => {
panel.activeTabId = tab.id
}
const tabName = tab.title || tab.titleKey || tab.id
useCommandStore().registerCommand({
id: `Workspace.ToggleBottomPanelTab.${tab.id}`,
icon: 'pi pi-list',
label: `Toggle ${tab.title} Bottom Panel`,
label: `Toggle ${tabName} Bottom Panel`,
category: 'view-controls' as const,
function: () => toggleBottomPanelTab(tab.id),
source: 'System'