@trackunit/i18n-library-translation 0.0.21 → 0.0.23
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/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@trackunit/i18n-library-translation",
|
|
3
3
|
"repository": "https://github.com/Trackunit/manager",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.23",
|
|
6
6
|
"module": "./index.js",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"i18next": "21.10.0",
|
|
14
14
|
"i18next-browser-languagedetector": "6.1.8",
|
|
15
15
|
"i18next-resources-to-backend": "1.1.0",
|
|
16
|
-
"@trackunit/iris-app-api": "0.0.
|
|
16
|
+
"@trackunit/iris-app-api": "0.0.75",
|
|
17
17
|
"@sentry/browser": "7.24.2"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {}
|
package/src/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { TranslationLanguageKeys } from "@trackunit/iris-app-api";
|
|
|
2
2
|
/**
|
|
3
3
|
* The type for TranslationResources used to handle translations across libraries and apps
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type Languages = {
|
|
6
6
|
[key in TranslationLanguageKeys]: () => Promise<{
|
|
7
7
|
default: {
|
|
8
8
|
[key: string]: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i18n, TOptions } from "i18next";
|
|
2
2
|
import { UseTranslationOptions } from "react-i18next";
|
|
3
|
-
export
|
|
3
|
+
export type TransForLibs<LibKeys> = (key: LibKeys, arg2?: string | TOptions, arg3?: string | TOptions) => string;
|
|
4
4
|
/**
|
|
5
5
|
* This is a custom Type Safe version of react-i18next useTranslation hook.
|
|
6
6
|
* Logs errors in sentry for translations keys that does not exist in english for the given namespace.
|