Skip to content

Commit 6bc0d36

Browse files
committed
add translation package including section registration
1 parent 5a13b77 commit 6bc0d36

File tree

11 files changed

+46
-42
lines changed

11 files changed

+46
-42
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"./temporary-file": "./dist-cms/packages/core/temporary-file/index.js",
9595
"./themes": "./dist-cms/packages/core/themes/index.js",
9696
"./tiny-mce": "./dist-cms/packages/tiny-mce/index.js",
97+
"./translation": "./dist-cms/packages/translation/index.js",
9798
"./tree": "./dist-cms/packages/core/tree/index.js",
9899
"./ufm": "./dist-cms/packages/ufm/index.js",
99100
"./user-change-password": "./dist-cms/packages/user/change-password/index.js",

src/apps/backoffice/backoffice.element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const CORE_PACKAGES = [
4141
import('../../packages/telemetry/umbraco-package.js'),
4242
import('../../packages/templating/umbraco-package.js'),
4343
import('../../packages/tiny-mce/umbraco-package.js'),
44+
import('../../packages/translation/umbraco-package.js'),
4445
import('../../packages/ufm/umbraco-package.js'),
4546
import('../../packages/umbraco-news/umbraco-package.js'),
4647
import('../../packages/user/umbraco-package.js'),

src/packages/dictionary/section/constants.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/packages/dictionary/section/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/packages/dictionary/section/manifests.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/packages/translation/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const UMB_TRANSLATION_SECTION_ALIAS = 'Umb.Section.Translation';

src/packages/translation/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './constants.js';

src/packages/translation/manifests.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { UMB_TRANSLATION_SECTION_ALIAS } from './constants.js';
2+
3+
export const manifests: Array<UmbExtensionManifest> = [
4+
{
5+
type: 'section',
6+
alias: UMB_TRANSLATION_SECTION_ALIAS,
7+
name: 'Translation Section',
8+
weight: 400,
9+
meta: {
10+
label: '#sections_translation',
11+
pathname: 'translation',
12+
},
13+
conditions: [
14+
{
15+
alias: 'Umb.Condition.SectionUserPermission',
16+
match: UMB_TRANSLATION_SECTION_ALIAS,
17+
},
18+
],
19+
},
20+
];
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export const name = 'Umbraco.Core.Translation';
2+
export const extensions = [
3+
{
4+
name: 'Umbraco Translation Bundle',
5+
alias: 'Umb.Bundle.Translation',
6+
type: 'bundle',
7+
js: () => import('./manifests.js'),
8+
},
9+
];
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from 'vite';
2+
import { rmSync } from 'fs';
3+
import { getDefaultConfig } from '../../vite-config-base';
4+
5+
const dist = '../../../dist-cms/packages/translation';
6+
7+
// delete the unbundled dist folder
8+
rmSync(dist, { recursive: true, force: true });
9+
10+
export default defineConfig({
11+
...getDefaultConfig({ dist }),
12+
});

0 commit comments

Comments
 (0)