feat: add i18n translations for book components, services, and readers (en/es) (#2738)

This commit is contained in:
ACX
2026-02-13 16:20:02 -07:00
committed by GitHub
parent 3e44ee7d92
commit 5076522f35
108 changed files with 3406 additions and 1102 deletions
@@ -1,6 +1,7 @@
import {Injectable, inject} from '@angular/core';
import {AppSettingsService} from './app-settings.service';
import {MessageService} from 'primeng/api';
import {TranslocoService} from '@jsverse/transloco';
import {Observable} from 'rxjs';
@Injectable({
@@ -10,6 +11,7 @@ export class SettingsHelperService {
private readonly appSettingsService = inject(AppSettingsService);
private readonly messageService = inject(MessageService);
private readonly t = inject(TranslocoService);
saveSetting(key: string, value: unknown): Observable<void> {
const observable = this.appSettingsService.saveSettings([{key, newValue: value}]);
@@ -28,16 +30,16 @@ export class SettingsHelperService {
private showSuccessMessage(): void {
this.messageService.add({
severity: 'success',
summary: 'Settings Saved',
detail: 'The settings were successfully saved!'
summary: this.t.translate('shared.settingsHelper.settingsSavedSummary'),
detail: this.t.translate('shared.settingsHelper.settingsSavedDetail')
});
}
private showErrorMessage(): void {
this.messageService.add({
severity: 'error',
summary: 'Error',
detail: 'There was an error saving the settings.'
summary: this.t.translate('common.error'),
detail: this.t.translate('shared.settingsHelper.saveErrorDetail')
});
}