feat: add english and hungarian translations

This commit is contained in:
2026-08-29 11:42:16 +02:00
parent ab32f01e07
commit 0c1a9f86d6
13 changed files with 285 additions and 64 deletions
+11 -3
View File
@@ -1,16 +1,24 @@
import { Pipe, PipeTransform } from '@angular/core';
import { inject, Pipe, PipeTransform } from '@angular/core';
import { Umpire } from 'db';
import { TranslationService } from './i18n/translation.service';
@Pipe({
name: 'fullname',
standalone: true
standalone: true,
pure: false
})
export class FullnamePipe implements PipeTransform {
readonly translationService = inject(TranslationService);
transform(value: Umpire | undefined, ...args: unknown[]): string {
if (typeof value === 'undefined') {
return '';
}
// TODO: in case of multilang, change here
if (this.translationService.language() === 'en') {
return value.firstName + ' ' + value.lastName;
}
return value.lastName + ' ' + value.firstName;
}
}