Merge pull request #13111 from vvlladd28/improvement/cf/translate
Fixed calculated fields translation
This commit is contained in:
commit
09bcf323eb
@ -33,7 +33,6 @@
|
|||||||
[defaultEventType]="DebugEventType.DEBUG_CALCULATED_FIELD"
|
[defaultEventType]="DebugEventType.DEBUG_CALCULATED_FIELD"
|
||||||
[active]="true"
|
[active]="true"
|
||||||
[entityId]="data.value.id"
|
[entityId]="data.value.id"
|
||||||
[functionTestButtonLabel]="'common.test-function' | translate"
|
|
||||||
(debugEventSelected)="onDebugEventSelected($event)"
|
(debugEventSelected)="onDebugEventSelected($event)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -55,8 +55,8 @@ export class CalculatedFieldDebugDialogComponent extends DialogComponent<Calcula
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit(): void {
|
ngAfterViewInit(): void {
|
||||||
|
this.eventsTable.entitiesTable.cellActionDescriptors[0].isEnabled = (event => this.data.value.type === CalculatedFieldType.SCRIPT && !!(event as Event).body.arguments);
|
||||||
this.eventsTable.entitiesTable.updateData();
|
this.eventsTable.entitiesTable.updateData();
|
||||||
this.eventsTable.entitiesTable.cellActionDescriptors[0].isEnabled = (event => this.data.value.type === CalculatedFieldType.SCRIPT && !!(event as Event).body.arguments)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel(): void {
|
cancel(): void {
|
||||||
|
|||||||
@ -110,7 +110,7 @@
|
|||||||
<div toolbarPrefixButton class="tb-primary-background tbel-script-lang-chip">{{ 'api-usage.tbel' | translate }}</div>
|
<div toolbarPrefixButton class="tb-primary-background tbel-script-lang-chip">{{ 'api-usage.tbel' | translate }}</div>
|
||||||
<button toolbarSuffixButton
|
<button toolbarSuffixButton
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
matTooltip="{{ 'common.test-function' | translate }}"
|
matTooltip="{{ 'calculated-fields.test-script-function' | translate }}"
|
||||||
matTooltipPosition="above"
|
matTooltipPosition="above"
|
||||||
class="tb-mat-32"
|
class="tb-mat-32"
|
||||||
[disabled]="configFormGroup.get('arguments').invalid"
|
[disabled]="configFormGroup.get('arguments').invalid"
|
||||||
@ -123,7 +123,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
(click)="onTestScript()"
|
(click)="onTestScript()"
|
||||||
[disabled]="configFormGroup.get('arguments').invalid">
|
[disabled]="configFormGroup.get('arguments').invalid">
|
||||||
{{ 'common.test-function' | translate }}
|
{{ 'calculated-fields.test-script-function' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -462,7 +462,7 @@ export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> {
|
|||||||
break;
|
break;
|
||||||
case DebugEventType.DEBUG_CALCULATED_FIELD:
|
case DebugEventType.DEBUG_CALCULATED_FIELD:
|
||||||
this.cellActionDescriptors.push({
|
this.cellActionDescriptors.push({
|
||||||
name: this.translate.instant('common.test-with-this-message', {test: this.translate.instant(this.testButtonLabel)}),
|
name: this.translate.instant('calculated-fields.test-with-this-message'),
|
||||||
icon: 'bug_report',
|
icon: 'bug_report',
|
||||||
isEnabled: () => true,
|
isEnabled: () => true,
|
||||||
onAction: (_, entity) => this.debugEventSelected.next(entity.body)
|
onAction: (_, entity) => this.debugEventSelected.next(entity.body)
|
||||||
|
|||||||
@ -1059,6 +1059,7 @@
|
|||||||
"delete-text": "Be careful, after the confirmation the calculated field and all related data will become unrecoverable.",
|
"delete-text": "Be careful, after the confirmation the calculated field and all related data will become unrecoverable.",
|
||||||
"delete-multiple-title": "Are you sure you want to delete { count, plural, =1 {1 calculated field} other {# calculated fields} }?",
|
"delete-multiple-title": "Are you sure you want to delete { count, plural, =1 {1 calculated field} other {# calculated fields} }?",
|
||||||
"delete-multiple-text": "Be careful, after the confirmation all selected calculated fields will be removed and all related data will become unrecoverable.",
|
"delete-multiple-text": "Be careful, after the confirmation all selected calculated fields will be removed and all related data will become unrecoverable.",
|
||||||
|
"test-with-this-message": "Test with this message",
|
||||||
"hint": {
|
"hint": {
|
||||||
"arguments-simple-with-rolling": "Simple type calculated field should not contain keys with time series rolling type.",
|
"arguments-simple-with-rolling": "Simple type calculated field should not contain keys with time series rolling type.",
|
||||||
"arguments-empty": "Arguments should not be empty.",
|
"arguments-empty": "Arguments should not be empty.",
|
||||||
@ -1121,8 +1122,6 @@
|
|||||||
"documentation": "Documentation",
|
"documentation": "Documentation",
|
||||||
"time-left": "{{time}} left",
|
"time-left": "{{time}} left",
|
||||||
"output": "Output",
|
"output": "Output",
|
||||||
"test-function": "Test function",
|
|
||||||
"test-with-this-message": "{{test}} with this message",
|
|
||||||
"suffix": {
|
"suffix": {
|
||||||
"s": "s",
|
"s": "s",
|
||||||
"ms": "ms"
|
"ms": "ms"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user