@@ -2,6 +2,7 @@ import type {NavigationTreeNodeType} from 'ydb-ui-components';
22
33import { EPathSubType , EPathType } from '../../../types/api/schema' ;
44import type { ETenantType } from '../../../types/api/tenant' ;
5+ import i18n from '../i18n' ;
56
67// this file contains verbose mappings that are typed in a way that ensures
78// correctness when a new node type or a new path type is added
@@ -62,8 +63,8 @@ export const mapPathTypeToNavigationTreeType = (
6263// ====================
6364
6465const pathSubTypeToEntityName : Record < EPathSubType , string | undefined > = {
65- [ EPathSubType . EPathSubTypeSyncIndexImplTable ] : 'Secondary Index Table' ,
66- [ EPathSubType . EPathSubTypeAsyncIndexImplTable ] : 'Secondary Index Table' ,
66+ [ EPathSubType . EPathSubTypeSyncIndexImplTable ] : i18n ( 'entity-name_secondary-index-table' ) ,
67+ [ EPathSubType . EPathSubTypeAsyncIndexImplTable ] : i18n ( 'entity-name_secondary-index-table' ) ,
6768
6869 [ EPathSubType . EPathSubTypeStreamImpl ] : undefined ,
6970 [ EPathSubType . EPathSubTypeEmpty ] : undefined ,
@@ -72,26 +73,26 @@ const pathSubTypeToEntityName: Record<EPathSubType, string | undefined> = {
7273const pathTypeToEntityName : Record < EPathType , string | undefined > = {
7374 [ EPathType . EPathTypeInvalid ] : undefined ,
7475
75- [ EPathType . EPathTypeSubDomain ] : 'Database' ,
76- [ EPathType . EPathTypeExtSubDomain ] : 'Database' ,
76+ [ EPathType . EPathTypeSubDomain ] : i18n ( 'entity-name_database' ) ,
77+ [ EPathType . EPathTypeExtSubDomain ] : i18n ( 'entity-name_database' ) ,
7778
78- [ EPathType . EPathTypeDir ] : 'Directory' ,
79- [ EPathType . EPathTypeTable ] : 'Table' ,
80- [ EPathType . EPathTypeSysView ] : 'System view',
81- [ EPathType . EPathTypeTableIndex ] : 'Secondary Index' ,
82- [ EPathType . EPathTypeColumnStore ] : 'Tablestore' ,
83- [ EPathType . EPathTypeColumnTable ] : 'Column- oriented table',
84- [ EPathType . EPathTypeCdcStream ] : 'Changefeed' ,
85- [ EPathType . EPathTypePersQueueGroup ] : 'Topic' ,
79+ [ EPathType . EPathTypeDir ] : i18n ( 'entity-name_directory' ) ,
80+ [ EPathType . EPathTypeTable ] : i18n ( 'entity-name_table' ) ,
81+ [ EPathType . EPathTypeSysView ] : i18n ( 'entity-name_system- view') ,
82+ [ EPathType . EPathTypeTableIndex ] : i18n ( 'entity-name_secondary-index' ) ,
83+ [ EPathType . EPathTypeColumnStore ] : i18n ( 'entity-name_tablestore' ) ,
84+ [ EPathType . EPathTypeColumnTable ] : i18n ( 'entity-name_column- oriented- table') ,
85+ [ EPathType . EPathTypeCdcStream ] : i18n ( 'entity-name_changefeed' ) ,
86+ [ EPathType . EPathTypePersQueueGroup ] : i18n ( 'entity-name_topic' ) ,
8687
87- [ EPathType . EPathTypeExternalDataSource ] : 'External Data Source' ,
88- [ EPathType . EPathTypeExternalTable ] : 'External Table' ,
88+ [ EPathType . EPathTypeExternalDataSource ] : i18n ( 'entity-name_external-data-source' ) ,
89+ [ EPathType . EPathTypeExternalTable ] : i18n ( 'entity-name_external-table' ) ,
8990
90- [ EPathType . EPathTypeView ] : 'View' ,
91+ [ EPathType . EPathTypeView ] : i18n ( 'entity-name_view' ) ,
9192
92- [ EPathType . EPathTypeReplication ] : 'Async Replication' ,
93- [ EPathType . EPathTypeTransfer ] : 'Transfer' ,
94- [ EPathType . EPathTypeResourcePool ] : 'Resource Pool' ,
93+ [ EPathType . EPathTypeReplication ] : i18n ( 'entity-name_async-replication' ) ,
94+ [ EPathType . EPathTypeTransfer ] : i18n ( 'entity-name_transfer' ) ,
95+ [ EPathType . EPathTypeResourcePool ] : i18n ( 'entity-name_resource-pool' ) ,
9596} ;
9697
9798export const mapPathTypeToEntityName = (
0 commit comments