From 1c351b047023d7929f2febc69330c63b0a11848f Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Tue, 20 Oct 2020 19:10:58 -0600 Subject: [PATCH] [Maps] fix top-level Map page is called 'Kibana' (#81238) (#81261) --- .../maps/public/routing/routes/list/maps_list_view.tsx | 4 +++- .../maps/public/routing/routes/maps_app/get_breadcrumbs.tsx | 5 ++--- x-pack/plugins/translations/translations/ja-JP.json | 1 - x-pack/plugins/translations/translations/zh-CN.json | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/maps/public/routing/routes/list/maps_list_view.tsx b/x-pack/plugins/maps/public/routing/routes/list/maps_list_view.tsx index d66a0d1b7d0da..3b0891a4fd44d 100644 --- a/x-pack/plugins/maps/public/routing/routes/list/maps_list_view.tsx +++ b/x-pack/plugins/maps/public/routing/routes/list/maps_list_view.tsx @@ -42,6 +42,7 @@ import { getNavigateToApp, } from '../../../kibana_services'; import { getMapsSavedObjectLoader } from '../../bootstrap/services/gis_map_saved_object_loader'; +import { getAppTitle } from '../../../../common/i18n_getters'; export const EMPTY_FILTER = ''; @@ -101,7 +102,8 @@ export class MapsListView extends React.Component { async initMapList() { this.fetchItems(); addHelpMenuToAppChrome(); - getCoreChrome().docTitle.change('Maps'); + getCoreChrome().docTitle.change(getAppTitle()); + getCoreChrome().setBreadcrumbs([{ text: getAppTitle() }]); } _find = (search: string) => getMapsSavedObjectLoader().find(search, this.state.listingLimit); diff --git a/x-pack/plugins/maps/public/routing/routes/maps_app/get_breadcrumbs.tsx b/x-pack/plugins/maps/public/routing/routes/maps_app/get_breadcrumbs.tsx index 149c04b414c18..1f74b0d6d1449 100644 --- a/x-pack/plugins/maps/public/routing/routes/maps_app/get_breadcrumbs.tsx +++ b/x-pack/plugins/maps/public/routing/routes/maps_app/get_breadcrumbs.tsx @@ -7,6 +7,7 @@ import { i18n } from '@kbn/i18n'; import { getNavigateToApp } from '../../../kibana_services'; import { goToSpecifiedPath } from '../../maps_router'; +import { getAppTitle } from '../../../../common/i18n_getters'; export const unsavedChangesWarning = i18n.translate( 'xpack.maps.breadCrumbs.unsavedChangesWarning', @@ -37,9 +38,7 @@ export function getBreadcrumbs({ } breadcrumbs.push({ - text: i18n.translate('xpack.maps.mapController.mapsBreadcrumbLabel', { - defaultMessage: 'Maps', - }), + text: getAppTitle(), onClick: () => { if (getHasUnsavedChanges()) { const navigateAway = window.confirm(unsavedChangesWarning); diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 578f5232f6fcf..ff41f6d5bfded 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -11368,7 +11368,6 @@ "xpack.maps.layerWizardSelect.solutionsCategoryLabel": "ソリューション", "xpack.maps.loadMap.errorAttemptingToLoadSavedMap": "マップを読み込めません", "xpack.maps.map.initializeErrorTitle": "マップを初期化できません", - "xpack.maps.mapController.mapsBreadcrumbLabel": "マップ", "xpack.maps.mapEmbeddableFactory.invalidLayerList": "不正な形式のレイヤーリストによりマップを読み込めません", "xpack.maps.mapEmbeddableFactory.invalidSavedObject": "不正な形式の保存済みオブジェクトによりマップを読み込めません", "xpack.maps.mapListing.advancedSettingsLinkText": "高度な設定", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index d4e9c5b1fca56..6acc2e7f371f0 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -11381,7 +11381,6 @@ "xpack.maps.layerWizardSelect.solutionsCategoryLabel": "解决方案", "xpack.maps.loadMap.errorAttemptingToLoadSavedMap": "无法加载地图", "xpack.maps.map.initializeErrorTitle": "无法初始化地图", - "xpack.maps.mapController.mapsBreadcrumbLabel": "Maps", "xpack.maps.mapEmbeddableFactory.invalidLayerList": "无法加载地图,图层列表格式不正确", "xpack.maps.mapEmbeddableFactory.invalidSavedObject": "无法加载地图,已保存对象格式错误", "xpack.maps.mapListing.advancedSettingsLinkText": "高级设置",