translate in repo

This commit is contained in:
Mads Rasmussen
2024-04-08 21:53:41 +02:00
parent 4f7d553fc2
commit f304b15b85
13 changed files with 14 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import type { UmbApi } from '@umbraco-cms/backoffice/extension-api';
import type { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api';
/**
* Base class for a tree repository.
@@ -28,6 +29,7 @@ export abstract class UmbTreeRepositoryBase<
{
protected _init: Promise<unknown>;
protected _treeStore?: UmbTreeStore<TreeItemType>;
protected _localization = new UmbLocalizationController(this._host);
#treeSource: UmbTreeDataSource<TreeItemType>;
/**

View File

@@ -18,7 +18,7 @@ export class UmbDataTypeTreeRepository
const data: UmbDataTypeTreeRootModel = {
unique: null,
entityType: UMB_DATA_TYPE_ROOT_ENTITY_TYPE,
name: '#treeHeaders_dataTypes',
name: this._localization.term('treeHeaders_dataTypes'),
hasChildren: true,
isFolder: true,
};

View File

@@ -18,7 +18,7 @@ export class UmbDictionaryTreeRepository
const data: UmbDictionaryTreeRootModel = {
unique: null,
entityType: UMB_DICTIONARY_ROOT_ENTITY_TYPE,
name: '#treeHeaders_dictionary',
name: this._localization.term('treeHeaders_dictionary'),
hasChildren: true,
isFolder: true,
};

View File

@@ -18,7 +18,7 @@ export class UmbDocumentTypeTreeRepository
const data: UmbDocumentTypeTreeRootModel = {
unique: null,
entityType: UMB_DOCUMENT_TYPE_ROOT_ENTITY_TYPE,
name: '#treeHeaders_documentTypes',
name: this._localization.term('treeHeaders_documentTypes'),
hasChildren: true,
isFolder: true,
};

View File

@@ -18,7 +18,7 @@ export class UmbDocumentRecycleBinTreeRepository
const data = {
unique: null,
entityType: UMB_DOCUMENT_RECYCLE_BIN_ROOT_ENTITY_TYPE,
name: '#treeHeaders_contentRecycleBin',
name: this._localization.term('treeHeaders_contentRecycleBin'),
icon: 'icon-trash',
hasChildren: true,
isContainer: false,

View File

@@ -18,7 +18,7 @@ export class UmbDocumentTreeRepository
const data: UmbDocumentTreeRootModel = {
unique: null,
entityType: UMB_DOCUMENT_ROOT_ENTITY_TYPE,
name: '#treeHeaders_content',
name: this._localization.term('treeHeaders_content'),
hasChildren: true,
isFolder: true,
};

View File

@@ -18,7 +18,7 @@ export class UmbMediaTypeTreeRepository
const data: UmbMediaTypeTreeRootModel = {
unique: null,
entityType: UMB_MEDIA_TYPE_ROOT_ENTITY_TYPE,
name: '#treeHeaders_mediaTypes',
name: this._localization.term('treeHeaders_mediaTypes'),
hasChildren: true,
isFolder: true,
};

View File

@@ -18,7 +18,7 @@ export class UmbMediaTreeRepository
const data: UmbMediaTreeRootModel = {
unique: null,
entityType: UMB_MEDIA_ROOT_ENTITY_TYPE,
name: '#treeHeaders_media',
name: this._localization.term('treeHeaders_media'),
hasChildren: true,
isFolder: true,
};

View File

@@ -18,7 +18,7 @@ export class UmbMemberTypeTreeRepository
const data: UmbMemberTypeTreeRootModel = {
unique: null,
entityType: UMB_MEMBER_TYPE_ROOT_ENTITY_TYPE,
name: '#treeHeaders_memberTypes',
name: this._localization.term('treeHeaders_memberTypes'),
hasChildren: true,
isFolder: true,
};

View File

@@ -18,7 +18,7 @@ export class UmbPartialViewTreeRepository
const data: UmbPartialViewTreeRootModel = {
unique: null,
entityType: UMB_PARTIAL_VIEW_ROOT_ENTITY_TYPE,
name: '#treeHeaders_partialViews',
name: this._localization.term('treeHeaders_partialViews'),
hasChildren: true,
isFolder: true,
};

View File

@@ -15,7 +15,7 @@ export class UmbScriptTreeRepository extends UmbTreeRepositoryBase<UmbScriptTree
const data: UmbScriptTreeRootModel = {
unique: null,
entityType: UMB_SCRIPT_ROOT_ENTITY_TYPE,
name: '#treeHeaders_scripts',
name: this._localization.term('treeHeaders_scripts'),
hasChildren: true,
isFolder: true,
};

View File

@@ -17,7 +17,7 @@ export class UmbStylesheetTreeRepository extends UmbTreeRepositoryBase<
const data: UmbStylesheetTreeRootModel = {
unique: null,
entityType: UMB_STYLESHEET_ROOT_ENTITY_TYPE,
name: '#treeHeaders_stylesheets',
name: this._localization.term('treeHeaders_stylesheets'),
hasChildren: true,
isFolder: true,
};

View File

@@ -18,7 +18,7 @@ export class UmbTemplateTreeRepository
const data: UmbTemplateTreeRootModel = {
unique: null,
entityType: UMB_TEMPLATE_ROOT_ENTITY_TYPE,
name: '#treeHeaders_templates',
name: this._localization.term('treeHeaders_templates'),
hasChildren: true,
isFolder: true,
};