@esfaenza/localizations 20.3.1 → 20.3.4
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.
|
@@ -272,10 +272,10 @@ class BaseLocalization {
|
|
|
272
272
|
this.Persistor.setToken("en->it", BaseLocalizationTokens.getFullDateFormatNoSeconds, "MM/DD/YYYY HH:mm", ["DD/MM/YYYY HH:mm"]);
|
|
273
273
|
this.Persistor.setToken("en->it", BaseLocalizationTokens.getFullDateDisplayFormatNoSeconds, "DD/MM/YYYY HH:mm", ["DD/MM/YYYY HH:mm"]);
|
|
274
274
|
}
|
|
275
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
276
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
275
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: BaseLocalization, deps: [{ token: LocalePersistor }, { token: LOC_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
276
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: BaseLocalization, providedIn: 'root' }); }
|
|
277
277
|
}
|
|
278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: BaseLocalization, decorators: [{
|
|
279
279
|
type: Injectable,
|
|
280
280
|
args: [{ providedIn: 'root' }]
|
|
281
281
|
}], ctorParameters: () => [{ type: LocalePersistor }, { type: undefined, decorators: [{
|
|
@@ -428,10 +428,10 @@ class LocalizationService {
|
|
|
428
428
|
location.reload();
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
432
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
431
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalizationService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
432
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalizationService }); }
|
|
433
433
|
}
|
|
434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalizationService, decorators: [{
|
|
435
435
|
type: Injectable
|
|
436
436
|
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
437
437
|
|
|
@@ -463,10 +463,10 @@ class LocalizePipe {
|
|
|
463
463
|
return "";
|
|
464
464
|
return (locContainerOverride || this.translationContainer).loc(value);
|
|
465
465
|
}
|
|
466
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
467
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
466
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalizePipe, deps: [{ token: LocalizationService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
467
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.24", ngImport: i0, type: LocalizePipe, isStandalone: false, name: "localize" }); }
|
|
468
468
|
}
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalizePipe, decorators: [{
|
|
470
470
|
type: Pipe,
|
|
471
471
|
args: [{
|
|
472
472
|
name: "localize", pure: true,
|
|
@@ -494,10 +494,10 @@ class LocalStorageLocalePersistor extends LocalePersistor {
|
|
|
494
494
|
var ret = localStorage.getItem(this.LOCALE);
|
|
495
495
|
return of(ret).pipe(first());
|
|
496
496
|
}
|
|
497
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
498
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
497
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalStorageLocalePersistor, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
498
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalStorageLocalePersistor }); }
|
|
499
499
|
}
|
|
500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalStorageLocalePersistor, decorators: [{
|
|
501
501
|
type: Injectable
|
|
502
502
|
}] });
|
|
503
503
|
|
|
@@ -516,11 +516,11 @@ class LocalizationModule {
|
|
|
516
516
|
]
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
520
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
521
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
519
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalizationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
520
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.24", ngImport: i0, type: LocalizationModule, declarations: [LocalizePipe], exports: [LocalizePipe] }); }
|
|
521
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalizationModule }); }
|
|
522
522
|
}
|
|
523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: LocalizationModule, decorators: [{
|
|
524
524
|
type: NgModule,
|
|
525
525
|
args: [{
|
|
526
526
|
declarations: [LocalizePipe],
|
|
@@ -542,5 +542,5 @@ class LocalizationModuleConfig {
|
|
|
542
542
|
* Generated bundle index. Do not edit.
|
|
543
543
|
*/
|
|
544
544
|
|
|
545
|
-
export { BaseLocalization, BaseLocalizationTokens, LOC_DEBUG_MODE, LOC_LOCALE, LOC_MISSING_POLICY, LocalizationMissingPolicy, LocalizationModule, LocalizationModuleConfig, LocalizationService, LocalizePipe };
|
|
545
|
+
export { BaseLocalization, BaseLocalizationTokens, LOC_DEBUG_MODE, LOC_LOCALE, LOC_MISSING_POLICY, LocalePersistor, LocalizationMissingPolicy, LocalizationModule, LocalizationModuleConfig, LocalizationService, LocalizePipe };
|
|
546
546
|
//# sourceMappingURL=esfaenza-localizations.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esfaenza-localizations.mjs","sources":["../../../projects/localizations/src/lib/models/ItemLocalization.ts","../../../projects/localizations/src/lib/models/LocaleObject.ts","../../../projects/localizations/src/lib/models/LocaleDefinitions.ts","../../../projects/localizations/src/lib/models/SpecializedLocalization.ts","../../../projects/localizations/src/lib/core/localization.persistor.ts","../../../projects/localizations/src/lib/models/BaseLocalizationTokens.ts","../../../projects/localizations/src/lib/tokens.ts","../../../projects/localizations/src/lib/locale-persistor/LocalePersistor.ts","../../../projects/localizations/src/lib/core/localization.base.ts","../../../projects/localizations/src/lib/models/LocalizationMissingPolicy.ts","../../../projects/localizations/src/lib/localizations.service.ts","../../../projects/localizations/src/lib/pipes/localize.pipe.ts","../../../projects/localizations/src/lib/locale-persistor/LocalStorageCachePersistor.ts","../../../projects/localizations/src/lib/localizations.module.ts","../../../projects/localizations/src/lib/models/LocalizationModuleConfig.ts","../../../projects/localizations/src/public-api.ts","../../../projects/localizations/src/esfaenza-localizations.ts"],"sourcesContent":["import { SpecializedLocalization } from \"./SpecializedLocalization\";\r\n\r\n/**\r\n * Contenitore delle localizzazioni collegate ad un testo \"base\", una per ogni linguaggio supportato\r\n */\r\nexport class ItemLocalization {\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {boolean} token Indica se è un token o se è un testo\r\n * @param {string} baseText Testo base che verrà richiesto quando verrà cercata la localizzazione\r\n * @param {SpecializedLocalization[]} translations Lista di traduzioni in base al testo base\r\n */\r\n constructor(public token: boolean, public baseText: string, public translations: SpecializedLocalization[]){ }\r\n}","\r\n/**\r\n * Classe che rappresenta un locale (Es. 'Italiano') con i propri alias (Es. 'it' oppure 'it-IT')\r\n */\r\nexport class LocaleObject {\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {string} id Codice locale\r\n * @param {string} description Descrizione locale\r\n * @param {string[]} aliases Alias con cui quel locale è conosciuto\r\n * @param {string} smallVersion Versione standard \"small\" del locale. Es. \"it-IT\" -> \"it\"\r\n */\r\n constructor(public id: string, public description: string, public aliases: string[], public smallVersion: string) { }\r\n}\r\n","import { LocaleObject } from \"./LocaleObject\";\r\n\r\n/** Classe che gestisce le definizioni dei locali disponibili */\r\nexport class LocaleDefinitions {\r\n\r\n /** Cache per ottimizzare la chiamata **getByAlias** */\r\n public static LocaleCache: { [alias: string]: LocaleObject } = {};\r\n\r\n /** @ignore Costruttore */\r\n constructor() { }\r\n\r\n /** Lista dei locali disponibili, definiti anche con i vari alias */\r\n public static AvailableLocales: LocaleObject[] = [\r\n new LocaleObject('it-IT', 'Italiano', ['it', 'it-IT'], \"it\"),\r\n new LocaleObject('en-US', 'English', ['en', 'en-US'], \"en\")\r\n ];\r\n\r\n /**\r\n * In base a un alias restituisce il locale rappresentato\r\n * \r\n * @param {string} alias Alias in base al quale raccogliere il Locale\r\n * \r\n * @returns {LocaleObject} Locale richiesto dall'alias\r\n */\r\n public static getByAlias(alias: string): LocaleObject {\r\n if (!this.LocaleCache[alias])\r\n this.LocaleCache[alias] = this.AvailableLocales.find(t => !!t.aliases.find(a => a == alias));\r\n\r\n return this.LocaleCache[alias];\r\n }\r\n}\r\n","/**\r\n * Classe che rappresenta la localizzazione di un test base per una certa lingua\r\n */\r\nexport class SpecializedLocalization {\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {string} culture Culture della traduzione\r\n * @param {string} translation Traduzione nella lingua specificata dalla **culture**\r\n */\r\n constructor(public culture: string, public translation: string) { }\r\n}\r\n","import { ItemLocalization } from \"../models/ItemLocalization\";\r\nimport { LocaleDefinitions } from \"../models/LocaleDefinitions\";\r\nimport { SpecializedLocalization } from \"../models/SpecializedLocalization\";\r\n\r\nexport class LocalizationPersistor {\r\n\r\n constructor(private LocCache: { [id: string]: ItemLocalization } = null) { }\r\n\r\n /**\r\n * Imposta la localizzazione di un token all'interno della cache scelta\r\n * \r\n * @param {string} direction Direzione della traduzione, rappresenta la lingua base in cui aspettarsi il testo e le varie lingue in cui viene tradotta.\r\n * Ad esempio, \"en->it\" indica che il parametro **left** è valido per le localizzazioni in inglese, mentre nell'elemento 0 del parametro **right** \r\n * è presente l'unica traduzione in italiano, per definire più traduzioni sul lato destro della freccia bisogna concatenarle con la virgola, ad esempio \"en->it,jp,ecc\"\r\n * @param {string} token Nome del token\r\n * @param {string} left Valore del token per la lingua specificata nel lato immediatamente sinistro alla freccia del parametro **direction**\r\n * @param {string} right Array con i valori facenti riferimento all'N-esima lingua del lato destro del parametro **direction**\r\n */\r\n public setToken(direction: string, token: string, left: string, right: string[]) {\r\n let parsingRegex = /([a-zA-Z]+)[\\s]*->[\\s]*([a-zA-Z,\\s]+)+/g;\r\n var parsingRes = parsingRegex.exec(direction);\r\n\r\n let from = parsingRes[1];\r\n let to: string[] = parsingRes[2].replace(/\\s/g, '').split(',');\r\n let localeFrom = LocaleDefinitions.getByAlias(from);\r\n this._set(token, localeFrom.id, left, true);\r\n\r\n to.forEach((t, index) => {\r\n let localeTo = LocaleDefinitions.getByAlias(t);\r\n this._set(token, localeTo.id, right[index], true);\r\n });\r\n }\r\n\r\n /**\r\n * Imposta la localizzazione di una frase all'interno della cache scelta\r\n * \r\n * @param {string} direction Direzione della traduzione, rappresenta la lingua base in cui aspettarsi il testo e le varie lingue in cui viene tradotta.\r\n * Ad esempio, \"en->it\" indica che il parametro **left** è valido per le localizzazioni in inglese, mentre nell'elemento 0 del parametro **right** \r\n * è presente l'unica traduzione in italiano, per definire più traduzioni sul lato destro della freccia bisogna concatenarle con la virgola, ad esempio \"en->it,jp,ecc\"\r\n * @param {string} left Valore della frase per la lingua specificata nel lato immediatamente sinistro alla freccia del parametro **direction**\r\n * @param {string} right Array con i valori facenti riferimento all'N-esima lingua del lato destro del parametro **direction**\r\n */\r\n public set(direction: string, left: string, right: string[]) {\r\n let parsingRegex = /([a-zA-Z]+)[\\s]*->[\\s]*([a-zA-Z,\\s]+)+/g;\r\n var parsingRes = parsingRegex.exec(direction);\r\n\r\n let from = parsingRes[1];\r\n let to: string[] = parsingRes[2].replace(/\\s/g, '').split(',');\r\n let localeFrom = LocaleDefinitions.getByAlias(from);\r\n this._set(left, localeFrom.id, left);\r\n\r\n to.forEach((t, index) => {\r\n let localeTo = LocaleDefinitions.getByAlias(t);\r\n this._set(left, localeTo.id, right[index]);\r\n });\r\n }\r\n\r\n /**\r\n * Imposta all'interno della cache specificata un'unica traduzione partendo da un testo di base\r\n * \r\n * @param {string} text Testo da tradurre\r\n * @param {string} culture Lingua per cui inserire la traduzione\r\n * @param {string} translation Traduzione del **text** nella lingua specificata da **culture**\r\n * @param {boolean} token Indica se il **text** è un token o è una frase normale\r\n */\r\n private _set(text: string, culture: string, translation: string, token?: boolean) {\r\n let item = this.get(text, token);\r\n if (!item) {\r\n this.LocCache[text] = new ItemLocalization(token, text, [new SpecializedLocalization(culture, translation)]);\r\n return;\r\n }\r\n\r\n var trs = this.translationByCulture(item, culture);\r\n if (trs) {\r\n //console.warn(\"Localization already loaded for sentence '\" + text + \"' and culture \" + culture);\r\n return;\r\n }\r\n\r\n item.translations.push(new SpecializedLocalization(culture, translation));\r\n }\r\n\r\n /**\r\n * Partendo da una cache di localizzazione, dato un testo che può essere o meno un token, cerca quell'elemento all'interno della cache\r\n * \r\n * @param {string} text Testo da cercare nella **LocCache**\r\n * @param {boolean} allowtokens Indica se l'elemento cercato può essere un token o se dev'essere per forza una frase (per evitare rari \r\n * casi di collisione in cui magari un token è uguale a una frase tradotta)\r\n * \r\n * @returns {ItemLocalization} Informazioni di localizzazione per il **text** cercato\r\n */\r\n public get(text: string, allowtokens: boolean): ItemLocalization {\r\n let possibleItem: ItemLocalization = this.LocCache[text];\r\n var item = possibleItem && (allowtokens || !possibleItem.token) ? possibleItem : null;\r\n return item;\r\n }\r\n\r\n /**\r\n * Date le informazioni di localizzazione per un testo cerca e restituisce la traduzione per una lingua specifica\r\n * \r\n * @param {ItemLocalization} Informazioni di localizzazione\r\n * @param {string} culture Lingua della traduzione richiesta\r\n * \r\n * @returns {SpecializedLocalization} Informazioni di localizzazione specifiche della lingua richiesta\r\n */\r\n public translationByCulture(item: ItemLocalization, culture: string): SpecializedLocalization {\r\n for (let i = 0; i < item.translations.length; i++) {\r\n let trl = item.translations[i];\r\n if (trl.culture == culture)\r\n return trl;\r\n }\r\n\r\n return null;\r\n }\r\n}","\r\nexport enum BaseLocalizationTokens {\r\n getDateMonthPosition = \"getDateMonthPosition\",\r\n getDisplayDateMonthPosition = \"getDisplayDateMonthPosition\",\r\n getLocale = \"getLocale\",\r\n getSmallDateFormat = \"getSmallDateFormat\",\r\n getDefaultDateFormat = \"getDefaultDateFormat\",\r\n getSmallDateDisplayFormat = \"getSmallDateDisplayFormat\",\r\n getFullDateFormat = \"getFullDateFormat\",\r\n getFullDateDisplayFormat = \"getFullDateDisplayFormat\",\r\n getFullDateFormatNoSeconds = \"getFullDateFormatNoSeconds\",\r\n getFullDateDisplayFormatNoSeconds = \"getFullDateDisplayFormatNoSeconds\"\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { LocalizationMissingPolicy } from \"./models/LocalizationMissingPolicy\"\r\n\r\n/** Locale da utilizzare per le traduzioni */\r\nexport const LOC_LOCALE: InjectionToken<string> = new InjectionToken<string>('LOC_LOCALE');\r\n\r\n/** Policy da utilizzare per traduzioni mancanti */\r\nexport const LOC_MISSING_POLICY: InjectionToken<LocalizationMissingPolicy> = new InjectionToken<LocalizationMissingPolicy>('LOC_MISSING_POLICY');\r\n\r\n/** Modalità di Debug */\r\nexport const LOC_DEBUG_MODE: InjectionToken<boolean> = new InjectionToken<boolean>('LOC_DEBUG_MODE');","import { Observable } from \"rxjs\";\r\n\r\n/** Classe astratta che rappresenta lo stato di persistenza fra la libreria e uno storage */\r\nexport abstract class LocalePersistor {\r\n\r\n /** Chiave su cui salvare il locale */\r\n protected LOCALE: string = \"LOCALE\";\r\n\r\n /**\r\n * Salva il Locale\r\n * \r\n * @param {string} locale Locale da salvare\r\n */\r\n public abstract persist(locale: string): Observable<boolean>;\r\n\r\n /**\r\n * Recupera il Locale\r\n * \r\n * @returns {Observable<string>} Valore salvato per il locale\r\n */\r\n public abstract recover(): Observable<string>;\r\n}","import { Inject, Injectable } from \"@angular/core\";\r\nimport { ItemLocalization } from \"../models/ItemLocalization\";\r\nimport { LocalizationPersistor } from \"./localization.persistor\";\r\nimport { BaseLocalizationTokens } from \"../models/BaseLocalizationTokens\";\r\nimport { LocalePersistor } from \"../locale-persistor/LocalePersistor\";\r\nimport { take } from \"rxjs/operators\";\r\nimport { ReplaySubject } from \"rxjs\";\r\nimport { LOC_LOCALE } from \"../tokens\";\r\n\r\n/**\r\n * Classe singleton che contiene le traduzioni di base (per evitare di ripeterle in oggi classe di traduzione) e le funzioni base per \r\n * inserire e leggere traduzioni in/da una cache\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class BaseLocalization {\r\n\r\n /**\r\n * Cache di tutte le localizzazioni di base\r\n */\r\n public LocCache: { [id: string]: ItemLocalization } = {};\r\n\r\n /**\r\n * Persistor delle localizzazioni relativo a questa classe\r\n */\r\n public Persistor: LocalizationPersistor;\r\n\r\n /**\r\n * Locale di riferimento per tutte le traduzioni\r\n */\r\n public Locale: ReplaySubject<string> = new ReplaySubject<string>(1);\r\n\r\n /**\r\n * Costruttore. Da qui utilizzando il metodo statico **BaseLocalization.set** si va a popolare la cache delle traduzioni **BaseTranslations**\r\n */\r\n constructor(public LocalePersistor: LocalePersistor, @Inject(LOC_LOCALE) defaultLocale: string) {\r\n\r\n // Recupero il locale alla partenza del BaseLocalization in modo, spero di dare tempo all'applicazione di tirarlo su\r\n this.LocalePersistor.recover().pipe(take(1)).subscribe(async l => {\r\n if (!l) {\r\n l = defaultLocale;\r\n this.LocalePersistor.persist(defaultLocale);\r\n }\r\n this.Locale.next(l)\r\n });\r\n\r\n this.Persistor = new LocalizationPersistor(this.LocCache); \r\n\r\n this.Persistor.set(\"it->en\", \"Sì\", [\"Yes\"]);\r\n this.Persistor.set(\"it->en\", \"No\", [\"No\"]);\r\n this.Persistor.set(\"it->en\", \"Errore\", [\"Error\"]);\r\n this.Persistor.set(\"it->en\", \"Avviso\", [\"Warning\"]);\r\n this.Persistor.set(\"it->en\", \"Informazione\", [\"Information\"]);\r\n this.Persistor.set(\"it->en\", \"Salva\", [\"Save\"]);\r\n this.Persistor.set(\"it->en\", \"Indietro\", [\"Back\"]);\r\n this.Persistor.set(\"it->en\", \"Da\", [\"From\"]);\r\n this.Persistor.set(\"it->en\", \"A\", [\"To\"]);\r\n this.Persistor.set(\"it->en\", \"Note\", [\"Notes\"]);\r\n this.Persistor.set(\"it->en\", \"Modifica Note\", [\"Edit Notes\"]);\r\n this.Persistor.set(\"it->en\", \"Annulla\", [\"Cancel\"]);\r\n this.Persistor.set(\"it->en\", \"Conferma\", [\"Confirm\"]);\r\n this.Persistor.set(\"it->en\", \"Visualizza\", [\"View\"]);\r\n this.Persistor.set(\"it->en\", \"Elimina\", [\"Delete\"]);\r\n this.Persistor.set(\"it->en\", \"Chiudi\", [\"Close\"]);\r\n this.Persistor.set(\"it->en\", \"Seleziona\", [\"Select\"]);\r\n this.Persistor.set(\"it->en\", \"Elettricità\", [\"Electricity\"]);\r\n this.Persistor.set(\"it->en\", \"Gas\", [\"Gas\"]);\r\n this.Persistor.set(\"it->en\", \"Acqua\", [\"Water\"]);\r\n this.Persistor.set(\"it->en\", \"Questa operazione non può essere annullata\", [\"This operation cannot be reverted\"]);\r\n this.Persistor.set(\"it->en\", \"Nascondi\", [\"Hide\"]);\r\n\r\n // Informazioni sulle date\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getDateMonthPosition, \"0\", [\"1\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getDisplayDateMonthPosition, \"1\", [\"1\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getLocale, \"en-US\", [\"it-IT\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getSmallDateFormat, \"MM/DD/YYYY\", [\"DD/MM/YYYY\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getDefaultDateFormat, \"MM/DD/YYYY\", [\"MM/DD/YYYY\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getSmallDateDisplayFormat, \"DD/MM/YYYY\", [\"DD/MM/YYYY\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getFullDateFormat, \"MM/DD/YYYY HH:mm:ss\", [\"DD/MM/YYYY HH:mm:ss\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getFullDateDisplayFormat, \"DD/MM/YYYY HH:mm:ss\", [\"DD/MM/YYYY HH:mm:ss\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getFullDateFormatNoSeconds, \"MM/DD/YYYY HH:mm\", [\"DD/MM/YYYY HH:mm\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getFullDateDisplayFormatNoSeconds, \"DD/MM/YYYY HH:mm\", [\"DD/MM/YYYY HH:mm\"]);\r\n }\r\n}","\r\n/** \r\n * Enum che rappresenta le policy di comportamento qualore il sistema di localizzazione non trovi la localizzazione cercata, \r\n * usare **ThrowException** solo se ci si sente infallibili o si vuole debuggare in maniera approfondita l'applicazione \r\n */\r\nexport enum LocalizationMissingPolicy {\r\n PrintEmpty,\r\n PrintSource,\r\n PrintSourceWithoutWarnings,\r\n ThrowException\r\n}\r\n","import { Injectable, Injector, Type } from '@angular/core';\r\nimport { BaseLocalization } from './core/localization.base';\r\nimport { ItemLocalization } from './models/ItemLocalization';\r\nimport { LocalizationPersistor } from './core/localization.persistor';\r\nimport { LocalePersistor } from './locale-persistor/LocalePersistor';\r\nimport { LOC_MISSING_POLICY } from './tokens';\r\nimport { LocalizationMissingPolicy } from './models/LocalizationMissingPolicy';\r\nimport { LocaleDefinitions } from './models/LocaleDefinitions';\r\n\r\n/**\r\n * Classe di localizzazione estendibile che permette di specificare le proprie localizzazioni e comunque rendere disponibili le localizzazioni globali\r\n */\r\n@Injectable()\r\nexport class LocalizationService {\r\n\r\n /**\r\n * Cache di tutte le localizzazioni disonibili all'interno di questa classe\r\n */\r\n private TranslationCache: { [id: string]: ItemLocalization } = {};\r\n\r\n public Locale: string;\r\n public SmallLocale: string;\r\n\r\n private baseLocalization: BaseLocalization;\r\n private onMissing: LocalizationMissingPolicy\r\n private Persistor: LocalizationPersistor;\r\n private LocalePersistor: LocalePersistor;\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {string} Locale Locale da utilizzare nel momento che questo servizio richiede le traduzioni\r\n * @param {baseLocalization} baseLocalization Classe base di localizzazione già fornita a livello di root dalla libreria stessa. \r\n * È sufficiente iniettarla nell'eventuale costruttore che estende questa classe e passarla as-is\r\n */\r\n constructor(private injector: Injector) {\r\n this.LocalePersistor = this.injector.get(LocalePersistor);\r\n this.baseLocalization = this.injector.get(BaseLocalization);\r\n this.onMissing = this.injector.get(LOC_MISSING_POLICY);\r\n\r\n this.Persistor = new LocalizationPersistor(this.TranslationCache);\r\n\r\n this.baseLocalization.Locale.subscribe(lr => {\r\n this.Locale = lr;\r\n this.SmallLocale = LocaleDefinitions.getByAlias(lr).smallVersion;\r\n });\r\n }\r\n\r\n /**\r\n * Genera un nuovo servizio di localizzazione data una classe in modo che le localizzazioni non siano più solo da provide-are a livello di componente, ma possano\r\n * anche essere create al volo dal componente/servizio/qualsiasicosa che le deve utilizzare\r\n * \r\n * @param {Type<LocalizationService>} lcst Classe da usare per crare il nuovo servizio di localizzazione\r\n */\r\n public generateFromType(lcst: Type<LocalizationService>): LocalizationService {\r\n const injector = Injector.create({\r\n providers: [\r\n { provide: LOC_MISSING_POLICY, useValue: this.onMissing},\r\n { provide: BaseLocalization, useValue: this.baseLocalization},\r\n { provide: LocalePersistor, useValue: this.LocalePersistor},\r\n { provide: LocalizationService, useClass: lcst }\r\n ]\r\n });\r\n return injector.get(LocalizationService);\r\n }\r\n\r\n /**\r\n * Imposta la localizzazione di un token all'interno della **TranslationCache**\r\n * \r\n * @param {string} direction Direzione della traduzione, rappresenta la lingua base in cui aspettarsi il testo e le varie lingue in cui viene tradotta.\r\n * Ad esempio, \"en->it\" indica che il parametro **left** è valido per le localizzazioni in inglese, mentre nell'elemento 0 del parametro **right** \r\n * è presente l'unica traduzione in italiano, per definire più traduzioni sul lato destro della freccia bisogna concatenarle con la virgola, ad esempio \"en->it,jp,ecc\"\r\n * @param {string} token Nome del token\r\n * @param {string} left Valore del token per la lingua specificata nel lato immediatamente sinistro alla freccia del parametro **direction**\r\n * @param {string} right Array con i valori facenti riferimento all'N-esima lingua del lato destro del parametro **direction**\r\n */\r\n protected setToken(direction: string, token: string, left: string, right: string[]) {\r\n this.Persistor.setToken(direction, token, left, right);\r\n }\r\n\r\n /**\r\n * Imposta la localizzazione di una frase all'interno della **TranslationCache**\r\n * \r\n * @param {string} direction Direzione della traduzione, rappresenta la lingua base in cui aspettarsi il testo e le varie lingue in cui viene tradotta.\r\n * Ad esempio, \"en->it\" indica che il parametro **left** è valido per le localizzazioni in inglese, mentre nell'elemento 0 del parametro **right** \r\n * è presente l'unica traduzione in italiano, per definire più traduzioni sul lato destro della freccia bisogna concatenarle con la virgola, ad esempio \"en->it,jp,ecc\"\r\n * @param {string} left Valore della frase per la lingua specificata nel lato immediatamente sinistro alla freccia del parametro **direction**\r\n * @param {string} right Array con i valori facenti riferimento all'N-esima lingua del lato destro del parametro **direction**\r\n */\r\n protected set(direction: string, left: string, right: string[]) {\r\n // Controlla di non reinserire la stessa localizzazione presente nel BaseLocalization\r\n // i controlli per il non reinserimento della stessa localizzazione all'interno della stessa istanza è fatto lato Persistor\r\n if (this.baseLocalization.Persistor.get(left, false)) {\r\n if(this.onMissing != LocalizationMissingPolicy.PrintSourceWithoutWarnings)\r\n console.warn(`La localizzazione per ${left} è già presente fra le localizzazioni base, ignoro l'operazione`);\r\n return;\r\n }\r\n this.Persistor.set(direction, left, right);\r\n }\r\n\r\n /**\r\n * Localizza un token\r\n * \r\n * @param {string} text Il token da localizzare\r\n * \r\n * @returns {string} Token localizzato\r\n */\r\n public token(text: string): string {\r\n return this.loc(text, true);\r\n }\r\n\r\n /**\r\n * Localizza una frase\r\n * \r\n * @param {string} text Frase da localizzare\r\n * @param {boolean} allowtokens Indica se la frase **text** potrebbe essere un token o no\r\n * \r\n * @returns {string} Frase localizzata\r\n */\r\n public loc(text: string, allowtokens?: boolean): string {\r\n if (!this.Locale)\r\n throw \"Il sistema di localizzazione non ha ancora caricato il Locale, assicurarsi di caricare l'APP solo al retrieve del locale'\";\r\n\r\n if (!text || text == \"undefined\")\r\n return \"\";\r\n\r\n // Prendo la localizzazione o dalla cache attuale o dalla cache del servizio base\r\n var item = this.Persistor.get(text, allowtokens) || this.baseLocalization.Persistor.get(text, allowtokens);\r\n if (!item) {\r\n let message = `Impossibile trovare la localizzazione per '${text}'`;\r\n switch (this.onMissing) {\r\n case LocalizationMissingPolicy.PrintEmpty:\r\n console.error(message);\r\n return \"\";\r\n case LocalizationMissingPolicy.PrintSource:\r\n console.warn(message);\r\n return text;\r\n case LocalizationMissingPolicy.PrintSourceWithoutWarnings:\r\n return text;\r\n case LocalizationMissingPolicy.ThrowException:\r\n throw message;\r\n }\r\n }\r\n\r\n var loc = this.Persistor.translationByCulture(item, this.Locale);\r\n if (!loc) {\r\n console.error(\"Impossibile trovare la localizzazione per '\" + text + \"', culture \" + this.Locale);\r\n return \"\";\r\n }\r\n\r\n return loc.translation;\r\n }\r\n\r\n public async changeLocale(newLocale: string) {\r\n let locale = await this.LocalePersistor.recover().toPromise();\r\n if (newLocale == locale) {\r\n console.info(\"Il locale richiesto è lo stesso del locale attuale. Ignoro l'operazione\");\r\n return;\r\n }\r\n else {\r\n await this.LocalePersistor.persist(newLocale).toPromise();\r\n location.reload();\r\n }\r\n }\r\n}","// Angular\r\nimport { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { LocalizationService } from '../localizations.service';\r\n\r\n/**\r\n * Pipe di localizzazione per tradurre direttamente da template\r\n */\r\n@Pipe({\r\n name: \"localize\", pure: true,\r\n standalone: false\r\n})\r\nexport class LocalizePipe implements PipeTransform {\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {LocalizationService} translationContainer Container delle traduzioni disponibili nel contesto in cui viene usata la pipe.\r\n * \r\n * Viene iniettata dal provider dichiarato nel singolo componente che utilizza la traduzione e, se non esiste, viene iniettato dal default\r\n */\r\n constructor(private translationContainer: LocalizationService) { }\r\n\r\n /**\r\n * Trasformazione della stringa in input ad una stringa tradotta\r\n * \r\n * @param {string} value Testo da tradurre\r\n * @param {LocalizationService} locContainerOverride Override al contenitore della traduzione iniettato dal costruttore, qualora serva\r\n * \r\n * @returns {string} Frase tradotta\r\n */\r\n transform(value: string, locContainerOverride?: LocalizationService): string {\r\n if (value == null || value === \"\") return \"\";\r\n\r\n return (locContainerOverride || this.translationContainer).loc(value);\r\n }\r\n}","// Angular\r\nimport { Injectable } from \"@angular/core\";\r\n\r\n// RXJS\r\nimport { Observable, of } from \"rxjs\";\r\nimport { first } from \"rxjs/operators\";\r\nimport { LocalePersistor } from \"./LocalePersistor\";\r\n\r\n@Injectable()\r\nexport class LocalStorageLocalePersistor extends LocalePersistor {\r\n\r\n /** @ignore Vedi classe base */\r\n public persist(locale: string): Observable<boolean> {\r\n if (!localStorage) {\r\n console.error(\"Local storage does not xist. This doesn't seem to be a browser environment. Please implement the LocalePersistor, otherwise it will fallback to the browser's LocalStorage\");\r\n return of(true).pipe(first());\r\n }\r\n localStorage.setItem(this.LOCALE, locale);\r\n return of(true).pipe(first());\r\n }\r\n\r\n /** @ignore Vedi classe base */\r\n public recover(): Observable<string> {\r\n if (!localStorage) {\r\n console.error(\"Local storage does not exist. This doesn't seem to be a browser environment. Please implement the LocalePersistor, otherwise it will fallback to the browser's LocalStorage\")\r\n return of(\"\").pipe(first());\r\n }\r\n var ret = localStorage.getItem(this.LOCALE);\r\n return of(ret).pipe(first());\r\n }\r\n}","// Angular\r\nimport { NgModule, ModuleWithProviders } from '@angular/core';\r\n\r\n// Pipe\r\nimport { LocalizePipe } from './pipes/localize.pipe';\r\n\r\n// Servizi\r\nimport { LocalizationService } from './localizations.service';\r\nimport { BaseLocalization } from './core/localization.base';\r\nimport { LocalePersistor } from './locale-persistor/LocalePersistor';\r\nimport { LocalStorageLocalePersistor } from './locale-persistor/LocalStorageCachePersistor';\r\n\r\n// Modelli\r\nimport { LocalizationModuleConfig } from './models/LocalizationModuleConfig';\r\nimport { LocalizationMissingPolicy } from './models/LocalizationMissingPolicy';\r\nimport { LOC_DEBUG_MODE, LOC_LOCALE, LOC_MISSING_POLICY } from './tokens';\r\n\r\n@NgModule({\r\n declarations: [LocalizePipe],\r\n exports: [LocalizePipe]\r\n})\r\nexport class LocalizationModule {\r\n static forRoot(config?: LocalizationModuleConfig): ModuleWithProviders<LocalizationModule> {\r\n return {\r\n ngModule: LocalizationModule,\r\n providers: [\r\n LocalizationService,\r\n BaseLocalization,\r\n { provide: LOC_LOCALE, useValue: config?.defaultLocale || 'it-IT' },\r\n { provide: LOC_MISSING_POLICY, useValue: config?.localizationMissingPolicy || LocalizationMissingPolicy.PrintEmpty},\r\n { provide: LocalePersistor, useClass: config?.localePersistor || LocalStorageLocalePersistor },\r\n { provide: LOC_DEBUG_MODE, useValue: config?.debugMode || false },\r\n ]\r\n };\r\n }\r\n}","import { Type } from \"@angular/core\";\r\nimport { LocalePersistor } from \"../locale-persistor/LocalePersistor\";\r\nimport { LocalizationMissingPolicy } from \"./LocalizationMissingPolicy\";\r\n\r\n/**\r\n * Classe di configurazione per il modulo di localizzazione\r\n */\r\nexport class LocalizationModuleConfig {\r\n\r\n /** Locale di default utilizzato per richiedere le traduzioni */\r\n defaultLocale?: string;\r\n\r\n /**\r\n * Classe che si deve occupare dello store \"Definitivo\" delle info sul locale utilizzato. Di default viene proposto uno store lato localStorage ma si può facilmente \r\n * fornire uno storage che porta le informazioni lato Database in modo da avere la stessa lingua fino a che non viene cambiata (Es. Preference storage)\r\n */\r\n localePersistor?: Type<LocalePersistor>;\r\n\r\n /** Policy di cosa fare in caso il sistema non riesca a trovare una delle traduzioni */\r\n localizationMissingPolicy?: LocalizationMissingPolicy\r\n\r\n /** Attiva la modalità di debug per l'esposizione di messaggi significativi */\r\n debugMode?: boolean;\r\n}","/*\r\n * Public API Surface of localizations\r\n */\r\n\r\nexport * from './lib/core/localization.base';\r\nexport * from './lib/localizations.module';\r\nexport * from './lib/localizations.service';\r\nexport * from './lib/pipes/localize.pipe';\r\nexport * from './lib/tokens';\r\nexport * from './lib/models/LocalizationModuleConfig';\r\nexport * from './lib/models/BaseLocalizationTokens';\r\nexport * from './lib/models/LocalizationMissingPolicy';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.LocalizationService"],"mappings":";;;;;AAEA;;AAEG;MACU,gBAAgB,CAAA;AAE3B;;;;;;AAMG;AACH,IAAA,WAAA,CAAmB,KAAc,EAAS,QAAgB,EAAS,YAAuC,EAAA;QAAvF,IAAA,CAAA,KAAK,GAAL,KAAK;QAAkB,IAAA,CAAA,QAAQ,GAAR,QAAQ;QAAiB,IAAA,CAAA,YAAY,GAAZ,YAAY;IAA8B;AAC9G;;ACdD;;AAEG;MACU,YAAY,CAAA;AAErB;;;;;;;AAOG;AACH,IAAA,WAAA,CAAmB,EAAU,EAAS,WAAmB,EAAS,OAAiB,EAAS,YAAoB,EAAA;QAA7F,IAAA,CAAA,EAAE,GAAF,EAAE;QAAiB,IAAA,CAAA,WAAW,GAAX,WAAW;QAAiB,IAAA,CAAA,OAAO,GAAP,OAAO;QAAmB,IAAA,CAAA,YAAY,GAAZ,YAAY;IAAY;AACvH;;ACbD;MACa,iBAAiB,CAAA;;aAGZ,IAAA,CAAA,WAAW,GAAsC,EAAE,CAAC;;AAGlE,IAAA,WAAA,GAAA,EAAgB;;AAGF,IAAA,SAAA,IAAA,CAAA,gBAAgB,GAAmB;AAC7C,QAAA,IAAI,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC;AAC5D,QAAA,IAAI,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI;KAC7D,CAAC;AAEF;;;;;;AAMG;IACI,OAAO,UAAU,CAAC,KAAa,EAAA;AAClC,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AACxB,YAAA,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,C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AkB,CAAA;IAC7B,OAAO,OAAO,CAAC,MAAiC,EAAA;QAC9C,OAAO;AACL,YAAA,QAAQ,EAAE,kBAAkB;AAC5B,YAAA,SAAS,EAAE;gBACT,mBAAmB;gBACnB,gBAAgB;gBAChB,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,IAAI,OAAO,EAAE;AACnE,gBAAA,EAAE,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,yBAAyB,IAAI,yBAAyB,CAAC,UAAU,EAAC;gBACnH,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,IAAI,2BAA2B,EAAE;gBAC9F,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,IAAI,KAAK,EAAE;AAClE;SACF;IACH;+GAbW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAHd,YAAY,CAAA,EAAA,OAAA,EAAA,CACjB,YAAY,CAAA,EAAA,CAAA,CAAA;gHAEX,kBAAkB,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,YAAY,CAAC;oBAC5B,OAAO,EAAE,CAAC,YAAY;AACvB,iBAAA;;;AChBD;;AAEG;MACU,wBAAwB,CAAA;AAgBpC;;ACvBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"esfaenza-localizations.mjs","sources":["../../../projects/localizations/src/lib/models/ItemLocalization.ts","../../../projects/localizations/src/lib/models/LocaleObject.ts","../../../projects/localizations/src/lib/models/LocaleDefinitions.ts","../../../projects/localizations/src/lib/models/SpecializedLocalization.ts","../../../projects/localizations/src/lib/core/localization.persistor.ts","../../../projects/localizations/src/lib/models/BaseLocalizationTokens.ts","../../../projects/localizations/src/lib/tokens.ts","../../../projects/localizations/src/lib/locale-persistor/LocalePersistor.ts","../../../projects/localizations/src/lib/core/localization.base.ts","../../../projects/localizations/src/lib/models/LocalizationMissingPolicy.ts","../../../projects/localizations/src/lib/localizations.service.ts","../../../projects/localizations/src/lib/pipes/localize.pipe.ts","../../../projects/localizations/src/lib/locale-persistor/LocalStorageCachePersistor.ts","../../../projects/localizations/src/lib/localizations.module.ts","../../../projects/localizations/src/lib/models/LocalizationModuleConfig.ts","../../../projects/localizations/src/public-api.ts","../../../projects/localizations/src/esfaenza-localizations.ts"],"sourcesContent":["import { SpecializedLocalization } from \"./SpecializedLocalization\";\r\n\r\n/**\r\n * Contenitore delle localizzazioni collegate ad un testo \"base\", una per ogni linguaggio supportato\r\n */\r\nexport class ItemLocalization {\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {boolean} token Indica se è un token o se è un testo\r\n * @param {string} baseText Testo base che verrà richiesto quando verrà cercata la localizzazione\r\n * @param {SpecializedLocalization[]} translations Lista di traduzioni in base al testo base\r\n */\r\n constructor(public token: boolean, public baseText: string, public translations: SpecializedLocalization[]){ }\r\n}","\r\n/**\r\n * Classe che rappresenta un locale (Es. 'Italiano') con i propri alias (Es. 'it' oppure 'it-IT')\r\n */\r\nexport class LocaleObject {\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {string} id Codice locale\r\n * @param {string} description Descrizione locale\r\n * @param {string[]} aliases Alias con cui quel locale è conosciuto\r\n * @param {string} smallVersion Versione standard \"small\" del locale. Es. \"it-IT\" -> \"it\"\r\n */\r\n constructor(public id: string, public description: string, public aliases: string[], public smallVersion: string) { }\r\n}\r\n","import { LocaleObject } from \"./LocaleObject\";\r\n\r\n/** Classe che gestisce le definizioni dei locali disponibili */\r\nexport class LocaleDefinitions {\r\n\r\n /** Cache per ottimizzare la chiamata **getByAlias** */\r\n public static LocaleCache: { [alias: string]: LocaleObject } = {};\r\n\r\n /** @ignore Costruttore */\r\n constructor() { }\r\n\r\n /** Lista dei locali disponibili, definiti anche con i vari alias */\r\n public static AvailableLocales: LocaleObject[] = [\r\n new LocaleObject('it-IT', 'Italiano', ['it', 'it-IT'], \"it\"),\r\n new LocaleObject('en-US', 'English', ['en', 'en-US'], \"en\")\r\n ];\r\n\r\n /**\r\n * In base a un alias restituisce il locale rappresentato\r\n * \r\n * @param {string} alias Alias in base al quale raccogliere il Locale\r\n * \r\n * @returns {LocaleObject} Locale richiesto dall'alias\r\n */\r\n public static getByAlias(alias: string): LocaleObject {\r\n if (!this.LocaleCache[alias])\r\n this.LocaleCache[alias] = this.AvailableLocales.find(t => !!t.aliases.find(a => a == alias));\r\n\r\n return this.LocaleCache[alias];\r\n }\r\n}\r\n","/**\r\n * Classe che rappresenta la localizzazione di un test base per una certa lingua\r\n */\r\nexport class SpecializedLocalization {\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {string} culture Culture della traduzione\r\n * @param {string} translation Traduzione nella lingua specificata dalla **culture**\r\n */\r\n constructor(public culture: string, public translation: string) { }\r\n}\r\n","import { ItemLocalization } from \"../models/ItemLocalization\";\r\nimport { LocaleDefinitions } from \"../models/LocaleDefinitions\";\r\nimport { SpecializedLocalization } from \"../models/SpecializedLocalization\";\r\n\r\nexport class LocalizationPersistor {\r\n\r\n constructor(private LocCache: { [id: string]: ItemLocalization } = null) { }\r\n\r\n /**\r\n * Imposta la localizzazione di un token all'interno della cache scelta\r\n * \r\n * @param {string} direction Direzione della traduzione, rappresenta la lingua base in cui aspettarsi il testo e le varie lingue in cui viene tradotta.\r\n * Ad esempio, \"en->it\" indica che il parametro **left** è valido per le localizzazioni in inglese, mentre nell'elemento 0 del parametro **right** \r\n * è presente l'unica traduzione in italiano, per definire più traduzioni sul lato destro della freccia bisogna concatenarle con la virgola, ad esempio \"en->it,jp,ecc\"\r\n * @param {string} token Nome del token\r\n * @param {string} left Valore del token per la lingua specificata nel lato immediatamente sinistro alla freccia del parametro **direction**\r\n * @param {string} right Array con i valori facenti riferimento all'N-esima lingua del lato destro del parametro **direction**\r\n */\r\n public setToken(direction: string, token: string, left: string, right: string[]) {\r\n let parsingRegex = /([a-zA-Z]+)[\\s]*->[\\s]*([a-zA-Z,\\s]+)+/g;\r\n var parsingRes = parsingRegex.exec(direction);\r\n\r\n let from = parsingRes[1];\r\n let to: string[] = parsingRes[2].replace(/\\s/g, '').split(',');\r\n let localeFrom = LocaleDefinitions.getByAlias(from);\r\n this._set(token, localeFrom.id, left, true);\r\n\r\n to.forEach((t, index) => {\r\n let localeTo = LocaleDefinitions.getByAlias(t);\r\n this._set(token, localeTo.id, right[index], true);\r\n });\r\n }\r\n\r\n /**\r\n * Imposta la localizzazione di una frase all'interno della cache scelta\r\n * \r\n * @param {string} direction Direzione della traduzione, rappresenta la lingua base in cui aspettarsi il testo e le varie lingue in cui viene tradotta.\r\n * Ad esempio, \"en->it\" indica che il parametro **left** è valido per le localizzazioni in inglese, mentre nell'elemento 0 del parametro **right** \r\n * è presente l'unica traduzione in italiano, per definire più traduzioni sul lato destro della freccia bisogna concatenarle con la virgola, ad esempio \"en->it,jp,ecc\"\r\n * @param {string} left Valore della frase per la lingua specificata nel lato immediatamente sinistro alla freccia del parametro **direction**\r\n * @param {string} right Array con i valori facenti riferimento all'N-esima lingua del lato destro del parametro **direction**\r\n */\r\n public set(direction: string, left: string, right: string[]) {\r\n let parsingRegex = /([a-zA-Z]+)[\\s]*->[\\s]*([a-zA-Z,\\s]+)+/g;\r\n var parsingRes = parsingRegex.exec(direction);\r\n\r\n let from = parsingRes[1];\r\n let to: string[] = parsingRes[2].replace(/\\s/g, '').split(',');\r\n let localeFrom = LocaleDefinitions.getByAlias(from);\r\n this._set(left, localeFrom.id, left);\r\n\r\n to.forEach((t, index) => {\r\n let localeTo = LocaleDefinitions.getByAlias(t);\r\n this._set(left, localeTo.id, right[index]);\r\n });\r\n }\r\n\r\n /**\r\n * Imposta all'interno della cache specificata un'unica traduzione partendo da un testo di base\r\n * \r\n * @param {string} text Testo da tradurre\r\n * @param {string} culture Lingua per cui inserire la traduzione\r\n * @param {string} translation Traduzione del **text** nella lingua specificata da **culture**\r\n * @param {boolean} token Indica se il **text** è un token o è una frase normale\r\n */\r\n private _set(text: string, culture: string, translation: string, token?: boolean) {\r\n let item = this.get(text, token);\r\n if (!item) {\r\n this.LocCache[text] = new ItemLocalization(token, text, [new SpecializedLocalization(culture, translation)]);\r\n return;\r\n }\r\n\r\n var trs = this.translationByCulture(item, culture);\r\n if (trs) {\r\n //console.warn(\"Localization already loaded for sentence '\" + text + \"' and culture \" + culture);\r\n return;\r\n }\r\n\r\n item.translations.push(new SpecializedLocalization(culture, translation));\r\n }\r\n\r\n /**\r\n * Partendo da una cache di localizzazione, dato un testo che può essere o meno un token, cerca quell'elemento all'interno della cache\r\n * \r\n * @param {string} text Testo da cercare nella **LocCache**\r\n * @param {boolean} allowtokens Indica se l'elemento cercato può essere un token o se dev'essere per forza una frase (per evitare rari \r\n * casi di collisione in cui magari un token è uguale a una frase tradotta)\r\n * \r\n * @returns {ItemLocalization} Informazioni di localizzazione per il **text** cercato\r\n */\r\n public get(text: string, allowtokens: boolean): ItemLocalization {\r\n let possibleItem: ItemLocalization = this.LocCache[text];\r\n var item = possibleItem && (allowtokens || !possibleItem.token) ? possibleItem : null;\r\n return item;\r\n }\r\n\r\n /**\r\n * Date le informazioni di localizzazione per un testo cerca e restituisce la traduzione per una lingua specifica\r\n * \r\n * @param {ItemLocalization} Informazioni di localizzazione\r\n * @param {string} culture Lingua della traduzione richiesta\r\n * \r\n * @returns {SpecializedLocalization} Informazioni di localizzazione specifiche della lingua richiesta\r\n */\r\n public translationByCulture(item: ItemLocalization, culture: string): SpecializedLocalization {\r\n for (let i = 0; i < item.translations.length; i++) {\r\n let trl = item.translations[i];\r\n if (trl.culture == culture)\r\n return trl;\r\n }\r\n\r\n return null;\r\n }\r\n}","\r\nexport enum BaseLocalizationTokens {\r\n getDateMonthPosition = \"getDateMonthPosition\",\r\n getDisplayDateMonthPosition = \"getDisplayDateMonthPosition\",\r\n getLocale = \"getLocale\",\r\n getSmallDateFormat = \"getSmallDateFormat\",\r\n getDefaultDateFormat = \"getDefaultDateFormat\",\r\n getSmallDateDisplayFormat = \"getSmallDateDisplayFormat\",\r\n getFullDateFormat = \"getFullDateFormat\",\r\n getFullDateDisplayFormat = \"getFullDateDisplayFormat\",\r\n getFullDateFormatNoSeconds = \"getFullDateFormatNoSeconds\",\r\n getFullDateDisplayFormatNoSeconds = \"getFullDateDisplayFormatNoSeconds\"\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { LocalizationMissingPolicy } from \"./models/LocalizationMissingPolicy\"\r\n\r\n/** Locale da utilizzare per le traduzioni */\r\nexport const LOC_LOCALE: InjectionToken<string> = new InjectionToken<string>('LOC_LOCALE');\r\n\r\n/** Policy da utilizzare per traduzioni mancanti */\r\nexport const LOC_MISSING_POLICY: InjectionToken<LocalizationMissingPolicy> = new InjectionToken<LocalizationMissingPolicy>('LOC_MISSING_POLICY');\r\n\r\n/** Modalità di Debug */\r\nexport const LOC_DEBUG_MODE: InjectionToken<boolean> = new InjectionToken<boolean>('LOC_DEBUG_MODE');","import { Observable } from \"rxjs\";\r\n\r\n/** Classe astratta che rappresenta lo stato di persistenza fra la libreria e uno storage */\r\nexport abstract class LocalePersistor {\r\n\r\n /** Chiave su cui salvare il locale */\r\n protected LOCALE: string = \"LOCALE\";\r\n\r\n /**\r\n * Salva il Locale\r\n * \r\n * @param {string} locale Locale da salvare\r\n */\r\n public abstract persist(locale: string): Observable<boolean>;\r\n\r\n /**\r\n * Recupera il Locale\r\n * \r\n * @returns {Observable<string>} Valore salvato per il locale\r\n */\r\n public abstract recover(): Observable<string>;\r\n}","import { Inject, Injectable } from \"@angular/core\";\r\nimport { ItemLocalization } from \"../models/ItemLocalization\";\r\nimport { LocalizationPersistor } from \"./localization.persistor\";\r\nimport { BaseLocalizationTokens } from \"../models/BaseLocalizationTokens\";\r\nimport { LocalePersistor } from \"../locale-persistor/LocalePersistor\";\r\nimport { take } from \"rxjs/operators\";\r\nimport { ReplaySubject } from \"rxjs\";\r\nimport { LOC_LOCALE } from \"../tokens\";\r\n\r\n/**\r\n * Classe singleton che contiene le traduzioni di base (per evitare di ripeterle in oggi classe di traduzione) e le funzioni base per \r\n * inserire e leggere traduzioni in/da una cache\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class BaseLocalization {\r\n\r\n /**\r\n * Cache di tutte le localizzazioni di base\r\n */\r\n public LocCache: { [id: string]: ItemLocalization } = {};\r\n\r\n /**\r\n * Persistor delle localizzazioni relativo a questa classe\r\n */\r\n public Persistor: LocalizationPersistor;\r\n\r\n /**\r\n * Locale di riferimento per tutte le traduzioni\r\n */\r\n public Locale: ReplaySubject<string> = new ReplaySubject<string>(1);\r\n\r\n /**\r\n * Costruttore. Da qui utilizzando il metodo statico **BaseLocalization.set** si va a popolare la cache delle traduzioni **BaseTranslations**\r\n */\r\n constructor(public LocalePersistor: LocalePersistor, @Inject(LOC_LOCALE) defaultLocale: string) {\r\n\r\n // Recupero il locale alla partenza del BaseLocalization in modo, spero di dare tempo all'applicazione di tirarlo su\r\n this.LocalePersistor.recover().pipe(take(1)).subscribe(async l => {\r\n if (!l) {\r\n l = defaultLocale;\r\n this.LocalePersistor.persist(defaultLocale);\r\n }\r\n this.Locale.next(l)\r\n });\r\n\r\n this.Persistor = new LocalizationPersistor(this.LocCache); \r\n\r\n this.Persistor.set(\"it->en\", \"Sì\", [\"Yes\"]);\r\n this.Persistor.set(\"it->en\", \"No\", [\"No\"]);\r\n this.Persistor.set(\"it->en\", \"Errore\", [\"Error\"]);\r\n this.Persistor.set(\"it->en\", \"Avviso\", [\"Warning\"]);\r\n this.Persistor.set(\"it->en\", \"Informazione\", [\"Information\"]);\r\n this.Persistor.set(\"it->en\", \"Salva\", [\"Save\"]);\r\n this.Persistor.set(\"it->en\", \"Indietro\", [\"Back\"]);\r\n this.Persistor.set(\"it->en\", \"Da\", [\"From\"]);\r\n this.Persistor.set(\"it->en\", \"A\", [\"To\"]);\r\n this.Persistor.set(\"it->en\", \"Note\", [\"Notes\"]);\r\n this.Persistor.set(\"it->en\", \"Modifica Note\", [\"Edit Notes\"]);\r\n this.Persistor.set(\"it->en\", \"Annulla\", [\"Cancel\"]);\r\n this.Persistor.set(\"it->en\", \"Conferma\", [\"Confirm\"]);\r\n this.Persistor.set(\"it->en\", \"Visualizza\", [\"View\"]);\r\n this.Persistor.set(\"it->en\", \"Elimina\", [\"Delete\"]);\r\n this.Persistor.set(\"it->en\", \"Chiudi\", [\"Close\"]);\r\n this.Persistor.set(\"it->en\", \"Seleziona\", [\"Select\"]);\r\n this.Persistor.set(\"it->en\", \"Elettricità\", [\"Electricity\"]);\r\n this.Persistor.set(\"it->en\", \"Gas\", [\"Gas\"]);\r\n this.Persistor.set(\"it->en\", \"Acqua\", [\"Water\"]);\r\n this.Persistor.set(\"it->en\", \"Questa operazione non può essere annullata\", [\"This operation cannot be reverted\"]);\r\n this.Persistor.set(\"it->en\", \"Nascondi\", [\"Hide\"]);\r\n\r\n // Informazioni sulle date\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getDateMonthPosition, \"0\", [\"1\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getDisplayDateMonthPosition, \"1\", [\"1\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getLocale, \"en-US\", [\"it-IT\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getSmallDateFormat, \"MM/DD/YYYY\", [\"DD/MM/YYYY\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getDefaultDateFormat, \"MM/DD/YYYY\", [\"MM/DD/YYYY\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getSmallDateDisplayFormat, \"DD/MM/YYYY\", [\"DD/MM/YYYY\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getFullDateFormat, \"MM/DD/YYYY HH:mm:ss\", [\"DD/MM/YYYY HH:mm:ss\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getFullDateDisplayFormat, \"DD/MM/YYYY HH:mm:ss\", [\"DD/MM/YYYY HH:mm:ss\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getFullDateFormatNoSeconds, \"MM/DD/YYYY HH:mm\", [\"DD/MM/YYYY HH:mm\"]);\r\n this.Persistor.setToken(\"en->it\", BaseLocalizationTokens.getFullDateDisplayFormatNoSeconds, \"DD/MM/YYYY HH:mm\", [\"DD/MM/YYYY HH:mm\"]);\r\n }\r\n}","\r\n/** \r\n * Enum che rappresenta le policy di comportamento qualore il sistema di localizzazione non trovi la localizzazione cercata, \r\n * usare **ThrowException** solo se ci si sente infallibili o si vuole debuggare in maniera approfondita l'applicazione \r\n */\r\nexport enum LocalizationMissingPolicy {\r\n PrintEmpty,\r\n PrintSource,\r\n PrintSourceWithoutWarnings,\r\n ThrowException\r\n}\r\n","import { Injectable, Injector, Type } from '@angular/core';\r\nimport { BaseLocalization } from './core/localization.base';\r\nimport { ItemLocalization } from './models/ItemLocalization';\r\nimport { LocalizationPersistor } from './core/localization.persistor';\r\nimport { LocalePersistor } from './locale-persistor/LocalePersistor';\r\nimport { LOC_MISSING_POLICY } from './tokens';\r\nimport { LocalizationMissingPolicy } from './models/LocalizationMissingPolicy';\r\nimport { LocaleDefinitions } from './models/LocaleDefinitions';\r\n\r\n/**\r\n * Classe di localizzazione estendibile che permette di specificare le proprie localizzazioni e comunque rendere disponibili le localizzazioni globali\r\n */\r\n@Injectable()\r\nexport class LocalizationService {\r\n\r\n /**\r\n * Cache di tutte le localizzazioni disonibili all'interno di questa classe\r\n */\r\n private TranslationCache: { [id: string]: ItemLocalization } = {};\r\n\r\n public Locale: string;\r\n public SmallLocale: string;\r\n\r\n private baseLocalization: BaseLocalization;\r\n private onMissing: LocalizationMissingPolicy\r\n private Persistor: LocalizationPersistor;\r\n private LocalePersistor: LocalePersistor;\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {string} Locale Locale da utilizzare nel momento che questo servizio richiede le traduzioni\r\n * @param {baseLocalization} baseLocalization Classe base di localizzazione già fornita a livello di root dalla libreria stessa. \r\n * È sufficiente iniettarla nell'eventuale costruttore che estende questa classe e passarla as-is\r\n */\r\n constructor(private injector: Injector) {\r\n this.LocalePersistor = this.injector.get(LocalePersistor);\r\n this.baseLocalization = this.injector.get(BaseLocalization);\r\n this.onMissing = this.injector.get(LOC_MISSING_POLICY);\r\n\r\n this.Persistor = new LocalizationPersistor(this.TranslationCache);\r\n\r\n this.baseLocalization.Locale.subscribe(lr => {\r\n this.Locale = lr;\r\n this.SmallLocale = LocaleDefinitions.getByAlias(lr).smallVersion;\r\n });\r\n }\r\n\r\n /**\r\n * Genera un nuovo servizio di localizzazione data una classe in modo che le localizzazioni non siano più solo da provide-are a livello di componente, ma possano\r\n * anche essere create al volo dal componente/servizio/qualsiasicosa che le deve utilizzare\r\n * \r\n * @param {Type<LocalizationService>} lcst Classe da usare per crare il nuovo servizio di localizzazione\r\n */\r\n public generateFromType(lcst: Type<LocalizationService>): LocalizationService {\r\n const injector = Injector.create({\r\n providers: [\r\n { provide: LOC_MISSING_POLICY, useValue: this.onMissing},\r\n { provide: BaseLocalization, useValue: this.baseLocalization},\r\n { provide: LocalePersistor, useValue: this.LocalePersistor},\r\n { provide: LocalizationService, useClass: lcst }\r\n ]\r\n });\r\n return injector.get(LocalizationService);\r\n }\r\n\r\n /**\r\n * Imposta la localizzazione di un token all'interno della **TranslationCache**\r\n * \r\n * @param {string} direction Direzione della traduzione, rappresenta la lingua base in cui aspettarsi il testo e le varie lingue in cui viene tradotta.\r\n * Ad esempio, \"en->it\" indica che il parametro **left** è valido per le localizzazioni in inglese, mentre nell'elemento 0 del parametro **right** \r\n * è presente l'unica traduzione in italiano, per definire più traduzioni sul lato destro della freccia bisogna concatenarle con la virgola, ad esempio \"en->it,jp,ecc\"\r\n * @param {string} token Nome del token\r\n * @param {string} left Valore del token per la lingua specificata nel lato immediatamente sinistro alla freccia del parametro **direction**\r\n * @param {string} right Array con i valori facenti riferimento all'N-esima lingua del lato destro del parametro **direction**\r\n */\r\n protected setToken(direction: string, token: string, left: string, right: string[]) {\r\n this.Persistor.setToken(direction, token, left, right);\r\n }\r\n\r\n /**\r\n * Imposta la localizzazione di una frase all'interno della **TranslationCache**\r\n * \r\n * @param {string} direction Direzione della traduzione, rappresenta la lingua base in cui aspettarsi il testo e le varie lingue in cui viene tradotta.\r\n * Ad esempio, \"en->it\" indica che il parametro **left** è valido per le localizzazioni in inglese, mentre nell'elemento 0 del parametro **right** \r\n * è presente l'unica traduzione in italiano, per definire più traduzioni sul lato destro della freccia bisogna concatenarle con la virgola, ad esempio \"en->it,jp,ecc\"\r\n * @param {string} left Valore della frase per la lingua specificata nel lato immediatamente sinistro alla freccia del parametro **direction**\r\n * @param {string} right Array con i valori facenti riferimento all'N-esima lingua del lato destro del parametro **direction**\r\n */\r\n protected set(direction: string, left: string, right: string[]) {\r\n // Controlla di non reinserire la stessa localizzazione presente nel BaseLocalization\r\n // i controlli per il non reinserimento della stessa localizzazione all'interno della stessa istanza è fatto lato Persistor\r\n if (this.baseLocalization.Persistor.get(left, false)) {\r\n if(this.onMissing != LocalizationMissingPolicy.PrintSourceWithoutWarnings)\r\n console.warn(`La localizzazione per ${left} è già presente fra le localizzazioni base, ignoro l'operazione`);\r\n return;\r\n }\r\n this.Persistor.set(direction, left, right);\r\n }\r\n\r\n /**\r\n * Localizza un token\r\n * \r\n * @param {string} text Il token da localizzare\r\n * \r\n * @returns {string} Token localizzato\r\n */\r\n public token(text: string): string {\r\n return this.loc(text, true);\r\n }\r\n\r\n /**\r\n * Localizza una frase\r\n * \r\n * @param {string} text Frase da localizzare\r\n * @param {boolean} allowtokens Indica se la frase **text** potrebbe essere un token o no\r\n * \r\n * @returns {string} Frase localizzata\r\n */\r\n public loc(text: string, allowtokens?: boolean): string {\r\n if (!this.Locale)\r\n throw \"Il sistema di localizzazione non ha ancora caricato il Locale, assicurarsi di caricare l'APP solo al retrieve del locale'\";\r\n\r\n if (!text || text == \"undefined\")\r\n return \"\";\r\n\r\n // Prendo la localizzazione o dalla cache attuale o dalla cache del servizio base\r\n var item = this.Persistor.get(text, allowtokens) || this.baseLocalization.Persistor.get(text, allowtokens);\r\n if (!item) {\r\n let message = `Impossibile trovare la localizzazione per '${text}'`;\r\n switch (this.onMissing) {\r\n case LocalizationMissingPolicy.PrintEmpty:\r\n console.error(message);\r\n return \"\";\r\n case LocalizationMissingPolicy.PrintSource:\r\n console.warn(message);\r\n return text;\r\n case LocalizationMissingPolicy.PrintSourceWithoutWarnings:\r\n return text;\r\n case LocalizationMissingPolicy.ThrowException:\r\n throw message;\r\n }\r\n }\r\n\r\n var loc = this.Persistor.translationByCulture(item, this.Locale);\r\n if (!loc) {\r\n console.error(\"Impossibile trovare la localizzazione per '\" + text + \"', culture \" + this.Locale);\r\n return \"\";\r\n }\r\n\r\n return loc.translation;\r\n }\r\n\r\n public async changeLocale(newLocale: string) {\r\n let locale = await this.LocalePersistor.recover().toPromise();\r\n if (newLocale == locale) {\r\n console.info(\"Il locale richiesto è lo stesso del locale attuale. Ignoro l'operazione\");\r\n return;\r\n }\r\n else {\r\n await this.LocalePersistor.persist(newLocale).toPromise();\r\n location.reload();\r\n }\r\n }\r\n}","// Angular\r\nimport { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { LocalizationService } from '../localizations.service';\r\n\r\n/**\r\n * Pipe di localizzazione per tradurre direttamente da template\r\n */\r\n@Pipe({\r\n name: \"localize\", pure: true,\r\n standalone: false\r\n})\r\nexport class LocalizePipe implements PipeTransform {\r\n\r\n /**\r\n * Costruttore\r\n * \r\n * @param {LocalizationService} translationContainer Container delle traduzioni disponibili nel contesto in cui viene usata la pipe.\r\n * \r\n * Viene iniettata dal provider dichiarato nel singolo componente che utilizza la traduzione e, se non esiste, viene iniettato dal default\r\n */\r\n constructor(private translationContainer: LocalizationService) { }\r\n\r\n /**\r\n * Trasformazione della stringa in input ad una stringa tradotta\r\n * \r\n * @param {string} value Testo da tradurre\r\n * @param {LocalizationService} locContainerOverride Override al contenitore della traduzione iniettato dal costruttore, qualora serva\r\n * \r\n * @returns {string} Frase tradotta\r\n */\r\n transform(value: string, locContainerOverride?: LocalizationService): string {\r\n if (value == null || value === \"\") return \"\";\r\n\r\n return (locContainerOverride || this.translationContainer).loc(value);\r\n }\r\n}","// Angular\r\nimport { Injectable } from \"@angular/core\";\r\n\r\n// RXJS\r\nimport { Observable, of } from \"rxjs\";\r\nimport { first } from \"rxjs/operators\";\r\nimport { LocalePersistor } from \"./LocalePersistor\";\r\n\r\n@Injectable()\r\nexport class LocalStorageLocalePersistor extends LocalePersistor {\r\n\r\n /** @ignore Vedi classe base */\r\n public persist(locale: string): Observable<boolean> {\r\n if (!localStorage) {\r\n console.error(\"Local storage does not xist. This doesn't seem to be a browser environment. Please implement the LocalePersistor, otherwise it will fallback to the browser's LocalStorage\");\r\n return of(true).pipe(first());\r\n }\r\n localStorage.setItem(this.LOCALE, locale);\r\n return of(true).pipe(first());\r\n }\r\n\r\n /** @ignore Vedi classe base */\r\n public recover(): Observable<string> {\r\n if (!localStorage) {\r\n console.error(\"Local storage does not exist. This doesn't seem to be a browser environment. Please implement the LocalePersistor, otherwise it will fallback to the browser's LocalStorage\")\r\n return of(\"\").pipe(first());\r\n }\r\n var ret = localStorage.getItem(this.LOCALE);\r\n return of(ret).pipe(first());\r\n }\r\n}","// Angular\r\nimport { NgModule, ModuleWithProviders } from '@angular/core';\r\n\r\n// Pipe\r\nimport { LocalizePipe } from './pipes/localize.pipe';\r\n\r\n// Servizi\r\nimport { LocalizationService } from './localizations.service';\r\nimport { BaseLocalization } from './core/localization.base';\r\nimport { LocalePersistor } from './locale-persistor/LocalePersistor';\r\nimport { LocalStorageLocalePersistor } from './locale-persistor/LocalStorageCachePersistor';\r\n\r\n// Modelli\r\nimport { LocalizationModuleConfig } from './models/LocalizationModuleConfig';\r\nimport { LocalizationMissingPolicy } from './models/LocalizationMissingPolicy';\r\nimport { LOC_DEBUG_MODE, LOC_LOCALE, LOC_MISSING_POLICY } from './tokens';\r\n\r\n@NgModule({\r\n declarations: [LocalizePipe],\r\n exports: [LocalizePipe]\r\n})\r\nexport class LocalizationModule {\r\n static forRoot(config?: LocalizationModuleConfig): ModuleWithProviders<LocalizationModule> {\r\n return {\r\n ngModule: LocalizationModule,\r\n providers: [\r\n LocalizationService,\r\n BaseLocalization,\r\n { provide: LOC_LOCALE, useValue: config?.defaultLocale || 'it-IT' },\r\n { provide: LOC_MISSING_POLICY, useValue: config?.localizationMissingPolicy || LocalizationMissingPolicy.PrintEmpty},\r\n { provide: LocalePersistor, useClass: config?.localePersistor || LocalStorageLocalePersistor },\r\n { provide: LOC_DEBUG_MODE, useValue: config?.debugMode || false },\r\n ]\r\n };\r\n }\r\n}","import { Type } from \"@angular/core\";\r\nimport { LocalePersistor } from \"../locale-persistor/LocalePersistor\";\r\nimport { LocalizationMissingPolicy } from \"./LocalizationMissingPolicy\";\r\n\r\n/**\r\n * Classe di configurazione per il modulo di localizzazione\r\n */\r\nexport class LocalizationModuleConfig {\r\n\r\n /** Locale di default utilizzato per richiedere le traduzioni */\r\n defaultLocale?: string;\r\n\r\n /**\r\n * Classe che si deve occupare dello store \"Definitivo\" delle info sul locale utilizzato. Di default viene proposto uno store lato localStorage ma si può facilmente \r\n * fornire uno storage che porta le informazioni lato Database in modo da avere la stessa lingua fino a che non viene cambiata (Es. Preference storage)\r\n */\r\n localePersistor?: Type<LocalePersistor>;\r\n\r\n /** Policy di cosa fare in caso il sistema non riesca a trovare una delle traduzioni */\r\n localizationMissingPolicy?: LocalizationMissingPolicy\r\n\r\n /** Attiva la modalità di debug per l'esposizione di messaggi significativi */\r\n debugMode?: boolean;\r\n}","/*\r\n * Public API Surface of localizations\r\n */\r\n\r\nexport * from './lib/core/localization.base';\r\nexport * from './lib/localizations.module';\r\nexport * from './lib/localizations.service';\r\nexport * from './lib/pipes/localize.pipe';\r\nexport * from './lib/locale-persistor/LocalePersistor';\r\nexport * from './lib/tokens';\r\nexport * from './lib/models/LocalizationModuleConfig';\r\nexport * from './lib/models/BaseLocalizationTokens';\r\nexport * from './lib/models/LocalizationMissingPolicy';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.LocalizationService"],"mappings":";;;;;AAEA;;AAEG;MACU,gBAAgB,CAAA;AAE3B;;;;;;AAMG;AACH,IAAA,WAAA,CAAmB,KAAc,EAAS,QAAgB,EAAS,YAAuC,EAAA;QAAvF,IAAA,CAAA,KAAK,GAAL,KAAK;QAAkB,IAAA,CAAA,QAAQ,GAAR,QAAQ;QAAiB,IAAA,CAAA,YAAY,GAAZ,YAAY;IAA8B;AAC9G;;ACdD;;AAEG;MACU,YAAY,CAAA;AAErB;;;;;;;AAOG;AACH,IAAA,WAAA,CAAmB,EAAU,EAAS,WAAmB,EAAS,OAAiB,EAAS,YAAoB,EAAA;QAA7F,IAAA,CAAA,EAAE,GAAF,EAAE;QAAiB,IAAA,CAAA,WAAW,GAAX,WAAW;QAAiB,IAAA,CAAA,OAAO,GAAP,OAAO;QAAmB,IAAA,CAAA,YAAY,GAAZ,YAAY;IAAY;AACvH;;ACbD;MACa,iBAAiB,CAAA;;aAGZ,IAAA,CAAA,WAAW,GAAsC,EAAE,CAAC;;AAGlE,IAAA,WAAA,GAAA,EAAgB;;AAGF,IAAA,SAAA,IAAA,CAAA,gBAAgB,GAAmB;AAC7C,QAAA,IAAI,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC;AAC5D,QAAA,IAAI,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI;KAC7D,CAAC;AAEF;;;;;;AAMG;IACI,OAAO,U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aseLocalizationTokens {
|
|
|
290
290
|
getFullDateDisplayFormatNoSeconds = "getFullDateDisplayFormatNoSeconds"
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
export { BaseLocalization, BaseLocalizationTokens, LOC_DEBUG_MODE, LOC_LOCALE, LOC_MISSING_POLICY, LocalizationMissingPolicy, LocalizationModule, LocalizationModuleConfig, LocalizationService, LocalizePipe };
|
|
293
|
+
export { BaseLocalization, BaseLocalizationTokens, LOC_DEBUG_MODE, LOC_LOCALE, LOC_MISSING_POLICY, LocalePersistor, LocalizationMissingPolicy, LocalizationModule, LocalizationModuleConfig, LocalizationService, LocalizePipe };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esfaenza/localizations",
|
|
3
|
-
"version": "20.3.
|
|
3
|
+
"version": "20.3.4",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.0.0"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@angular/common": "^20.3.
|
|
9
|
-
"@angular/core": "^20.3.
|
|
8
|
+
"@angular/common": "^20.3.24",
|
|
9
|
+
"@angular/core": "^20.3.24"
|
|
10
10
|
},
|
|
11
11
|
"module": "fesm2022/esfaenza-localizations.mjs",
|
|
12
12
|
"typings": "index.d.ts",
|