feat: add english and hungarian translations
This commit is contained in:
1 parent
ab32f01e07
commit
0c1a9f86d6
13 files changed
+285
-64
No files matched your search
@@ -1,33 +1,33 @@
|
||||
<ion-header [translucent]="true">
|
||||
<ion-toolbar>
|
||||
<ion-title> Pályák </ion-title>
|
||||
<ion-title> {{ 'courts' | translate }} </ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content [fullscreen]="true" cdkDropListGroup>
|
||||
<ion-header collapse="condense">
|
||||
<ion-toolbar>
|
||||
<ion-title size="large">Pályák</ion-title>
|
||||
<ion-title size="large">{{ 'courts' | translate }}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-grid [fixed]="'fixed'" class="bottom-lists">
|
||||
<ion-row>
|
||||
<ion-col [size]="1" class="ion-display-none ion-display-xl-block">
|
||||
<ion-item [lines]="'none'">Pálya</ion-item>
|
||||
<ion-item [lines]="'none'">{{ 'court' | translate }}</ion-item>
|
||||
</ion-col>
|
||||
<ion-col [size]="1" class="ion-display-xl-none">
|
||||
<ion-item [lines]="'none'">P</ion-item>
|
||||
<ion-item [lines]="'none'">{{ 'shortCourtName' | translate }}</ion-item>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-item [lines]="'none'">
|
||||
<ion-label class="ion-text-center"> Játékvezető </ion-label>
|
||||
<ion-label class="ion-text-center"> {{ 'umpire' | translate }} </ion-label>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
@if (serviceJudgeEnabled()) {
|
||||
<ion-col>
|
||||
<ion-item [lines]="'none'">
|
||||
<ion-label class="ion-text-center"> Adogatásbíró </ion-label>
|
||||
<ion-label class="ion-text-center"> {{ 'serviceJudge' | translate }} </ion-label>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
}
|
||||
@@ -119,19 +119,19 @@
|
||||
<ion-row>
|
||||
<ion-col [size]="!serviceJudgeEnabled() ? 6 : 4">
|
||||
<ion-item color="primary">
|
||||
<ion-label class="ion-text-center"> Játékvezetők </ion-label>
|
||||
<ion-label class="ion-text-center"> {{ 'umpires' | translate }} </ion-label>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
@if (serviceJudgeEnabled()) {
|
||||
<ion-col [size]="4">
|
||||
<ion-item color="primary">
|
||||
<ion-label class="ion-text-center"> Adogatásbírók </ion-label>
|
||||
<ion-label class="ion-text-center"> {{ 'serviceJudges' | translate }} </ion-label>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
}
|
||||
<ion-col [size]="!serviceJudgeEnabled() ? 6 : 4">
|
||||
<ion-item color="medium">
|
||||
<ion-label class="ion-text-center"> Pihenők </ion-label>
|
||||
<ion-label class="ion-text-center"> {{ 'notOnDuty' | translate }} </ion-label>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
+39
-11
@@ -32,6 +32,8 @@ import { CourtUmpireService } from '../services/court.umpire.service';
|
||||
import { CourtServiceJudgeService } from '../services/court.service.judge.service';
|
||||
import { addIcons } from 'ionicons';
|
||||
import { enterOutline, exitOutline } from 'ionicons/icons';
|
||||
import { TranslatePipe } from '../i18n/translation.pipe';
|
||||
import { TranslationService } from '../i18n/translation.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tab1',
|
||||
@@ -56,7 +58,8 @@ import { enterOutline, exitOutline } from 'ionicons/icons';
|
||||
CdkDrag,
|
||||
CommonModule,
|
||||
CdkDragPlaceholder,
|
||||
CdkDropListGroup
|
||||
CdkDropListGroup,
|
||||
TranslatePipe
|
||||
]
|
||||
})
|
||||
export class Tab1Page {
|
||||
@@ -70,6 +73,7 @@ export class Tab1Page {
|
||||
readonly waitingServiceJudgeService = inject(WaitingServiceJudgesService);
|
||||
readonly courtUmpireService = inject(CourtUmpireService);
|
||||
readonly courtServiceJudgeService = inject(CourtServiceJudgeService);
|
||||
readonly translationService = inject(TranslationService);
|
||||
|
||||
private alertController = inject(AlertController);
|
||||
private fullnamePipe = inject(FullnamePipe);
|
||||
@@ -398,17 +402,27 @@ export class Tab1Page {
|
||||
}
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: `Pálya ${courtNo}`,
|
||||
subHeader: `Biztos leveszed ${serviceJudge ? 'őket' : 'őt'} a pályáról?`,
|
||||
header: this.translationService.translate('courtConfirm', {
|
||||
courtNo
|
||||
}),
|
||||
|
||||
subHeader: this.translationService.translate(
|
||||
serviceJudge ? 'removeUmpiresFromCourt' : 'removeUmpireFromCourt'
|
||||
),
|
||||
|
||||
cssClass: 'wide',
|
||||
message: `${this.fullnamePipe.transform(umpire)} ${serviceJudge ? '- ' : ''} ${this.fullnamePipe.transform(serviceJudge)}`,
|
||||
|
||||
message: `${this.fullnamePipe.transform(umpire)}${
|
||||
serviceJudge ? ' - ' : ''
|
||||
}${this.fullnamePipe.transform(serviceJudge)}`,
|
||||
|
||||
buttons: [
|
||||
{
|
||||
text: 'Nem',
|
||||
text: this.translationService.translate('no'),
|
||||
role: 'cancel'
|
||||
},
|
||||
{
|
||||
text: 'Igen',
|
||||
text: this.translationService.translate('yes'),
|
||||
role: 'confirm',
|
||||
handler: () => {
|
||||
if (this.serviceJudgeEnabled()) {
|
||||
@@ -478,17 +492,31 @@ export class Tab1Page {
|
||||
}
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: `Pálya ${courtNo}`,
|
||||
header: this.translationService.translate('court', {
|
||||
courtNo
|
||||
}),
|
||||
|
||||
cssClass: 'wide',
|
||||
subHeader: `Biztos pályára küldöd ${serviceJudge ? 'őket' : 'őt'}?`,
|
||||
message: `${this.fullnamePipe.transform(umpire)} ${serviceJudge ? ' - ' : ''} ${this.fullnamePipe.transform(serviceJudge)}`,
|
||||
|
||||
subHeader: this.translationService.translate(
|
||||
serviceJudge ? 'sendUmpiresToCourt' : 'sendUmpireToCourt'
|
||||
),
|
||||
|
||||
message: this.translationService.translate(
|
||||
serviceJudge ? 'sendUmpiresMessage' : 'sendUmpireMessage',
|
||||
{
|
||||
umpire: this.fullnamePipe.transform(umpire),
|
||||
serviceJudge: this.fullnamePipe.transform(serviceJudge)
|
||||
}
|
||||
),
|
||||
|
||||
buttons: [
|
||||
{
|
||||
text: 'Nem',
|
||||
text: this.translationService.translate('no'),
|
||||
role: 'cancel'
|
||||
},
|
||||
{
|
||||
text: 'Igen',
|
||||
text: this.translationService.translate('yes'),
|
||||
role: 'confirm',
|
||||
handler: () => {
|
||||
if (this.serviceJudgeEnabled() && serviceJudge) {
|
||||
|
||||
Reference in new issue
Block a user