add localization

This commit is contained in:
Jacob Overgaard
2024-02-09 11:30:12 +01:00
parent 0492701cf2
commit dab06ec16b
4 changed files with 17 additions and 9 deletions

View File

@@ -1563,7 +1563,7 @@ export default {
enableListViewDescription:
'Configures the content item to show a sortable and searchable list of its\n children, the children will not be shown in the tree\n ',
allowedTemplatesHeading: 'Allowed Templates',
allowedTemplatesDescription: 'Choose which templates editors are allowed to use on content of this type\n ',
allowedTemplatesDescription: 'Choose which templates editors are allowed to use on content of this type',
allowAsRootHeading: 'Allow as root',
allowAsRootDescription: 'Allow editors to create content of this type in the root of the content tree.\n ',
childNodesHeading: 'Allowed child node types',

View File

@@ -61,9 +61,9 @@ export class UmbDocumentTypeWorkspaceViewTemplatesElement extends UmbLitElement
}
render() {
return html`<uui-box headline="Templates">
<umb-property-layout alias="Templates" label="Allowed Templates">
<div slot="description">Choose which templates editors are allowed to use on content of this type</div>
return html`<uui-box headline="${this.localize.term('treeHeaders_templates')}">
<umb-property-layout alias="Templates" label="${this.localize.term('contentTypeEditor_allowedTemplatesHeading')}">
<div slot="description">${this.localize.term('contentTypeEditor_allowedTemplatesDescription')}</div>
<div id="templates" slot="editor">
<umb-input-template
.defaultUnique=${this._defaultTemplateId ?? ''}

View File

@@ -27,7 +27,7 @@ export class UmbInputTemplateElement extends FormControlMixin(UmbLitElement) {
* @default
*/
@property({ type: String, attribute: 'min-message' })
minMessage = 'This field need more items';
minMessage = 'This field needs more items';
/**
* This is a maximum amount of selected items in this input.
@@ -172,7 +172,7 @@ export class UmbInputTemplateElement extends FormControlMixin(UmbLitElement) {
?default="${template.unique === this.defaultUnique}">
<uui-button
slot="actions"
label="Remove Template ${template.name}"
label="${this.localize.term('general_remove') + ' ' + template.name}"
@click="${() => this.#removeTemplate(template.unique ?? '')}"
compact>
<uui-icon name="icon-trash"></uui-icon>
@@ -180,7 +180,11 @@ export class UmbInputTemplateElement extends FormControlMixin(UmbLitElement) {
</umb-template-card>
`,
)}
<uui-button id="add-button" look="placeholder" label="open" @click="${this.#openPicker}">Add</uui-button>
<uui-button
id="add-button"
look="placeholder"
label="${this.localize.term('general_add')}"
@click="${this.#openPicker}"></uui-button>
`;
}

View File

@@ -50,8 +50,12 @@ export class UmbTemplateCardElement extends FormControlMixin(UmbLitElement) {
<uui-icon class="logo" name="icon-layout"></uui-icon>
<strong>${this.name.length ? this.name : 'Untitled template'}</strong>
</button>
<uui-button id="bottom" label="Default template" ?disabled="${this.default}" @click="${this.#setSelection}">
${this.default ? '(Default template)' : 'Make default'}
<uui-button
id="bottom"
label="${this.localize.term('settings_defaulttemplate')}"
?disabled="${this.default}"
@click="${this.#setSelection}">
(${this.localize.term(this.default ? 'settings_defaulttemplate' : 'grid_setAsDefault')})
</uui-button>
<slot name="actions"></slot>
</div>`;