- Set lthn-desktop as the default gui build target (port 9247) - Add core-demo GUI with Vite frontend (port 9245) - Configure core-gui on port 9246 to avoid conflicts - Update .gitignore for lthn-desktop and core-demo artifacts - Include lthn-desktop Angular frontend with Monaco editor and Claude panel - Add frontend.old directory preserving original lthn-desktop pages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
14 lines
527 B
TypeScript
14 lines
527 B
TypeScript
import { join } from 'path';
|
|
import { Observable, of } from 'rxjs';
|
|
import { TranslateLoader } from '@ngx-translate/core';
|
|
import * as fs from 'fs';
|
|
|
|
export class TranslateServerLoader implements TranslateLoader {
|
|
constructor(private prefix: string = 'i18n', private suffix: string = '.json') {}
|
|
|
|
public getTranslation(lang: string): Observable<any> {
|
|
const path = join(process.cwd(), 'i18n', this.prefix, `${lang}${this.suffix}`);
|
|
const data = JSON.parse(fs.readFileSync(path, 'utf8'));
|
|
return of(data);
|
|
}
|
|
}
|