Browse Source
Merge pull request #13111 from vvlladd28/improvement/cf/translate
Fixed calculated fields translation
pull/13133/head
Igor Kulikov
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with
5 additions and
7 deletions
ui-ngx/src/app/modules/home/components/calculated-fields/components/debug-dialog/calculated-field-debug-dialog.component.html
ui-ngx/src/app/modules/home/components/calculated-fields/components/debug-dialog/calculated-field-debug-dialog.component.ts
ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.html
ui-ngx/src/app/modules/home/components/event/event-table-config.ts
ui-ngx/src/assets/locale/locale.constant-en_US.json
@ -33,7 +33,6 @@
[defaultEventType]="DebugEventType.DEBUG_CALCULATED_FIELD"
[active]="true"
[entityId]="data.value.id"
[functionTestButtonLabel]="'common.test-function' | translate"
(debugEventSelected)="onDebugEventSelected($event)"
/>
< / div >
@ -55,8 +55,8 @@ export class CalculatedFieldDebugDialogComponent extends DialogComponent<Calcula
}
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 . cellActionDescriptors [ 0 ] . isEnabled = ( event = > this . data . value . type === CalculatedFieldType . SCRIPT && ! ! ( event as Event ) . body . arguments )
}
cancel ( ) : void {
@ -110,7 +110,7 @@
< div toolbarPrefixButton class = "tb-primary-background tbel-script-lang-chip" > {{ 'api-usage.tbel' | translate }}< / div >
< button toolbarSuffixButton
mat-icon-button
matTooltip="{{ 'common.tes t-function' | translate }}"
matTooltip="{{ 'calculated-fields.test-scrip t-function' | translate }}"
matTooltipPosition="above"
class="tb-mat-32"
[disabled]="configFormGroup.get('arguments').invalid"
@ -123,7 +123,7 @@
type="button"
(click)="onTestScript()"
[disabled]="configFormGroup.get('arguments').invalid">
{{ 'common.tes t-function' | translate }}
{{ 'calculated-fields.test-scrip t-function' | translate }}
< / button >
< / div >
< / div >
@ -462,7 +462,7 @@ export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> {
break ;
case DebugEventType . DEBUG_CALCULATED_FIELD :
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' ,
isEnabled : ( ) = > true ,
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-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." ,
"test-with-this-message" : "Test with this message" ,
"hint" : {
"arguments-simple-with-rolling" : "Simple type calculated field should not contain keys with time series rolling type." ,
"arguments-empty" : "Arguments should not be empty." ,
@ -1121,8 +1122,6 @@
"documentation" : "Documentation" ,
"time-left" : "{{time}} left" ,
"output" : "Output" ,
"test-function" : "Test function" ,
"test-with-this-message" : "{{test}} with this message" ,
"suffix" : {
"s" : "s" ,
"ms" : "ms"