@ooneex/translation 1.1.3 → 1.1.5
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.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +3 -3
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const locales: readonly ["ar", "bg", "cs", "da", "de", "el", "en", "eo", "es", "et", "eu", "fi", "fr", "hu", "hy", "it", "ja", "ko", "lt", "nl", "no", "pl", "pt", "ro", "ru", "sk", "sv", "th", "uk", "zh", "zh-tw"];
|
|
2
2
|
import { Exception } from "@ooneex/exception";
|
|
3
3
|
declare class TranslationException extends Exception {
|
|
4
|
-
constructor(message: string, data?: Record<string, unknown>);
|
|
4
|
+
constructor(message: string, key: string, data?: Record<string, unknown>);
|
|
5
5
|
}
|
|
6
6
|
type LocaleType = (typeof locales)[number];
|
|
7
7
|
type LocaleInfoType = {
|
package/dist/index.js
CHANGED
|
@@ -37,8 +37,9 @@ import { Exception } from "@ooneex/exception";
|
|
|
37
37
|
import { HttpStatus } from "@ooneex/http-status";
|
|
38
38
|
|
|
39
39
|
class TranslationException extends Exception {
|
|
40
|
-
constructor(message, data = {}) {
|
|
40
|
+
constructor(message, key, data = {}) {
|
|
41
41
|
super(message, {
|
|
42
|
+
key,
|
|
42
43
|
status: HttpStatus.Code.NotFound,
|
|
43
44
|
data
|
|
44
45
|
});
|
|
@@ -50,4 +51,4 @@ export {
|
|
|
50
51
|
TranslationException
|
|
51
52
|
};
|
|
52
53
|
|
|
53
|
-
//# debugId=
|
|
54
|
+
//# debugId=C1414D2FD0C9D40C64756E2164756E21
|
package/dist/index.js.map
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"sources": ["src/locales.ts", "src/TranslationException.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"export const locales = [\n \"ar\",\n \"bg\",\n \"cs\",\n \"da\",\n \"de\",\n \"el\",\n \"en\",\n \"eo\",\n \"es\",\n \"et\",\n \"eu\",\n \"fi\",\n \"fr\",\n \"hu\",\n \"hy\",\n \"it\",\n \"ja\",\n \"ko\",\n \"lt\",\n \"nl\",\n \"no\",\n \"pl\",\n \"pt\",\n \"ro\",\n \"ru\",\n \"sk\",\n \"sv\",\n \"th\",\n \"uk\",\n \"zh\",\n \"zh-tw\",\n] as const;\n",
|
|
6
|
-
"import { Exception } from \"@ooneex/exception\";\nimport { HttpStatus } from \"@ooneex/http-status\";\n\nexport class TranslationException extends Exception {\n constructor(message: string, data: Record<string, unknown> = {}) {\n super(message, {\n status: HttpStatus.Code.NotFound,\n data,\n });\n this.name = \"TranslationException\";\n }\n}\n"
|
|
6
|
+
"import { Exception } from \"@ooneex/exception\";\nimport { HttpStatus } from \"@ooneex/http-status\";\n\nexport class TranslationException extends Exception {\n constructor(message: string, key: string, data: Record<string, unknown> = {}) {\n super(message, {\n key,\n status: HttpStatus.Code.NotFound,\n data,\n });\n this.name = \"TranslationException\";\n }\n}\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": ";AAAO,IAAM,UAAU;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;AChCA;AACA;AAAA;AAEO,MAAM,6BAA6B,UAAU;AAAA,EAClD,WAAW,CAAC,SAAiB,OAAgC,CAAC,GAAG;AAAA,
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": ";AAAO,IAAM,UAAU;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;AChCA;AACA;AAAA;AAEO,MAAM,6BAA6B,UAAU;AAAA,EAClD,WAAW,CAAC,SAAiB,KAAa,OAAgC,CAAC,GAAG;AAAA,IAC5E,MAAM,SAAS;AAAA,MACb;AAAA,MACA,QAAQ,WAAW,KAAK;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACD,KAAK,OAAO;AAAA;AAEhB;",
|
|
9
|
+
"debugId": "C1414D2FD0C9D40C64756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/translation",
|
|
3
3
|
"description": "Internationalization framework with locale management, translation key resolution, and pluralization support for multi-language applications",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"wuchale": "bunx wuchale"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@ooneex/exception": "1.
|
|
33
|
-
"@ooneex/http-status": "1.1.
|
|
32
|
+
"@ooneex/exception": "1.2.0",
|
|
33
|
+
"@ooneex/http-status": "1.1.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {},
|
|
36
36
|
"keywords": [
|