Skip to content

Commit 53c63f3

Browse files
committed
finish removing references to ngx-translate
1 parent d58a026 commit 53c63f3

File tree

10 files changed

+21
-15
lines changed

10 files changed

+21
-15
lines changed

src/banner/banner.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const EN = require("./../i18n/en.json");
4141
type="button">
4242
<svg
4343
class="bx--inline-notification__close-icon"
44-
[aria-label]="bannerObj.closeLabel"
44+
[attr.aria-label]="bannerObj.closeLabel"
4545
width="10"
4646
height="10"
4747
viewBox="0 0 10 10"

src/banner/toast.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const EN = require("./../i18n/en.json");
3030
(click)="onClose()">
3131
<svg
3232
class="bx--toast-notification-icon"
33-
[aria-label]="bannerObj.closeLabel"
33+
[attr.aria-label]="bannerObj.closeLabel"
3434
width="10"
3535
height="10"
3636
viewBox="0 0 10 10"

src/calendar/calendar-header.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { range } from "../common/utils";
3535
<li
3636
class="month_view-month"
3737
*ngFor="let month of range(monthCount)">
38-
{{getMonth(month) | translate}}
38+
{{getMonth(month)}}
3939
</li>
4040
<li class="pagination_chevron">
4141
<a (click)="nextMonth()" title="Next page" aria-label="Next page">

src/calendar/month-view/calendar-month.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { range } from "../../common/utils";
1515
*ngFor="let month of range(monthCount)">
1616
<table class="calendar_grid calendar_month">
1717
<tr class="grid_row_header--month">
18-
<th *ngFor="let day of model.daysOfWeek"><div>{{day | translate}}</div></th>
18+
<th *ngFor="let day of model.daysOfWeek"><div>{{day}}</div></th>
1919
</tr>
2020
<tr
2121
class="grid_row--month"

src/calendar/months-view/calendar-months.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { range } from "../../common/utils";
2626
}">
2727
<div>
2828
<p>
29-
{{months[i * 4 + j] | translate}}
29+
{{months[i * 4 + j]}}
3030
</p>
3131
</div>
3232
</td>

src/calendar/quarter-view/calendar-quarter.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ import { range } from "../../common/utils";
2626
}">
2727
<div>
2828
<p class="top">
29-
{{quarters[i * 2 + j].name | translate}}
29+
{{quarters[i * 2 + j].name}}
3030
</p>
3131
<p class="bottom">
32-
{{quarters[i * 2 + j].months | translate}}
32+
{{quarters[i * 2 + j].months}}
3333
</p>
3434
</div>
3535
</td>

src/dialog/overflow-menu/overflow-menu-pane.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { Dialog } from "../dialog.component";
33
import { position } from "../../utils/position";
44
import { isFocusInLastItem, isFocusInFirstItem } from "./../../common/tab.service";
55

6+
const EN = require("./../../i18n/en.json");
7+
68
/**
79
* Extend the `Dialog` component to create an overflow menu.
810
*
@@ -13,7 +15,7 @@ import { isFocusInLastItem, isFocusInFirstItem } from "./../../common/tab.servic
1315
template: `
1416
<ul
1517
role="menu"
16-
attr.aria-label="{{'OVERFLOW_MENU.OVERFLOW' | translate}}"
18+
[attr.aria-label]="dialogConfig.menuLabel"
1719
#dialog
1820
class="bx--overflow-menu-options bx--overflow-menu-options--open">
1921
<ng-template
@@ -37,6 +39,10 @@ export class OverflowMenuPane extends Dialog {
3739
*/
3840
this.addGap["bottom"] = pos => position.addOffset(pos, -20, 60);
3941

42+
if (!this.dialogConfig.menuLabel) {
43+
this.dialogConfig.menuLabel = EN.OVERFLOW_MENU.OVERFLOW;
44+
}
45+
4046
setTimeout(() => this.listItems()[0].focus());
4147
}
4248

src/dialog/overflow-menu/overflow-menu.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, ElementRef, Input } from "@angular/core";
22

3-
const EN = require("./../i18n/en.json");
3+
const EN = require("./../../i18n/en.json");
44

55
/**
66
* The OverFlow menu component encapsulates the OverFlowMenu directive, and the menu iconography into one convienent component
@@ -47,7 +47,7 @@ const EN = require("./../i18n/en.json");
4747
})
4848
export class OverflowMenu {
4949

50-
@Input() buttonLable = EN.OVERFLOW_MENU.OVERFLOW;
50+
@Input() buttonLabel = EN.OVERFLOW_MENU.OVERFLOW;
5151

5252
constructor(private elementRef: ElementRef) {}
5353

src/dropdown/dropdown.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const EN = require("./../i18n/en.json");
5151
[disabled]="disabled">
5252
<span class="bx--list-box__label">{{getDisplayValue() | async}}</span>
5353
<div class="bx--list-box__menu-icon" [ngClass]="{'bx--list-box__menu-icon--open': !menuIsClosed }">
54-
<svg fill-rule="evenodd" height="5" role="img" viewBox="0 0 10 5" width="10" alt="Open menu" [aria-label]="menuButtonLabel">
54+
<svg fill-rule="evenodd" height="5" role="img" viewBox="0 0 10 5" width="10" alt="Open menu" [attr.aria-label]="menuButtonLabel">
5555
<title>{{menuButtonLabel}}</title>
5656
<path d="M0 0l5 4.998L10 0z"></path>
5757
</svg>

src/modal/modal-header.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const EN = require("./../i18n/en.json");
3030
</div>
3131
<button
3232
class="bx--modal-close"
33-
attr.aria-label="{{'MODAL.CLOSE' | translate}}"
33+
[attr.aria-label]="closeLabel"
3434
(click)="onClose()">
3535
<svg
3636
class="bx--modal-close__icon"
@@ -39,9 +39,9 @@ const EN = require("./../i18n/en.json");
3939
role="img"
4040
viewBox="0 0 10 10"
4141
width="10"
42-
[aria-label]="closeLabel"
43-
alt="close the modal">
44-
<title>{{'MODAL.CLOSE' | translate}}</title>
42+
[attr.aria-label]="closeLabel"
43+
[attr.alt]="closeLabel">
44+
<title>{{closeLabel}}</title>
4545
<path d="M6.32 5L10 8.68 8.68 10 5 6.32 1.32 10 0 8.68 3.68 5 0 1.32 1.32 0 5 3.68 8.68 0 10 1.32 6.32 5z"></path>
4646
</svg>
4747
</button>

0 commit comments

Comments
 (0)