Skip to content

Commit 6377e48

Browse files
committed
localization
1 parent e6514ab commit 6377e48

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

src/components/TDatepicker/TDatepickerTimeSelector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ const TDatepickerTimeSelector = Vue.extend({
249249
{
250250
class: this.getElementCssClass('timepickerTimeLabel'),
251251
},
252-
'Time',
252+
this.locale.timeLabel,
253253
);
254254

255255
const timePickerInputs = [
@@ -480,7 +480,7 @@ const TDatepickerTimeSelector = Vue.extend({
480480
},
481481
},
482482
},
483-
'Ok',
483+
this.locale.okLabel,
484484
),
485485
);
486486

src/l10n/default.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ export const English: Locale = {
6767
hourAriaLabel: 'Hour',
6868
minuteAriaLabel: 'Minute',
6969
time24hr: false,
70+
timeLabel: 'Time',
71+
okLabel: 'Ok',
7072
};
7173

7274
export default English;

src/l10n/es.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export const Spanish: CustomLocale = {
5151
firstDayOfWeek: 1,
5252
rangeSeparator: ' a ',
5353
time24hr: true,
54+
timeLabel: 'Hora',
55+
okLabel: 'Ok',
5456
};
5557

5658
export default Spanish;

src/types/locale.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ export type Locale = {
5757
hourAriaLabel: string;
5858
minuteAriaLabel: string;
5959
time24hr: boolean;
60+
timeLabel: string;
61+
okLabel: string;
6062
};
6163

6264
export type CustomLocale = {
@@ -70,6 +72,8 @@ export type CustomLocale = {
7072
minuteAriaLabel?: string;
7173
amPM?: Locale['amPM'];
7274
time24hr?: Locale['time24hr'];
75+
timeLabel?: Locale['timeLabel'];
76+
okLabel?: Locale['okLabel'];
7377
weekdays: {
7478
shorthand: [string, string, string, string, string, string, string];
7579
longhand: [string, string, string, string, string, string, string];

0 commit comments

Comments
 (0)