DashboardLibrary: Restore New dashboard naming (#115184)

This commit is contained in:
Juan Cabanas
2025-12-12 10:10:05 -03:00
committed by GitHub
parent b2dd095bd8
commit 6512259acc
3 changed files with 2 additions and 10 deletions
@@ -1,5 +1,4 @@
import { t } from '@grafana/i18n';
import { config } from '@grafana/runtime';
// Maps the ID of the nav item to a translated phrase to later pass to <Trans />
// Because the navigation content is dynamic (defined in the backend), we can not use
// the normal inline message definition method.
@@ -49,9 +48,7 @@ export function getNavTitle(navId: string | undefined) {
case 'dashboards/recently-deleted':
return t('nav.recently-deleted.title', 'Recently deleted');
case 'dashboards/new':
return config.featureToggles.dashboardTemplates
? t('nav.new-dashboard.empty-title', 'Empty dashboard')
: t('nav.new-dashboard.title', 'New dashboard');
return t('nav.new-dashboard.title', 'New dashboard');
case 'dashboards/folder/new':
return t('nav.new-folder.title', 'New folder');
case 'dashboards/import':
@@ -2,7 +2,6 @@
// TODO: remove this when new Browse Dashboards UI is no longer feature flagged
import { t } from '@grafana/i18n';
import { config } from '@grafana/runtime';
export function getSearchPlaceholder(includePanels = false) {
return includePanels
@@ -11,9 +10,7 @@ export function getSearchPlaceholder(includePanels = false) {
}
export function getNewDashboardPhrase() {
return config.featureToggles.dashboardTemplates
? t('search.dashboard-actions.empty-dashboard', 'Empty dashboard')
: t('search.dashboard-actions.new-dashboard', 'New dashboard');
return t('search.dashboard-actions.new-dashboard', 'New dashboard');
}
export function getNewTemplateDashboardPhrase() {
-2
View File
@@ -10724,7 +10724,6 @@
"title": "New"
},
"new-dashboard": {
"empty-title": "Empty dashboard",
"title": "New dashboard"
},
"new-folder": {
@@ -12634,7 +12633,6 @@
}
},
"dashboard-actions": {
"empty-dashboard": "Empty dashboard",
"import": "Import",
"new": "New",
"new-dashboard": "New dashboard",