Skip to content

Commit 31ffa15

Browse files
committed
Adding translations for error messages.
1 parent e713f52 commit 31ffa15

File tree

27 files changed

+217
-9
lines changed

27 files changed

+217
-9
lines changed

eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/workday-entity/workday-entity-dialog.component.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,12 @@ export class WorkdayEntityDialogComponent implements OnInit {
391391

392392
if (!start || !stop) {
393393
if (!start) {
394-
setError(startControl, 'required', 'Start time is required');
394+
setError(startControl, 'required', this.translateService.instant('Start time is required'));
395395
} else {
396396
removeError(startControl, 'required');
397397
}
398398
if (!stop) {
399-
setError(stopControl, 'required', 'Stop time is required');
399+
setError(stopControl, 'required', this.translateService.instant('Stop time is required'));
400400
} else {
401401
removeError(stopControl, 'required');
402402
}
@@ -405,8 +405,8 @@ export class WorkdayEntityDialogComponent implements OnInit {
405405

406406
// Validate same start/stop
407407
if (startMin === stopMin && (startMin !== 0 && stopMin !== 0)) {
408-
setError(startControl, 'sameStartStop', 'Start and Stop cannot be the same');
409-
setError(stopControl, 'sameStartStop', 'Start and Stop cannot be the same');
408+
setError(startControl, 'sameStartStop', this.translateService.instant('Start and Stop cannot be the same'));
409+
setError(stopControl, 'sameStartStop', this.translateService.instant('Start and Stop cannot be the same'));
410410
} else {
411411
removeError(startControl, 'sameStartStop');
412412
removeError(stopControl, 'sameStartStop');
@@ -421,15 +421,15 @@ export class WorkdayEntityDialogComponent implements OnInit {
421421

422422
// Stop before start
423423
if (stopMin !== 0 && stopMin < startMin) {
424-
setError(stopControl, 'invalidRange', 'Stop time cannot be before start time');
424+
setError(stopControl, 'invalidRange', this.translateService.instant('Stop time cannot be before start time'));
425425
} else {
426426
removeError(stopControl, 'invalidRange');
427427
}
428428

429429
// Break time validation
430430
if (breakMin !== null) {
431431
if (breakMin < 0) {
432-
setError(breakControl, 'negativeBreak', 'Break cannot be negative');
432+
setError(breakControl, 'negativeBreak', this.translateService.instant('Break cannot be negative'));
433433
} else {
434434
removeError(breakControl, 'negativeBreak');
435435
}
@@ -438,21 +438,21 @@ export class WorkdayEntityDialogComponent implements OnInit {
438438
setError(
439439
breakControl,
440440
'breakTooLong',
441-
'Break cannot be equal or longer than shift duration',
441+
this.translateService.instant('Break cannot be equal or longer than shift duration'),
442442
);
443443
} else {
444444
removeError(breakControl, 'breakTooLong');
445445
}
446446
}
447447

448448
if (duration > 24 * 60) {
449-
setError(group, 'shiftTooLong', 'Shift duration cannot exceed 24 hours');
449+
setError(group, 'shiftTooLong', this.translateService.instant('Shift duration cannot exceed 24 hours'));
450450
} else {
451451
removeError(group, 'shiftTooLong');
452452
}
453453

454454
if (breakMin && breakMin >= duration) {
455-
setError(breakControl, 'invalidBreak', 'Break must be shorter than shift duration');
455+
setError(breakControl, 'invalidBreak', this.translateService.instant('Break must be shorter than shift duration'));
456456
} else {
457457
removeError(breakControl, 'invalidBreak');
458458
}

eform-client/src/app/plugins/modules/time-planning-pn/i18n/bgBG.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,12 @@ export const bgBG = {
131131
Resigned: 'Оставка',
132132
'Resigned at date': 'Оставка на дата',
133133
'NettoHours override': 'Отмяна на нетно време',
134+
'Break must be shorter than shift duration': 'Почивката трябва да е по-кратка от продължителността на смяната',
135+
'Shift duration cannot exceed 24 hours': 'Продължителността на смяната не може да надвишава 24 часа',
136+
'Break cannot be equal or longer than shift duration': 'Почивката не може да бъде равна или по-дълга от продължителността на смяната',
137+
'Break cannot be negative': 'Прекъсването не може да бъде отрицателно',
138+
'Stop time cannot be before start time': 'Времето за край не може да бъде преди времето за начало',
139+
'Start and Stop cannot be the same': 'Старт и стоп не могат да бъдат едно и също нещо',
140+
'Stop time is required': 'Необходимо е време за спиране',
141+
'Start time is required': 'Необходимо е да се посочи начален час',
134142
};

eform-client/src/app/plugins/modules/time-planning-pn/i18n/csCZ.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,12 @@ export const csCZ = {
131131
Resigned: 'Rezignoval',
132132
'Resigned at date': 'Rezignoval/a k datu',
133133
'NettoHours override': 'Přepsání hodin netto',
134+
'Break must be shorter than shift duration': 'Přestávka musí být kratší než délka směny',
135+
'Shift duration cannot exceed 24 hours': 'Délka směny nesmí překročit 24 hodin',
136+
'Break cannot be equal or longer than shift duration': 'Přestávka nemůže být stejná nebo delší než délka směny',
137+
'Break cannot be negative': 'Přerušení nemůže být záporné',
138+
'Stop time cannot be before start time': 'Čas ukončení nemůže být před časem zahájení',
139+
'Start and Stop cannot be the same': 'Start a Stop nemohou být stejné',
140+
'Stop time is required': 'Je vyžadován čas zastavení',
141+
'Start time is required': 'Čas zahájení je povinný',
134142
};

eform-client/src/app/plugins/modules/time-planning-pn/i18n/da.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,12 @@ export const da = {
129129
Resigned: 'Fratrådt',
130130
'Resigned at date': 'Fratrådte på datoen',
131131
'NettoHours override': 'Netto timer overskrivning',
132+
'Break must be shorter than shift duration': 'Pausen skal være kortere end vagtens varighed',
133+
'Shift duration cannot exceed 24 hours': 'Vagtens varighed må ikke overstige 24 timer',
134+
'Break cannot be equal or longer than shift duration': 'Pausen må ikke være lige så lang som eller længere end vagtens varighed',
135+
'Break cannot be negative': 'Pausen kan ikke være negativ',
136+
'Stop time cannot be before start time': 'Stoptidspunktet må ikke være før starttidspunktet',
137+
'Start and Stop cannot be the same': 'Starttidspunkt og Stoptidspunkt kan ikke være det samme',
138+
'Stop time is required': 'Stoptidspunkt er påkrævet',
139+
'Start time is required': 'Starttidspunkt er påkrævet',
132140
};

eform-client/src/app/plugins/modules/time-planning-pn/i18n/deDE.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,12 @@ export const deDE = {
131131
Resigned: 'Resigniert',
132132
'Resigned at date': 'Zurückgetreten am Datum',
133133
'NettoHours override': 'Nettostundenüberschreibung',
134+
'Break must be shorter than shift duration': 'Pause muss kürzer als Schichtdauer sein',
135+
'Shift duration cannot exceed 24 hours': 'Die Schichtdauer darf 24 Stunden nicht überschreiten',
136+
'Break cannot be equal or longer than shift duration': 'Die Pause darf nicht gleich lang oder länger als die Schichtdauer sein.',
137+
'Break cannot be negative': 'Break kann nicht negativ sein',
138+
'Stop time cannot be before start time': 'Die Stoppzeit kann nicht vor der Startzeit liegen',
139+
'Start and Stop cannot be the same': 'Start und Stopp können nicht identisch sein',
140+
'Stop time is required': 'Stoppzeit ist erforderlich',
141+
'Start time is required': 'Startzeit ist erforderlich',
134142
};

eform-client/src/app/plugins/modules/time-planning-pn/i18n/elGR.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,12 @@ export const elGR = {
131131
Resigned: 'Καρτερικός',
132132
'Resigned at date': 'Παραιτήθηκε την ημερομηνία',
133133
'NettoHours override': 'Παράκαμψη καθαρών ωρών',
134+
'Break must be shorter than shift duration': 'Το διάλειμμα πρέπει να είναι μικρότερο από τη διάρκεια της βάρδιας',
135+
'Shift duration cannot exceed 24 hours': 'Η διάρκεια της βάρδιας δεν μπορεί να υπερβαίνει τις 24 ώρες',
136+
'Break cannot be equal or longer than shift duration': 'Το διάλειμμα δεν μπορεί να είναι ίσο ή μεγαλύτερο από τη διάρκεια της βάρδιας.',
137+
'Break cannot be negative': 'Το διάλειμμα δεν μπορεί να είναι αρνητικό.',
138+
'Stop time cannot be before start time': 'Η ώρα λήξης δεν μπορεί να είναι πριν από την ώρα έναρξης',
139+
'Start and Stop cannot be the same': 'Η έναρξη και η διακοπή δεν μπορούν να είναι ίδιες',
140+
'Stop time is required': 'Απαιτείται χρόνος διακοπής',
141+
'Start time is required': 'Απαιτείται ώρα έναρξης',
134142
};

eform-client/src/app/plugins/modules/time-planning-pn/i18n/enUS.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,12 @@ export const enUS = {
129129
'Resigned': 'Resigned',
130130
'Resigned at date': 'Resigned at date',
131131
'NettoHours override': 'Netto hours override',
132+
'Break must be shorter than shift duration': 'Break must be shorter than shift duration',
133+
'Shift duration cannot exceed 24 hours': 'Shift duration cannot exceed 24 hours',
134+
'Break cannot be equal or longer than shift duration': 'Break cannot be equal or longer than shift duration',
135+
'Break cannot be negative': 'Break cannot be negative',
136+
'Stop time cannot be before start time': 'Stop time cannot be before start time',
137+
'Start and Stop cannot be the same': 'Start and Stop cannot be the same',
138+
'Stop time is required': 'Stop time is required',
139+
'Start time is required': 'Start time is required',
132140
};

eform-client/src/app/plugins/modules/time-planning-pn/i18n/esES.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,12 @@ export const esES = {
131131
Resigned: 'Resignado',
132132
'Resigned at date': 'Renunció en la fecha',
133133
'NettoHours override': 'Anulación de horas netas',
134+
'Break must be shorter than shift duration': 'El descanso debe ser más corto que la duración del turno',
135+
'Shift duration cannot exceed 24 hours': 'La duración del turno no puede exceder las 24 horas',
136+
'Break cannot be equal or longer than shift duration': 'El descanso no puede ser igual o más largo que la duración del turno',
137+
'Break cannot be negative': 'La ruptura no puede ser negativa',
138+
'Stop time cannot be before start time': 'La hora de parada no puede ser anterior a la hora de inicio',
139+
'Start and Stop cannot be the same': 'Inicio y parada no pueden ser lo mismo',
140+
'Stop time is required': 'Se requiere tiempo de parada',
141+
'Start time is required': 'Se requiere hora de inicio',
134142
};

eform-client/src/app/plugins/modules/time-planning-pn/i18n/etET.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,12 @@ export const etET = {
131131
Resigned: 'Astus tagasi',
132132
'Resigned at date': 'Astus tagasi kuupäeval',
133133
'NettoHours override': 'Neto tundide tühistamine',
134+
'Break must be shorter than shift duration': 'Paus peab olema lühem kui vahetuse kestus',
135+
'Shift duration cannot exceed 24 hours': 'Vahetuse kestus ei tohi ületada 24 tundi',
136+
'Break cannot be equal or longer than shift duration': 'Paus ei tohi olla võrdne ega pikem kui vahetuse kestus',
137+
'Break cannot be negative': 'Katkestus ei saa olla negatiivne',
138+
'Stop time cannot be before start time': 'Lõpp-aeg ei saa olla varasem kui algusaeg',
139+
'Start and Stop cannot be the same': 'Start ja Stop ei saa olla samad',
140+
'Stop time is required': 'Peatumisaeg on kohustuslik',
141+
'Start time is required': 'Algusaeg on kohustuslik',
134142
};

eform-client/src/app/plugins/modules/time-planning-pn/i18n/fiFI.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,12 @@ export const fiFI = {
131131
Resigned: 'Erosi',
132132
'Resigned at date': 'Erosi päivämääränä',
133133
'NettoHours override': 'Nettotuntien ohitus',
134+
'Break must be shorter than shift duration': 'Tauon on oltava lyhyempi kuin työvuoron kesto',
135+
'Shift duration cannot exceed 24 hours': 'Vuoron kesto ei saa ylittää 24 tuntia',
136+
'Break cannot be equal or longer than shift duration': 'Tauko ei voi olla yhtä pitkä tai pidempi kuin työvuoron kesto',
137+
'Break cannot be negative': 'Tauko ei voi olla negatiivinen',
138+
'Stop time cannot be before start time': 'Lopetusaika ei voi olla ennen aloitusaikaa',
139+
'Start and Stop cannot be the same': 'Aloitus ja lopetus eivät voi olla sama asia',
140+
'Stop time is required': 'Pysäytysaika vaaditaan',
141+
'Start time is required': 'Aloitusaika on pakollinen',
134142
};

0 commit comments

Comments
 (0)