opticore-translator 1.0.0 → 1.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.
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1 -0
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
CLocal: () => CLocal,
|
|
33
34
|
TranslationLoader: () => TranslationLoader
|
|
34
35
|
});
|
|
35
36
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -132,5 +133,6 @@ TranslationLoader.defaultLocale = CLocal;
|
|
|
132
133
|
TranslationLoader.logger = new import_opticore_logger.LoggerCore(loggerConfig);
|
|
133
134
|
// Annotate the CommonJS export names for ESM import in node:
|
|
134
135
|
0 && (module.exports = {
|
|
136
|
+
CLocal,
|
|
135
137
|
TranslationLoader
|
|
136
138
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -13,7 +13,7 @@ declare class TranslationLoader {
|
|
|
13
13
|
* @param template
|
|
14
14
|
* @param params
|
|
15
15
|
*/
|
|
16
|
-
static formatMessage(template: string, params: Record<
|
|
16
|
+
static formatMessage(template: string, params: Record<any, any>): string;
|
|
17
17
|
/**
|
|
18
18
|
*
|
|
19
19
|
* @param key
|
|
@@ -23,7 +23,9 @@ declare class TranslationLoader {
|
|
|
23
23
|
* using example :
|
|
24
24
|
* const errorMessage = TranslationLoader.t('mongoServerError', 'en', { dbHost: '127.0.0.1' });
|
|
25
25
|
*/
|
|
26
|
-
static t(key: string, locale?: string, params?: Record<
|
|
26
|
+
static t(key: string, locale?: string, params?: Record<any, any>): string;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
declare const CLocal: string;
|
|
30
|
+
|
|
31
|
+
export { CLocal, TranslationLoader };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare class TranslationLoader {
|
|
|
13
13
|
* @param template
|
|
14
14
|
* @param params
|
|
15
15
|
*/
|
|
16
|
-
static formatMessage(template: string, params: Record<
|
|
16
|
+
static formatMessage(template: string, params: Record<any, any>): string;
|
|
17
17
|
/**
|
|
18
18
|
*
|
|
19
19
|
* @param key
|
|
@@ -23,7 +23,9 @@ declare class TranslationLoader {
|
|
|
23
23
|
* using example :
|
|
24
24
|
* const errorMessage = TranslationLoader.t('mongoServerError', 'en', { dbHost: '127.0.0.1' });
|
|
25
25
|
*/
|
|
26
|
-
static t(key: string, locale?: string, params?: Record<
|
|
26
|
+
static t(key: string, locale?: string, params?: Record<any, any>): string;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
declare const CLocal: string;
|
|
30
|
+
|
|
31
|
+
export { CLocal, TranslationLoader };
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opticore-translator",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "opticore translator to translate according language",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"url": "git+https://github.com/guyzoum77/opticore-translator.git"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
|
-
"opticore"
|
|
18
|
+
"opticore",
|
|
19
|
+
"opticore-translator"
|
|
19
20
|
],
|
|
20
21
|
"author": "Guy-serge Kouacou",
|
|
21
22
|
"license": "MIT",
|
|
@@ -36,4 +37,4 @@
|
|
|
36
37
|
"tsup": "^8.4.0",
|
|
37
38
|
"typescript": "^5.4.5"
|
|
38
39
|
}
|
|
39
|
-
}
|
|
40
|
+
}
|