Skip to content

Commit 087151c

Browse files
LocalizePipe doesn't work with arguments. Fixed: #375
1 parent 734394a commit 087151c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

angular/src/app/tenants/create-tenant/create-tenant.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div bsModal #createTenantModal="bs-modal" class="modal fade" (onShown)="onShown()" tabindex="-1" role="dialog" aria-labelledby="createUserModal" aria-hidden="true" [config]="{backdrop: 'static'}">
1+
<div bsModal #createTenantModal="bs-modal" class="modal fade" (onShown)="onShown()" tabindex="-1" role="dialog" aria-labelledby="createUserModal" aria-hidden="true" [config]="{backdrop: 'static'}">
22
<div class="modal-dialog">
33

44
<div #modalContent class="modal-content">
@@ -45,7 +45,7 @@ <h4 class="modal-title">
4545
<label for="isactive" class="form-label">{{ "IsActive" | localize }}</label>
4646
</div>
4747
</div>
48-
<p>{{ "DefaultPasswordIs" | localize }} 123qwe</p>
48+
<p>{{ "DefaultPasswordIs" | localize:'123qwe' }}</p>
4949
</div>
5050

5151
<div class="modal-footer">

angular/src/shared/pipes/localize.pipe.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { Injector, Pipe, PipeTransform } from '@angular/core';
22
import { AppComponentBase } from '@shared/app-component-base';
33

44
@Pipe({
5-
name: 'localize'
5+
name: 'localize'
66
})
77
export class LocalizePipe extends AppComponentBase implements PipeTransform {
88

9-
constructor(injector: Injector) {
10-
super(injector);
11-
}
12-
13-
transform(key: string): string {
14-
return this.l(key);
15-
}
9+
constructor(injector: Injector) {
10+
super(injector);
11+
}
12+
13+
transform(key: string, ...args: any[]): string {
14+
return this.l(key, args);
15+
}
1616
}

0 commit comments

Comments
 (0)