* Implemented the ability to login to the app by passing apiKey to the login. This is for an upcoming feature (but currently blocked by another story) * Added a comment * Ensure locales are sorted * Added a new status badge that shows how many active installs we have via users that use stats. * Bump all GA to latest versions * Bumped dependencies * Bumped backend notifications * Updated ngx-pdf-reader to upcoming beta which fixes some PDFs taking time to load. PDF reader will use browser locale to load localization rather than Kavita locale for now. * Downgraded pdf viewer as beta has lots of bugs.
14 lines
462 B
TypeScript
14 lines
462 B
TypeScript
import {Injectable} from "@angular/core";
|
|
import {HttpClient} from "@angular/common/http";
|
|
import {Translation, TranslocoLoader} from "@ngneat/transloco";
|
|
|
|
|
|
@Injectable({ providedIn: 'root' })
|
|
export class HttpLoader implements TranslocoLoader {
|
|
constructor(private http: HttpClient) {}
|
|
|
|
getTranslation(langPath: string) {
|
|
const tokens = langPath.split('/');
|
|
return this.http.get<Translation>(`assets/langs/${tokens[tokens.length - 1]}.json`);
|
|
}
|
|
}
|