-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2383 from umbraco/v15/feature/translation-section…
…-package Feature: Translation package
- Loading branch information
Showing
35 changed files
with
152 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './dashboard.extension.js'; | ||
export * from './dashboard-element.interface.js'; | ||
export * from './paths.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { UMB_SECTION_PATH_PATTERN } from '@umbraco-cms/backoffice/section'; | ||
import { UmbPathPattern } from '@umbraco-cms/backoffice/router'; | ||
|
||
export const UMB_DASHBOARD_PATH_PATTERN = new UmbPathPattern< | ||
{ dashboardPathname: string }, | ||
typeof UMB_SECTION_PATH_PATTERN.ABSOLUTE_PARAMS | ||
>('dashboard/:dashboardPathname', UMB_SECTION_PATH_PATTERN); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './paths.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { UMB_DASHBOARD_PATH_PATTERN } from '@umbraco-cms/backoffice/dashboard'; | ||
import { UMB_TRANSLATION_SECTION_PATHNAME } from '@umbraco-cms/backoffice/translation'; | ||
|
||
export const UMB_DICTIONARY_OVERVIEW_DASHBOARD_PATHNAME = 'dictionary-overview'; | ||
|
||
export const UMB_DICTIONARY_OVERVIEW_DASHBOARD_PATH = UMB_DASHBOARD_PATH_PATTERN.generateAbsolute({ | ||
sectionName: UMB_TRANSLATION_SECTION_PATHNAME, | ||
dashboardPathname: UMB_DICTIONARY_OVERVIEW_DASHBOARD_PATHNAME, | ||
}); |
18 changes: 7 additions & 11 deletions
18
src/packages/dictionary/entity-action/create/create.action.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import { manifests as collectionManifests } from './collection/manifests.js'; | ||
import { manifests as dashboardManifests } from './dashboard/manifests.js'; | ||
import { manifests as entityActionManifests } from './entity-action/manifests.js'; | ||
import { manifests as menuManifests } from './menu/manifests.js'; | ||
import { manifests as menuItemManifests } from './menu-item/manifests.js'; | ||
import { manifests as repositoryManifests } from './repository/manifests.js'; | ||
import { manifests as sectionManifests } from './section/manifests.js'; | ||
import { manifests as treeManifests } from './tree/manifests.js'; | ||
import { manifests as workspaceManifests } from './workspace/manifests.js'; | ||
|
||
export const manifests: Array<UmbExtensionManifest> = [ | ||
...collectionManifests, | ||
...dashboardManifests, | ||
...entityActionManifests, | ||
...menuManifests, | ||
...menuItemManifests, | ||
...repositoryManifests, | ||
...sectionManifests, | ||
...treeManifests, | ||
...workspaceManifests, | ||
]; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
src/packages/dictionary/workspace/dictionary-workspace-editor.element.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './paths.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { UMB_DICTIONARY_ENTITY_TYPE } from '../entity.js'; | ||
import { UmbPathPattern } from '@umbraco-cms/backoffice/router'; | ||
import { UMB_TRANSLATION_SECTION_PATHNAME } from '@umbraco-cms/backoffice/translation'; | ||
import { UMB_WORKSPACE_PATH_PATTERN } from '@umbraco-cms/backoffice/workspace'; | ||
import type { UmbEntityModel, UmbEntityUnique } from '@umbraco-cms/backoffice/entity'; | ||
|
||
export const UMB_DICTIONARY_WORKSPACE_PATH = UMB_WORKSPACE_PATH_PATTERN.generateAbsolute({ | ||
sectionName: UMB_TRANSLATION_SECTION_PATHNAME, | ||
entityType: UMB_DICTIONARY_ENTITY_TYPE, | ||
}); | ||
|
||
export const UMB_CREATE_DICTIONARY_WORKSPACE_PATH_PATTERN = new UmbPathPattern<{ | ||
parentEntityType: UmbEntityModel['entityType']; | ||
parentUnique: UmbEntityUnique; | ||
}>('create/parent/:parentEntityType/:parentUnique', UMB_DICTIONARY_WORKSPACE_PATH); | ||
|
||
export const UMB_EDIT_DICTIONARY_WORKSPACE_PATH_PATTERN = new UmbPathPattern<{ | ||
unique: UmbEntityUnique; | ||
}>('edit/:unique', UMB_DICTIONARY_WORKSPACE_PATH); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './section/index.js'; | ||
export * from './menu/index.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { manifests as sectionManifests } from './section/manifests.js'; | ||
import { manifests as menuManifests } from './menu/manifests.js'; | ||
|
||
export const manifests: Array<UmbExtensionManifest> = [...sectionManifests, ...menuManifests]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const UMB_TRANSLATION_MENU_ALIAS = 'Umb.Menu.Translation'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './constants.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { UMB_TRANSLATION_SECTION_ALIAS } from '../section/index.js'; | ||
import { UMB_TRANSLATION_MENU_ALIAS } from './constants.js'; | ||
|
||
export const manifests: Array<UmbExtensionManifest> = [ | ||
{ | ||
type: 'menu', | ||
alias: UMB_TRANSLATION_MENU_ALIAS, | ||
name: 'Translation Menu', | ||
}, | ||
{ | ||
type: 'sectionSidebarApp', | ||
kind: 'menuWithEntityActions', | ||
alias: 'Umb.SidebarMenu.Translation', | ||
name: 'Translation Sidebar Menu', | ||
weight: 100, | ||
meta: { | ||
label: '#sections_translation', | ||
menu: UMB_TRANSLATION_MENU_ALIAS, | ||
entityType: 'dictionary-root', // hard-coded on purpose to avoid circular dependency. We need another way to add actions to a menu kind. | ||
}, | ||
conditions: [ | ||
{ | ||
alias: 'Umb.Condition.SectionAlias', | ||
match: UMB_TRANSLATION_SECTION_ALIAS, | ||
}, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const UMB_TRANSLATION_SECTION_ALIAS = 'Umb.Section.Translation'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './constants.js'; | ||
export * from './paths.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { UMB_TRANSLATION_SECTION_ALIAS } from './constants.js'; | ||
|
||
export const manifests: Array<UmbExtensionManifest> = [ | ||
{ | ||
type: 'section', | ||
alias: UMB_TRANSLATION_SECTION_ALIAS, | ||
name: 'Translation Section', | ||
weight: 400, | ||
meta: { | ||
label: '#sections_translation', | ||
pathname: 'translation', | ||
}, | ||
conditions: [ | ||
{ | ||
alias: 'Umb.Condition.SectionUserPermission', | ||
match: UMB_TRANSLATION_SECTION_ALIAS, | ||
}, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { UMB_SECTION_PATH_PATTERN } from '@umbraco-cms/backoffice/section'; | ||
|
||
export const UMB_TRANSLATION_SECTION_PATHNAME = 'translation'; | ||
export const UMB_TRANSLATION_SECTION_PATH = UMB_SECTION_PATH_PATTERN.generateAbsolute({ | ||
sectionName: UMB_TRANSLATION_SECTION_PATHNAME, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const name = 'Umbraco.Core.Translation'; | ||
export const extensions = [ | ||
{ | ||
name: 'Umbraco Translation Bundle', | ||
alias: 'Umb.Bundle.Translation', | ||
type: 'bundle', | ||
js: () => import('./manifests.js'), | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defineConfig } from 'vite'; | ||
import { rmSync } from 'fs'; | ||
import { getDefaultConfig } from '../../vite-config-base'; | ||
|
||
const dist = '../../../dist-cms/packages/translation'; | ||
|
||
// delete the unbundled dist folder | ||
rmSync(dist, { recursive: true, force: true }); | ||
|
||
export default defineConfig({ | ||
...getDefaultConfig({ dist }), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters