turbogui-angular 19.0.0 → 19.0.1
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.
|
@@ -81,32 +81,32 @@ export declare abstract class LocalesBaseService {
|
|
|
81
81
|
*/
|
|
82
82
|
getMissingKeyFormat(): string;
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
85
|
-
* After the method finishes, the class will contain all the translation data and will be ready to translate
|
|
84
|
+
* Adds translations to the class by loading and parsing bundles from the provided JSON object.
|
|
85
|
+
* After the method finishes, the class will contain all the translation data and will be ready to translate
|
|
86
|
+
* any provided key to any of the specified locales.
|
|
86
87
|
*
|
|
87
|
-
* @param
|
|
88
|
-
*
|
|
88
|
+
* @param locales An array of locale codes (e.g., ['en_US', 'es_ES', 'fr_FR']) to load from the json data into this class.
|
|
89
|
+
* The order of this array will determine the priority when looking for translations.
|
|
89
90
|
*
|
|
90
|
-
* @param
|
|
91
|
-
*
|
|
91
|
+
* @param json A JSON object containing the translation data. The structure must be as follows:
|
|
92
|
+
* { library_name: { bundle_name: { locale_code: { key1: "translation1", key2: "translation2" } } } ... }
|
|
92
93
|
*
|
|
93
94
|
* @return True if the translations get correctly loaded. Any unsuccessful initialization will throw an exception
|
|
94
95
|
*/
|
|
95
|
-
|
|
96
|
+
loadLocalesFromJson(locales: string[], json: any): boolean;
|
|
96
97
|
/**
|
|
97
98
|
* Initializes the translation system by loading and parsing bundle files from the specified translations path.
|
|
98
99
|
* After the promise finishes, the class will contain all the translation data and will be ready to translate any
|
|
99
100
|
* provided key.
|
|
100
101
|
*
|
|
101
|
-
* @param
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* @param parameters Any extra parameters to be attached to the translationsPath after the locales like /param1/param2/ etc
|
|
102
|
+
* @param locales An array of locale codes (['en_US', 'es_ES', 'fr_FR', ...]) to load from the url response.
|
|
103
|
+
* The order of this array will determine the translation priority
|
|
104
|
+
* @param url - Url where the translations are found. The response must be a Json with the expected structure:
|
|
105
|
+
* { library_name: { bundle_name: { locale_code: { key1: "translation1", key2: "translation2" } } } ... }
|
|
106
106
|
*
|
|
107
107
|
* @return A promise that will resolve if the translations get correctly loaded, or reject with an error if load fails
|
|
108
108
|
*/
|
|
109
|
-
|
|
109
|
+
loadLocalesFromUrl(locales: string[], url: string): Promise<unknown>;
|
|
110
110
|
/**
|
|
111
111
|
* Check if the class has been correctly initialized and translations have been correctly loaded
|
|
112
112
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales-base.service.d.ts","sourceRoot":"","sources":["../../../../projects/turbogui-angular/src/main/controller/locales-base.service.ts"],"names":[],"mappings":";AAYA;;;;GAIG;AACH,8BAGsB,kBAAkB;IAGpC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAS;IAG/B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAe;IAG/B;;OAEG;IACH,OAAO,CAAC,UAAU,CAAe;IAGjC;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAAU;IAGrC;;OAEG;IACH,OAAO,CAAC,eAAe,CAAU;IAGjC;;OAEG;IACH,OAAO,CAAC,gBAAgB,CAAS;IAGjC;;OAEG;IACH,OAAO,CAAC,iBAAiB,CAAgB;IAGzC;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB,CAAM;IAGlC;;;;;;;;;;;;;;;;;OAiBG;IACH,kBAAkB,CAAC,KAAK,EAAC,MAAM;IAe/B;;;;;;;;;;;;;;;OAeG;IACH,mBAAmB,CAAC,KAAK,EAAC,MAAM;IAUhC;;OAEG;IACH,mBAAmB;IAMnB
|
|
1
|
+
{"version":3,"file":"locales-base.service.d.ts","sourceRoot":"","sources":["../../../../projects/turbogui-angular/src/main/controller/locales-base.service.ts"],"names":[],"mappings":";AAYA;;;;GAIG;AACH,8BAGsB,kBAAkB;IAGpC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAS;IAG/B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAe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