i18n: Adding new languages: Part 1 (#1882)

Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
José Alberto Hernández
2023-10-22 20:18:05 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent c7fe21e74a
commit 408f004450
432 changed files with 38051 additions and 44613 deletions
+4 -18
View File
@@ -3,29 +3,15 @@ import { Injectable } from '@angular/core';
/** Translation Imports */
import { TranslateService } from '@ngx-translate/core';
/** Custom Services */
import { Logger } from '../logger/logger.service';
/** Initialize Logger */
const log = new Logger('I18nService');
/**
* Pass-through function to mark a string for translation extraction.
* Running `npm translations:extract` will include the given string by using this.
* @param {string} s The string to extract for translation.
* @return {string} The translated string.
*/
export function extract(s: string) {
return I18nService.translate(s);
}
import { Observable } from 'rxjs';
@Injectable()
export class I18nService {
constructor(private translateService: TranslateService) { }
public static translate(key: string): string {
return key;
public translate(key: string): Observable<string> {
return this.translateService.get(key);
}
}