@taon-dev/i18n 21.0.47 → 21.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERIFIED-BUILD-DATA.jsonc +3 -3
- package/browser/fesm2022/i18n-browser.mjs +1 -1
- package/browser/fesm2022/i18n-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/i18n-browser.d.ts +1 -1
- package/browser-prod/fesm2022/i18n-browser-prod.mjs +1 -1
- package/browser-prod/fesm2022/i18n-browser-prod.mjs.map +1 -1
- package/browser-prod/package.json +1 -1
- package/browser-prod/types/i18n-browser-prod.d.ts +1 -1
- package/full-dts/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/package.json +1 -1
- package/lib-esm/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib-esm/lib/build-info._auto-generated_.js +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +1 -1
- package/lib-prod/build-info._auto-generated_.js +1 -1
- package/lib-prod/package.json +1 -1
- package/package.json +1 -1
- package/ts-source/browser-code/build-info._auto-generated_.ts +13 -0
- package/ts-source/browser-code/i18n/lib.translation.ts +12 -0
- package/ts-source/browser-code/i18n/translation.ts.en-US.i18n.data.ts +33 -0
- package/ts-source/browser-code/i18n/translation.ts.en-US.po +17 -0
- package/ts-source/browser-code/i18n/translation.ts.pl-PL.i18n.data.ts +33 -0
- package/ts-source/browser-code/i18n/translation.ts.pl-PL.po +17 -0
- package/ts-source/browser-code/index._auto-generated_.ts +20 -0
- package/ts-source/browser-code/index.scss +7 -0
- package/ts-source/browser-code/index.ts +10 -0
- package/ts-source/browser-code/lib-info.md +8 -0
- package/ts-source/browser-code/local-translation.ts +126 -0
- package/ts-source/browser-code/migrations/migrations-info.md +6 -0
- package/ts-source/browser-code/start-cli.ts +12 -0
- package/ts-source/browser-code/translate.directive.ts +59 -0
- package/ts-source/browser-code/translate.pipe.ts +32 -0
- package/ts-source/browser-code/translate.service.ts +20 -0
- package/ts-source/browser-code/translation-manager.ts +101 -0
- package/ts-source/browser-code/translation.models.ts +27 -0
- package/ts-source/browser-code/translation.ts +179 -0
- package/ts-source/browser-code/utils-i18n-extract-gettext-translate-from-html.ts +87 -0
- package/ts-source/browser-code/utils-i18n-html.ts +79 -0
- package/ts-source/browser-code/utils-po-file.ts +70 -0
- package/ts-source/browser-code-prod/build-info._auto-generated_.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/build-info._auto-generated_.ts +13 -0
- package/ts-source/browser-code-prod/i18n/lib.translation.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/i18n/lib.translation.ts +12 -0
- package/ts-source/browser-code-prod/i18n/translation.ts.en-US.i18n.data.ts +33 -0
- package/ts-source/browser-code-prod/i18n/translation.ts.en-US.po +17 -0
- package/ts-source/browser-code-prod/i18n/translation.ts.pl-PL.i18n.data.ts +33 -0
- package/ts-source/browser-code-prod/i18n/translation.ts.pl-PL.po +17 -0
- package/ts-source/browser-code-prod/index._auto-generated_.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/index._auto-generated_.ts +20 -0
- package/ts-source/browser-code-prod/index.scss +7 -0
- package/ts-source/browser-code-prod/index.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/index.ts +10 -0
- package/ts-source/browser-code-prod/lib-info.md +8 -0
- package/ts-source/browser-code-prod/local-translation.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/local-translation.ts +126 -0
- package/ts-source/browser-code-prod/migrations/migrations-info.md +6 -0
- package/ts-source/browser-code-prod/start-cli.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/start-cli.ts +12 -0
- package/ts-source/browser-code-prod/translate.directive.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/translate.directive.ts +59 -0
- package/ts-source/browser-code-prod/translate.pipe.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/translate.pipe.ts +32 -0
- package/ts-source/browser-code-prod/translate.service.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/translate.service.ts +20 -0
- package/ts-source/browser-code-prod/translation-manager.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/translation-manager.ts +101 -0
- package/ts-source/browser-code-prod/translation.models.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/translation.models.ts +27 -0
- package/ts-source/browser-code-prod/translation.split-namespaces.json +4 -0
- package/ts-source/browser-code-prod/translation.ts +179 -0
- package/ts-source/browser-code-prod/utils-i18n-extract-gettext-translate-from-html.split-namespaces.json +10 -0
- package/ts-source/browser-code-prod/utils-i18n-extract-gettext-translate-from-html.ts +85 -0
- package/ts-source/browser-code-prod/utils-i18n-html.split-namespaces.json +16 -0
- package/ts-source/browser-code-prod/utils-i18n-html.ts +77 -0
- package/ts-source/browser-code-prod/utils-po-file.split-namespaces.json +18 -0
- package/ts-source/browser-code-prod/utils-po-file.ts +68 -0
- package/ts-source/websql-code/build-info._auto-generated_.ts +13 -0
- package/ts-source/websql-code/i18n/lib.translation.ts +12 -0
- package/ts-source/websql-code/i18n/translation.ts.en-US.i18n.data.ts +33 -0
- package/ts-source/websql-code/i18n/translation.ts.en-US.po +17 -0
- package/ts-source/websql-code/i18n/translation.ts.pl-PL.i18n.data.ts +33 -0
- package/ts-source/websql-code/i18n/translation.ts.pl-PL.po +17 -0
- package/ts-source/websql-code/index._auto-generated_.ts +20 -0
- package/ts-source/websql-code/index.scss +7 -0
- package/ts-source/websql-code/index.ts +10 -0
- package/ts-source/websql-code/lib-info.md +8 -0
- package/ts-source/websql-code/local-translation.ts +126 -0
- package/ts-source/websql-code/migrations/migrations-info.md +6 -0
- package/ts-source/websql-code/start-cli.ts +12 -0
- package/ts-source/websql-code/translate.directive.ts +59 -0
- package/ts-source/websql-code/translate.pipe.ts +32 -0
- package/ts-source/websql-code/translate.service.ts +20 -0
- package/ts-source/websql-code/translation-manager.ts +101 -0
- package/ts-source/websql-code/translation.models.ts +27 -0
- package/ts-source/websql-code/translation.ts +179 -0
- package/ts-source/websql-code/utils-i18n-extract-gettext-translate-from-html.ts +87 -0
- package/ts-source/websql-code/utils-i18n-html.ts +79 -0
- package/ts-source/websql-code/utils-po-file.ts +70 -0
- package/ts-source/websql-code-prod/build-info._auto-generated_.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/build-info._auto-generated_.ts +13 -0
- package/ts-source/websql-code-prod/i18n/lib.translation.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/i18n/lib.translation.ts +12 -0
- package/ts-source/websql-code-prod/i18n/translation.ts.en-US.i18n.data.ts +33 -0
- package/ts-source/websql-code-prod/i18n/translation.ts.en-US.po +17 -0
- package/ts-source/websql-code-prod/i18n/translation.ts.pl-PL.i18n.data.ts +33 -0
- package/ts-source/websql-code-prod/i18n/translation.ts.pl-PL.po +17 -0
- package/ts-source/websql-code-prod/index._auto-generated_.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/index._auto-generated_.ts +20 -0
- package/ts-source/websql-code-prod/index.scss +7 -0
- package/ts-source/websql-code-prod/index.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/index.ts +10 -0
- package/ts-source/websql-code-prod/lib-info.md +8 -0
- package/ts-source/websql-code-prod/local-translation.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/local-translation.ts +126 -0
- package/ts-source/websql-code-prod/migrations/migrations-info.md +6 -0
- package/ts-source/websql-code-prod/start-cli.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/start-cli.ts +12 -0
- package/ts-source/websql-code-prod/translate.directive.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/translate.directive.ts +59 -0
- package/ts-source/websql-code-prod/translate.pipe.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/translate.pipe.ts +32 -0
- package/ts-source/websql-code-prod/translate.service.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/translate.service.ts +20 -0
- package/ts-source/websql-code-prod/translation-manager.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/translation-manager.ts +101 -0
- package/ts-source/websql-code-prod/translation.models.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/translation.models.ts +27 -0
- package/ts-source/websql-code-prod/translation.split-namespaces.json +4 -0
- package/ts-source/websql-code-prod/translation.ts +179 -0
- package/ts-source/websql-code-prod/utils-i18n-extract-gettext-translate-from-html.split-namespaces.json +10 -0
- package/ts-source/websql-code-prod/utils-i18n-extract-gettext-translate-from-html.ts +85 -0
- package/ts-source/websql-code-prod/utils-i18n-html.split-namespaces.json +16 -0
- package/ts-source/websql-code-prod/utils-i18n-html.ts +77 -0
- package/ts-source/websql-code-prod/utils-po-file.split-namespaces.json +18 -0
- package/ts-source/websql-code-prod/utils-po-file.ts +68 -0
- package/websql/fesm2022/i18n-websql.mjs +1 -1
- package/websql/fesm2022/i18n-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/i18n-websql.d.ts +1 -1
- package/websql-prod/fesm2022/i18n-websql-prod.mjs +1 -1
- package/websql-prod/fesm2022/i18n-websql-prod.mjs.map +1 -1
- package/websql-prod/package.json +1 -1
- package/websql-prod/types/i18n-websql-prod.d.ts +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import { ChangeDetectorRef, inject, OnDestroy, Pipe, PipeTransform, } from '@angular/core';
|
|
9
|
+
import { Subscription } from 'rxjs';
|
|
10
|
+
import { Translation } from './translation';
|
|
11
|
+
import { TranslationManager } from './translation-manager';
|
|
12
|
+
@Pipe({
|
|
13
|
+
name: 'translate',
|
|
14
|
+
standalone: true,
|
|
15
|
+
pure: false,
|
|
16
|
+
})
|
|
17
|
+
export class TranslatePipe implements PipeTransform, OnDestroy {
|
|
18
|
+
private readonly cdr = inject(ChangeDetectorRef);
|
|
19
|
+
private tranlsationManager = TranslationManager.Instance;
|
|
20
|
+
private readonly sub: Subscription;
|
|
21
|
+
constructor() {
|
|
22
|
+
this.sub = this.tranlsationManager.isLoadingLangs$.subscribe(() => {
|
|
23
|
+
this.cdr.markForCheck();
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
transform(text: string, t: Translation, params?: Record<string, unknown>, context?: string): string {
|
|
27
|
+
return t?.gettext(text, params, context) ?? text;
|
|
28
|
+
}
|
|
29
|
+
ngOnDestroy(): void {
|
|
30
|
+
this.sub.unsubscribe();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import { Injectable } from '@angular/core';
|
|
9
|
+
import { UtilsI18n } from 'tnp-core/websql';
|
|
10
|
+
import { TranslationManager } from './translation-manager';
|
|
11
|
+
@Injectable({ providedIn: 'root' })
|
|
12
|
+
export class TranslateService {
|
|
13
|
+
public manager = TranslationManager.Instance;
|
|
14
|
+
public setOneLanguagePernament(lang: UtilsI18n.CommonLocaleCode): void {
|
|
15
|
+
this.manager.setOneLanguagePernament(lang);
|
|
16
|
+
}
|
|
17
|
+
async changeGlobalLang(lang: UtilsI18n.CommonLocaleCode): Promise<void> {
|
|
18
|
+
await this.manager.changeGlobalLang(lang);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import { BehaviorSubject, filter, map, tap } from 'rxjs';
|
|
9
|
+
import { GlobalStorage, UtilsI18n, _ } from 'tnp-core/websql';
|
|
10
|
+
import type { Translation } from './translation';
|
|
11
|
+
const globalStorageKeyMainLanguage = 'taon-gettext-main-language';
|
|
12
|
+
const globalTaonLanguageLocalKeyLocalStor = 'taon-language-local';
|
|
13
|
+
const TranslationManagerGlobalStorKey = 'TranslationManagerGlobalStorKey';
|
|
14
|
+
export class TranslationManager {
|
|
15
|
+
static globalDefautlLanguageOverride: UtilsI18n.CommonLocaleCode;
|
|
16
|
+
public get instances(): Set<Translation> {
|
|
17
|
+
let set = GlobalStorage.get(TranslationManagerGlobalStorKey) as Set<Translation>;
|
|
18
|
+
if (_.isNil(set)) {
|
|
19
|
+
GlobalStorage.set(TranslationManagerGlobalStorKey, new Set<Translation>());
|
|
20
|
+
}
|
|
21
|
+
set = GlobalStorage.get(TranslationManagerGlobalStorKey) as Set<Translation>;
|
|
22
|
+
return set;
|
|
23
|
+
}
|
|
24
|
+
constructor() {
|
|
25
|
+
}
|
|
26
|
+
private defaultLangLocale: UtilsI18n.CommonLocaleCode = (() => {
|
|
27
|
+
return ((localStorage.getItem(globalTaonLanguageLocalKeyLocalStor) as UtilsI18n.CommonLocaleCode) ||
|
|
28
|
+
TranslationManager.globalDefautlLanguageOverride ||
|
|
29
|
+
(UtilsI18n.detectLocale() as UtilsI18n.CommonLocaleCode));
|
|
30
|
+
return UtilsI18n.defaultLangLocale;
|
|
31
|
+
})();
|
|
32
|
+
private _currentGlobalLanguage = this
|
|
33
|
+
.defaultLangLocale as UtilsI18n.CommonLocaleCode;
|
|
34
|
+
public get currentGlobalLanguage(): UtilsI18n.CommonLocaleCode {
|
|
35
|
+
return this._currentGlobalLanguage;
|
|
36
|
+
}
|
|
37
|
+
public set currentGlobalLanguage(v: UtilsI18n.CommonLocaleCode) {
|
|
38
|
+
this._currentGlobalLanguage = v;
|
|
39
|
+
this.currentGlobalLanguageSrc.next(v);
|
|
40
|
+
}
|
|
41
|
+
private currentGlobalLanguageSrc = new BehaviorSubject(this.currentGlobalLanguage);
|
|
42
|
+
public readonly currentGlobalLanguage$ = this.currentGlobalLanguageSrc
|
|
43
|
+
.asObservable()
|
|
44
|
+
.pipe(tap(currentGlobalLanguage => {
|
|
45
|
+
GlobalStorage.set<UtilsI18n.CommonLocaleCode>(globalStorageKeyMainLanguage, currentGlobalLanguage);
|
|
46
|
+
}));
|
|
47
|
+
public availableLangs = _.cloneDeep(UtilsI18n.LangOptionArr);
|
|
48
|
+
private availableLangsSrc = new BehaviorSubject(this.availableLangs);
|
|
49
|
+
public readonly availableLangs$ = this.availableLangsSrc.asObservable().pipe(map(f => {
|
|
50
|
+
if (this.visibleLanguages.length > 0) {
|
|
51
|
+
return f.filter(a => this.visibleLanguages.includes(a.code));
|
|
52
|
+
}
|
|
53
|
+
return f;
|
|
54
|
+
}));
|
|
55
|
+
public _visibleLanguages: UtilsI18n.CommonLocaleCode[] = [];
|
|
56
|
+
public get visibleLanguages(): UtilsI18n.CommonLocaleCode[] {
|
|
57
|
+
return this._visibleLanguages;
|
|
58
|
+
}
|
|
59
|
+
public set visibleLanguages(v: UtilsI18n.CommonLocaleCode[]) {
|
|
60
|
+
if (this.pernamentLanguage) {
|
|
61
|
+
v = v.filter(a => [this.pernamentLanguage].includes(a));
|
|
62
|
+
}
|
|
63
|
+
this._visibleLanguages = v;
|
|
64
|
+
this.visibleLanguagesSrc.next(v);
|
|
65
|
+
this.availableLangsSrc.next(this.availableLangs);
|
|
66
|
+
}
|
|
67
|
+
private visibleLanguagesSrc = new BehaviorSubject(this.visibleLanguages);
|
|
68
|
+
public readonly visibleLanguages$ = this.visibleLanguagesSrc.asObservable();
|
|
69
|
+
private loadingLangsSubjectSrc = new BehaviorSubject(false);
|
|
70
|
+
public readonly isLoadingLangs$ = this.loadingLangsSubjectSrc.asObservable();
|
|
71
|
+
private static _instance: TranslationManager;
|
|
72
|
+
static get Instance(): TranslationManager {
|
|
73
|
+
if (!this._instance) {
|
|
74
|
+
this._instance = new TranslationManager();
|
|
75
|
+
}
|
|
76
|
+
return this._instance;
|
|
77
|
+
}
|
|
78
|
+
public readonly pernamentLanguage: UtilsI18n.CommonLocaleCode | null = null;
|
|
79
|
+
public setOneLanguagePernament(lang: UtilsI18n.CommonLocaleCode): void {
|
|
80
|
+
console.info(`Setting pernament language to ${lang}`);
|
|
81
|
+
if (this.pernamentLanguage) {
|
|
82
|
+
console.log('You are trying to set again pernament language');
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.visibleLanguages = [lang];
|
|
86
|
+
this.pernamentLanguage = lang;
|
|
87
|
+
void this.changeGlobalLang(lang);
|
|
88
|
+
}
|
|
89
|
+
async changeGlobalLang(lang: UtilsI18n.CommonLocaleCode): Promise<void> {
|
|
90
|
+
this.loadingLangsSubjectSrc.next(true);
|
|
91
|
+
this.currentGlobalLanguage = lang;
|
|
92
|
+
localStorage.setItem(globalTaonLanguageLocalKeyLocalStor, lang);
|
|
93
|
+
try {
|
|
94
|
+
await Promise.all([...this.instances].map(c => c.useGlobalFileLang()));
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
console.error(error);
|
|
98
|
+
}
|
|
99
|
+
this.loadingLangsSubjectSrc.next(false);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import { UtilsI18n } from 'tnp-core/websql';
|
|
9
|
+
import type { Translation } from './translation';
|
|
10
|
+
export type TranslationLookup = Record<string, string>;
|
|
11
|
+
export type TranslationParams = Record<string, unknown> | null;
|
|
12
|
+
type FileRelativeLocation = string;
|
|
13
|
+
export type TaonTranslationsMapImport = Record<FileRelativeLocation, {
|
|
14
|
+
[lang in UtilsI18n.CommonLocaleCode]?: () => Promise<UtilsI18n.GettextFile>;
|
|
15
|
+
}>;
|
|
16
|
+
export type TaonTranslationsMap = Record<FileRelativeLocation, {
|
|
17
|
+
[lang in UtilsI18n.CommonLocaleCode]?: UtilsI18n.GettextFile;
|
|
18
|
+
}>;
|
|
19
|
+
export interface TranslationBinding {
|
|
20
|
+
text: string;
|
|
21
|
+
params?: TranslationParams;
|
|
22
|
+
context?: string;
|
|
23
|
+
update(value: string): void;
|
|
24
|
+
}
|
|
25
|
+
export interface Translatable {
|
|
26
|
+
t: Translation;
|
|
27
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import { ChangeDetectorRef, inject, signal, WritableSignal, } from '@angular/core';
|
|
9
|
+
import type { WritableSignal as WritableSignalType, } from '@angular/core';
|
|
10
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
11
|
+
import { GlobalStorage, UtilsI18n, _ } from 'tnp-core/websql';
|
|
12
|
+
import { TranslationManager } from './translation-manager';
|
|
13
|
+
import { TaonTranslationsMapImport, TranslationBinding, TranslationLookup, TranslationParams, } from './translation.models';
|
|
14
|
+
import type { UtilsPoFile } from './utils-po-file';
|
|
15
|
+
export class Translation {
|
|
16
|
+
static manager = TranslationManager.Instance;
|
|
17
|
+
static for(fileRelativePath: string, langImportMap: TaonTranslationsMapImport, opt?: {
|
|
18
|
+
debug?: boolean;
|
|
19
|
+
}): Translation {
|
|
20
|
+
opt = opt || {};
|
|
21
|
+
return new Translation(fileRelativePath, Translation.manager.currentGlobalLanguage, langImportMap, !!opt.debug);
|
|
22
|
+
}
|
|
23
|
+
public cdr?: ChangeDetectorRef;
|
|
24
|
+
private lookup: TranslationLookup = {};
|
|
25
|
+
private readonly loadingSubjectSrc = new BehaviorSubject(false);
|
|
26
|
+
public readonly isLoadingLang$ = this.loadingSubjectSrc.asObservable();
|
|
27
|
+
private loading?: Promise<void>;
|
|
28
|
+
private loadedLang?: UtilsI18n.CommonLocaleCode;
|
|
29
|
+
private readonly bindings = new Set<TranslationBinding>();
|
|
30
|
+
private useGlobalLangFile = true;
|
|
31
|
+
private constructor(protected fileRelativePath: string, protected localFileLang: UtilsI18n.CommonLocaleCode, protected langImportMap: TaonTranslationsMapImport, public debug = false) {
|
|
32
|
+
if (!Translation.manager.instances.has(this)) {
|
|
33
|
+
Translation.manager.instances.add(this);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
for(_classThis: object): Translation {
|
|
39
|
+
if (this.useGlobalLangFile) {
|
|
40
|
+
this.localFileLang = Translation.manager.currentGlobalLanguage;
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
}
|
|
47
|
+
void this.ensureLoaded();
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
async changeFileLang(lang: UtilsI18n.CommonLocaleCode): Promise<void> {
|
|
51
|
+
this.useGlobalLangFile = false;
|
|
52
|
+
this.localFileLang = lang;
|
|
53
|
+
await this.ensureLoaded(true);
|
|
54
|
+
this.cdr?.markForCheck();
|
|
55
|
+
}
|
|
56
|
+
async useGlobalFileLang(): Promise<void> {
|
|
57
|
+
this.useGlobalLangFile = true;
|
|
58
|
+
await this.ensureLoaded(true);
|
|
59
|
+
this.cdr?.markForCheck();
|
|
60
|
+
}
|
|
61
|
+
gettext = (text: string, params?: TranslationParams, context = ''): string => {
|
|
62
|
+
const key = this.key(text, context);
|
|
63
|
+
const translated = this.lookup[key] ?? text;
|
|
64
|
+
this.debug &&
|
|
65
|
+
console.log(`Translate (with load): "${text}" to "${translated}", key="${key}" params:${_.isObject(params) ? JSON.stringify(params) : params} ` +
|
|
66
|
+
`localFileLang: ${this.localFileLang}`, this);
|
|
67
|
+
return this.interpolate(translated, params);
|
|
68
|
+
};
|
|
69
|
+
private createSignal(text: string, params?: TranslationParams, context = ''): WritableSignalType<string> {
|
|
70
|
+
const s = signal<string>(this.gettext(text, params, context));
|
|
71
|
+
this.bindings.add({
|
|
72
|
+
text,
|
|
73
|
+
params,
|
|
74
|
+
context,
|
|
75
|
+
update: value => s.set(value),
|
|
76
|
+
});
|
|
77
|
+
return s;
|
|
78
|
+
return void 0;
|
|
79
|
+
}
|
|
80
|
+
readonly signal = {
|
|
81
|
+
gettext: (text: string, params?: TranslationParams, context?: string) => this.createSignal(text, params, context),
|
|
82
|
+
};
|
|
83
|
+
private createObservable(text: string, params?: TranslationParams, context = ''): Observable<string> {
|
|
84
|
+
const subject = new BehaviorSubject<string>(this.gettext(text, params, context));
|
|
85
|
+
this.bindings.add({
|
|
86
|
+
text,
|
|
87
|
+
params,
|
|
88
|
+
context,
|
|
89
|
+
update: value => subject.next(value),
|
|
90
|
+
});
|
|
91
|
+
return subject.asObservable();
|
|
92
|
+
}
|
|
93
|
+
readonly $ = {
|
|
94
|
+
gettext: (text: string, params?: TranslationParams, context?: string) => this.createObservable(text, params, context),
|
|
95
|
+
};
|
|
96
|
+
private refreshBindings(): void {
|
|
97
|
+
for (const binding of this.bindings) {
|
|
98
|
+
binding.update(this.gettextWithoutEnsureLoaded(binding.text, binding.params, binding.context ?? ''));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
translate(text: string, params?: TranslationParams, context = ''): string {
|
|
102
|
+
return this.gettextWithoutEnsureLoaded(text, params, context);
|
|
103
|
+
}
|
|
104
|
+
private gettextWithoutEnsureLoaded(text: string, params?: TranslationParams, context = ''): string {
|
|
105
|
+
const key = this.key(text, context);
|
|
106
|
+
const translated = this.lookup[key] ?? text;
|
|
107
|
+
this.debug &&
|
|
108
|
+
console.log(`Translate (no load): "${text}" to "${translated}", key="${key}" params:${_.isObject(params) ? JSON.stringify(params) : params} ` +
|
|
109
|
+
`localFileLang: ${this.localFileLang}`, this);
|
|
110
|
+
return this.interpolate(translated, params);
|
|
111
|
+
}
|
|
112
|
+
private async load(): Promise<void> {
|
|
113
|
+
this.loadingSubjectSrc.next(true);
|
|
114
|
+
const files: UtilsI18n.GettextFile[] = [];
|
|
115
|
+
const filesForTArr = Object.keys(this.langImportMap);
|
|
116
|
+
for (const fileRelativePath of filesForTArr) {
|
|
117
|
+
try {
|
|
118
|
+
const loader = this.langImportMap[fileRelativePath]?.[this.localFileLang];
|
|
119
|
+
if (!loader) {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
const modOrFile = await loader();
|
|
123
|
+
const file = (modOrFile as any).default ?? modOrFile;
|
|
124
|
+
files.push(file);
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
console.log(`[taon-i18n] Error loading language file ${fileRelativePath} `, err);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
this.loadedLang = this.localFileLang;
|
|
131
|
+
this.lookup = this.createLookup(files);
|
|
132
|
+
this.debug && console.log(`${this.localFileLang}`, files, this.lookup);
|
|
133
|
+
this.refreshBindings();
|
|
134
|
+
this.cdr?.markForCheck();
|
|
135
|
+
this.loadingSubjectSrc.next(false);
|
|
136
|
+
}
|
|
137
|
+
private async ensureLoaded(force = false): Promise<void> {
|
|
138
|
+
if (this.useGlobalLangFile) {
|
|
139
|
+
this.localFileLang = Translation.manager.currentGlobalLanguage;
|
|
140
|
+
}
|
|
141
|
+
if (!force && this.loadedLang === this.localFileLang) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (!force && this.loading) {
|
|
145
|
+
return this.loading;
|
|
146
|
+
}
|
|
147
|
+
this.loading = this.load();
|
|
148
|
+
try {
|
|
149
|
+
await this.loading;
|
|
150
|
+
}
|
|
151
|
+
finally {
|
|
152
|
+
this.loading = undefined;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
private createLookup(files: UtilsI18n.GettextFile[]): TranslationLookup {
|
|
156
|
+
const lookup: TranslationLookup = {};
|
|
157
|
+
for (const file of files) {
|
|
158
|
+
for (const tag of file.tags ?? []) {
|
|
159
|
+
if (!tag.translation)
|
|
160
|
+
continue;
|
|
161
|
+
lookup[this.key(tag.gettextString, tag.context ?? '')] =
|
|
162
|
+
tag.translation;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return lookup;
|
|
166
|
+
}
|
|
167
|
+
private key(text: string, context = ''): string {
|
|
168
|
+
return `${context}\u0004${text}`;
|
|
169
|
+
}
|
|
170
|
+
private interpolate(text: string, params?: Record<string, unknown>): string {
|
|
171
|
+
if (!params)
|
|
172
|
+
return text;
|
|
173
|
+
const result = text.replace(/\[\[\s*([a-zA-Z0-9_$]+)\s*\]\]/g, (_, key) => {
|
|
174
|
+
const value = params[key];
|
|
175
|
+
return value === undefined || value === null ? '' : String(value);
|
|
176
|
+
});
|
|
177
|
+
return result;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import { AST, Binary, BindingPipe, Conditional, Interpolation, LiteralPrimitive, parseTemplate, TmplAstBoundAttribute, TmplAstBoundText, TmplAstElement, TmplAstNode, TmplAstTemplate, TmplAstText, } from '@angular/compiler/cjs';
|
|
9
|
+
import { UtilsI18n } from 'tnp-core/websql';
|
|
10
|
+
export namespace UtilsI18nExtractGettextTranslateFromHtml {
|
|
11
|
+
export function extractGettextTranslateFromHtml(html: string, fileName = 'template.html'): UtilsI18n.GettextExtracted[] {
|
|
12
|
+
return (void 0);
|
|
13
|
+
return void 0 as any;
|
|
14
|
+
}
|
|
15
|
+
function extractGettextCallsFromSource(html: string): UtilsI18n.GettextExtracted[] {
|
|
16
|
+
return (void 0);
|
|
17
|
+
}
|
|
18
|
+
function extractGettextCallsFromHtmlExpression(source: string): Array<{
|
|
19
|
+
gettextString: string;
|
|
20
|
+
context?: string;
|
|
21
|
+
}> {
|
|
22
|
+
return (void 0);
|
|
23
|
+
}
|
|
24
|
+
function readBalancedParenthesesContent(source: string, openParenIndex: number): string | null {
|
|
25
|
+
return (void 0);
|
|
26
|
+
}
|
|
27
|
+
function readStaticStringArg(arg: string | undefined): string | undefined {
|
|
28
|
+
return (void 0);
|
|
29
|
+
}
|
|
30
|
+
function extractTranslateParamsFromSource(source: string): Record<string, string> | null {
|
|
31
|
+
return (void 0);
|
|
32
|
+
}
|
|
33
|
+
function extractObjectLiteralParams(raw: string): Record<string, string> | null {
|
|
34
|
+
return (void 0);
|
|
35
|
+
}
|
|
36
|
+
function splitTopLevel(input: string, separator: string): string[] {
|
|
37
|
+
return (void 0);
|
|
38
|
+
}
|
|
39
|
+
function extractTranslatePipeStringsFromSource(source: string): string[] {
|
|
40
|
+
return (void 0);
|
|
41
|
+
}
|
|
42
|
+
function extractStringLiterals(source: string): string[] {
|
|
43
|
+
return (void 0);
|
|
44
|
+
}
|
|
45
|
+
function getNodeAttributes(node: any): any[] {
|
|
46
|
+
return (void 0);
|
|
47
|
+
}
|
|
48
|
+
function getNodeInputs(node: any): TmplAstBoundAttribute[] {
|
|
49
|
+
return (void 0);
|
|
50
|
+
}
|
|
51
|
+
function isText(node: any): boolean {
|
|
52
|
+
return (void 0);
|
|
53
|
+
}
|
|
54
|
+
function isBoundText(node: any): boolean {
|
|
55
|
+
return (void 0);
|
|
56
|
+
}
|
|
57
|
+
function collectText(nodes: any[]): string {
|
|
58
|
+
return (void 0);
|
|
59
|
+
}
|
|
60
|
+
function extractTranslateDirectiveFromSource(html: string): UtilsI18n.GettextExtracted[] {
|
|
61
|
+
return (void 0);
|
|
62
|
+
}
|
|
63
|
+
function stripHtml(html: string): string {
|
|
64
|
+
return (void 0);
|
|
65
|
+
}
|
|
66
|
+
function extractTranslateParams(inputs: TmplAstBoundAttribute[]): Record<string, string> | null {
|
|
67
|
+
return (void 0);
|
|
68
|
+
}
|
|
69
|
+
function extractObjectLiteralFromAst(ast: any): Record<string, string> | null {
|
|
70
|
+
return (void 0);
|
|
71
|
+
}
|
|
72
|
+
function extractTranslatePipeStrings(ast: AST | any): string[] {
|
|
73
|
+
return (void 0);
|
|
74
|
+
}
|
|
75
|
+
function extractStaticStringsFromExpression(ast: any): string[] {
|
|
76
|
+
return (void 0);
|
|
77
|
+
}
|
|
78
|
+
function astToSource(ast: any): string {
|
|
79
|
+
return (void 0);
|
|
80
|
+
}
|
|
81
|
+
function normalizeHtmlText(text: string): string {
|
|
82
|
+
return (void 0);
|
|
83
|
+
}
|
|
84
|
+
function uniqueMessages(messages: UtilsI18n.GettextExtracted[]): UtilsI18n.GettextExtracted[] {
|
|
85
|
+
return (void 0);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import { AST, Binary, BindingPipe, Conditional, Interpolation, LiteralPrimitive, parseTemplate, TmplAstBoundAttribute, TmplAstBoundText, TmplAstElement, TmplAstNode, TmplAstTemplate, TmplAstText, } from '@angular/compiler/cjs';
|
|
9
|
+
import { UtilsI18n } from 'tnp-core/websql';
|
|
10
|
+
import { canHaveDecorators, ClassDeclaration, createSourceFile, Decorator, Expression, forEachChild, getDecorators, isCallExpression, isClassDeclaration, isIdentifier, isObjectLiteralExpression, isPropertyAssignment, Node, ScriptKind, ScriptTarget, } from 'typescript';
|
|
11
|
+
import { UtilsI18nExtractGettextTranslateFromHtml } from './utils-i18n-extract-gettext-translate-from-html';
|
|
12
|
+
export namespace UtilsI18nHtml {
|
|
13
|
+
export function extractGettextTranslateFromHtml(html: string, fileName = 'template.html'): UtilsI18n.GettextExtracted[] {
|
|
14
|
+
return UtilsI18nExtractGettextTranslateFromHtml.extractGettextTranslateFromHtml(html, fileName);
|
|
15
|
+
}
|
|
16
|
+
export function replaceTranslatePipieDirectiveTContext(html: string, options?: {
|
|
17
|
+
angularTsWithInlineHtml?: boolean;
|
|
18
|
+
}): string {
|
|
19
|
+
return (void 0);
|
|
20
|
+
return void 0 as any;
|
|
21
|
+
}
|
|
22
|
+
export function isAngularTsWithInlineHtml(content: string): boolean {
|
|
23
|
+
return (void 0);
|
|
24
|
+
return void 0 as any;
|
|
25
|
+
}
|
|
26
|
+
function replaceInAngularInlineTemplates(content: string): string {
|
|
27
|
+
return (void 0);
|
|
28
|
+
}
|
|
29
|
+
function getAngularInlineTemplateRanges(content: string): Array<{
|
|
30
|
+
start: number;
|
|
31
|
+
end: number;
|
|
32
|
+
html: string;
|
|
33
|
+
quote: '`' | '"' | "'";
|
|
34
|
+
}> {
|
|
35
|
+
return (void 0);
|
|
36
|
+
}
|
|
37
|
+
function hasComponentDecorator(node: ClassDeclaration): boolean {
|
|
38
|
+
return (void 0);
|
|
39
|
+
}
|
|
40
|
+
function getComponentDecorator(node: ClassDeclaration): Decorator | undefined {
|
|
41
|
+
return (void 0);
|
|
42
|
+
}
|
|
43
|
+
function getComponentTemplateInitializer(decorator: Decorator): Expression | undefined {
|
|
44
|
+
return (void 0);
|
|
45
|
+
}
|
|
46
|
+
function getStringLikeInnerRange(content: string, node: Expression): {
|
|
47
|
+
start: number;
|
|
48
|
+
end: number;
|
|
49
|
+
html: string;
|
|
50
|
+
quote: '`' | '"' | "'";
|
|
51
|
+
} | undefined {
|
|
52
|
+
return (void 0);
|
|
53
|
+
}
|
|
54
|
+
export function replaceTranslatePipieDirectiveTContextInHtml(html: string): string {
|
|
55
|
+
return (void 0);
|
|
56
|
+
return void 0 as any;
|
|
57
|
+
}
|
|
58
|
+
function findTranslateDirectiveEditsFromSource(html: string): Array<{
|
|
59
|
+
index: number;
|
|
60
|
+
text: string;
|
|
61
|
+
}> {
|
|
62
|
+
return (void 0);
|
|
63
|
+
}
|
|
64
|
+
function hasTranslateDirective(node: any): boolean {
|
|
65
|
+
return (void 0);
|
|
66
|
+
}
|
|
67
|
+
function hasTranslateTInput(node: any): boolean {
|
|
68
|
+
return (void 0);
|
|
69
|
+
}
|
|
70
|
+
function findOpenTagInsertPosition(html: string, start: number, length: number): number {
|
|
71
|
+
return (void 0);
|
|
72
|
+
}
|
|
73
|
+
function applyEdits(input: string, edits: Array<{
|
|
74
|
+
index: number;
|
|
75
|
+
text: string;
|
|
76
|
+
}>): string {
|
|
77
|
+
return (void 0);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import { crossPlatformPath, UtilsI18n, fse } from 'tnp-core/websql';
|
|
9
|
+
export namespace UtilsPoFile {
|
|
10
|
+
export function generatePoFiles(files: UtilsI18n.GettextFile[], locales: UtilsI18n.CommonLocaleCode[], destinationAbsFolderPath: string): void {
|
|
11
|
+
return (void 0);
|
|
12
|
+
}
|
|
13
|
+
export function generatePoFileContent(files: UtilsI18n.GettextFile[], locale: UtilsI18n.CommonLocaleCode): string {
|
|
14
|
+
return (void 0);
|
|
15
|
+
}
|
|
16
|
+
export function extractPoToJson(poFileContent: string): UtilsI18n.GettextFile[] {
|
|
17
|
+
return (void 0);
|
|
18
|
+
}
|
|
19
|
+
export function generateTranslationOverrideInterface(file: UtilsI18n.GettextFile, interfaceName: string, locale: UtilsI18n.CommonLocaleCode): string {
|
|
20
|
+
return (void 0);
|
|
21
|
+
}
|
|
22
|
+
function escapeTs(value: string): string {
|
|
23
|
+
return value.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
24
|
+
}
|
|
25
|
+
export function mergeGettextFile(jsonContent1FromTsHtml: UtilsI18n.GettextFile, json2ContentFromPoFileModifedByUser?: UtilsI18n.GettextFile | null): UtilsI18n.GettextFile {
|
|
26
|
+
return (void 0);
|
|
27
|
+
}
|
|
28
|
+
function getGettextTagKey(tag: Pick<UtilsI18n.GettextExtracted, 'gettextString' | 'context'>): string {
|
|
29
|
+
return `${tag.context ?? ''}\u0004${tag.gettextString}`;
|
|
30
|
+
}
|
|
31
|
+
interface ParsedPoEntry {
|
|
32
|
+
refs: string[];
|
|
33
|
+
msgctxt?: string;
|
|
34
|
+
msgid?: string;
|
|
35
|
+
msgstr?: string;
|
|
36
|
+
}
|
|
37
|
+
function parsePoEntries(po: string): ParsedPoEntry[] {
|
|
38
|
+
return (void 0);
|
|
39
|
+
}
|
|
40
|
+
function parsePoRef(ref: string): {
|
|
41
|
+
fileAbsPath: string;
|
|
42
|
+
lineNumber: number;
|
|
43
|
+
} | null {
|
|
44
|
+
return (void 0);
|
|
45
|
+
}
|
|
46
|
+
function escapePoString(value: string): string {
|
|
47
|
+
return value
|
|
48
|
+
.replace(/\\/g, '\\\\')
|
|
49
|
+
.replace(/"/g, '\\"')
|
|
50
|
+
.replace(/\n/g, '\\n');
|
|
51
|
+
}
|
|
52
|
+
function readPoQuoted(value: string): string {
|
|
53
|
+
const match = value.match(/^"([\s\S]*)"$/);
|
|
54
|
+
if (!match)
|
|
55
|
+
return '';
|
|
56
|
+
return unescapePoString(match[1]);
|
|
57
|
+
}
|
|
58
|
+
function normalizePoTranslation(translation?: string | null): string | undefined {
|
|
59
|
+
if (translation === undefined || translation === null) {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
return translation.trim().length > 0 ? translation : undefined;
|
|
63
|
+
}
|
|
64
|
+
function unescapePoString(value: string): string {
|
|
65
|
+
return value
|
|
66
|
+
.replace(/\\n/g, '\n')
|
|
67
|
+
.replace(/\\"/g, '"')
|
|
68
|
+
.replace(/\\\\/g, '\\');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
export const BUILD_FRAMEWORK_CLI_NAME = 'tnp';
|
|
9
|
+
export const APP_ID = 'com.domain.example.i18n';
|
|
10
|
+
export const BUILD_BASE_HREF = '';
|
|
11
|
+
export const PROJECT_NPM_NAME = '@taon-dev/i18n';
|
|
12
|
+
export const CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
13
|
+
export const CURRENT_PACKAGE_VERSION = '21.0.49';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
import { CoreModels__NS__BaseProjectType, CoreModels__NS__BaseProjectTypeArr, CoreModels__NS__BuildType, CoreModels__NS__BuildTypeArr, CoreModels__NS__buildTypeToWatcherFn, CoreModels__NS__BuildWatcherErrorType, CoreModels__NS__BuildWatcherType, CoreModels__NS__BuildWatcherTypeArr, CoreModels__NS__CfontAlign, CoreModels__NS__CfontStyle, CoreModels__NS__ClassNameStaticProperty, CoreModels__NS__ContentType, CoreModels__NS__ContentTypeKeys, CoreModels__NS__CoreLibCategory, CoreModels__NS__CutableFileExt, CoreModels__NS__DatabaseType, CoreModels__NS__DeepPartial, CoreModels__NS__FileEvent, CoreModels__NS__FileExtension, CoreModels__NS__FirstParamsFrom, CoreModels__NS__FrameworkVersion, CoreModels__NS__GitConnection, CoreModels__NS__GitConnectionArr, CoreModels__NS__GlobalDependencies, CoreModels__NS__hasExitCleaningFunction, CoreModels__NS__HttpCode, CoreModels__NS__HttpMethod, CoreModels__NS__HttpMethodArr, CoreModels__NS__ImageFileExtension, CoreModels__NS__ImageFileExtensionArr, CoreModels__NS__InstalationType, CoreModels__NS__InstalationTypeArr, CoreModels__NS__LibType, CoreModels__NS__localhostDomain, CoreModels__NS__localhostIp127, CoreModels__NS__ManifestIcon, CoreModels__NS__MediaType, CoreModels__NS__MediaTypeAllArr, CoreModels__NS__mimeTypes, CoreModels__NS__NewFactoryType, CoreModels__NS__NpmInstallOptions, CoreModels__NS__NpmPublishOptions, CoreModels__NS__NpmSpecialVersions, CoreModels__NS__OrignalClassKey, CoreModels__NS__OutFolder, CoreModels__NS__Package, CoreModels__NS__ParamType, CoreModels__NS__parentLocation, CoreModels__NS__pathToChildren, CoreModels__NS__Position, CoreModels__NS__PreReleaseVersionTag, CoreModels__NS__PROGRESS_DATA_TYPE, CoreModels__NS__PUSHTYPE, CoreModels__NS__PwaManifest, CoreModels__NS__ReleaseVersionType, CoreModels__NS__ReleaseVersionTypeEnum, CoreModels__NS__RunOptions, CoreModels__NS__Size, CoreModels__NS__SPECIAL_APP_READY_MESSAGE, CoreModels__NS__SPECIAL_WORKER_READY_MESSAGE, CoreModels__NS__StatusCode401, CoreModels__NS__tagForTaskName, CoreModels__NS__TaonHttpErrorCustomProp, CoreModels__NS__TsUsage, CoreModels__NS__UIFramework, CoreModels__NS__ValueOf, CoreModels__NS__VSCodeSettings } from 'tnp-core/websql-prod';
|
|
9
|
+
import { EnUsTraslationOverrideSrcLibTranslationTs } from './translation.ts.en-US.i18n.data';
|
|
10
|
+
import { PlPlTraslationOverrideSrcLibTranslationTs } from './translation.ts.pl-PL.i18n.data';
|
|
11
|
+
;
|
|
12
|
+
export type LibOverride = CoreModels__NS__DeepPartial<EnUsTraslationOverrideSrcLibTranslationTs | PlPlTraslationOverrideSrcLibTranslationTs>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* TAON READONLY SOURCE
|
|
4
|
+
* DO NOT MODIFY THIS FILE.
|
|
5
|
+
* Changes may be overwritten.
|
|
6
|
+
* ========================================================================== */
|
|
7
|
+
|
|
8
|
+
export interface EnUsTraslationOverrideSrcLibTranslationTs {
|
|
9
|
+
"en-US": {
|
|
10
|
+
"": {
|
|
11
|
+
"amazing better place"?: string;
|
|
12
|
+
"asdasd"?: string;
|
|
13
|
+
"hello"?: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export default {
|
|
18
|
+
"fileRelativePath": "src/lib/translation.ts",
|
|
19
|
+
"tags": [
|
|
20
|
+
{
|
|
21
|
+
"gettextString": "asdasd",
|
|
22
|
+
"lineNumber": 345
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"gettextString": "amazing better place",
|
|
26
|
+
"lineNumber": 355
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"gettextString": "hello",
|
|
30
|
+
"lineNumber": 369
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
};
|