@steedos/i18n 2.2.52 → 2.2.53-beta.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.
@@ -0,0 +1,3 @@
1
+ export declare const InitCoreI18n: () => void;
2
+ export declare const InitCoreTranslations: () => void;
3
+ export declare const loadCoreTranslations: () => any;
@@ -0,0 +1,2 @@
1
+ export declare const exportObjectI18n: (req: any, res: any) => Promise<void>;
2
+ export declare const toYml: (date: StringMap, options?: any) => any;
@@ -0,0 +1,8 @@
1
+ export declare const translationI18nMenus: (lng: string, menus: Array<any>) => void;
2
+ export declare const translationI18nApps: (lng: string, apps: StringMap) => void;
3
+ export declare const getAppI18nTemplate: (lng: string, appId: string, _app: StringMap) => {};
4
+ export declare const appFallbackKeys: {
5
+ getAppLabelKey: (appId: any) => string;
6
+ getAppDescriptionKey: (appId: any) => string;
7
+ getMenuLabelKey: (menuId: any) => string;
8
+ };
@@ -0,0 +1,13 @@
1
+ export declare const translationI18nObject: (lng: string, objectName: string, object: StringMap) => void;
2
+ export declare const addObjectsI18n: (i18nArray: any) => void;
3
+ export declare const translationI18nObjects: (lng: string, objects: StringMap) => void;
4
+ export declare const getObjectI18nTemplate: (lng: string, objectName: string, _object: StringMap) => {};
5
+ export declare const fallbackKeys: {
6
+ getObjectLabelKey: (objectName: any) => string;
7
+ getObjectFieldLabelKey: (objectName: any, name: any) => string;
8
+ getObjectFieldInlineHelpTextLabelKey: (objectName: any, name: any) => string;
9
+ getObjectFieldGroupKey: (objectName: any, name: any) => string;
10
+ getObjectFieldOptionsLabelKey: (objectName: any, name: any, value: any) => string;
11
+ getObjectActionLabelKey: (objectName: any, name: any) => string;
12
+ getObjectListviewLabelKey: (objectName: any, name: any) => string;
13
+ };
package/lib/index.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ export declare const _t: (key: any, options: StringMap) => any;
2
+ export declare const t: (key: any, parameters: any, locale: string) => any;
3
+ /**
4
+ * Adds a complete bundle.
5
+ * Setting deep (default false) param to true will extend existing translations in that file. Setting deep and overwrite (default false) to true it will overwrite existing translations in that file.
6
+ * So omitting deep and overwrite will overwrite all existing translations with the one provided in resources. Using deep you can choose to keep existing nested translation and to overwrite those with the new ones.
7
+ * @param lng
8
+ * @param ns
9
+ * @param resources
10
+ * @param deep
11
+ * @param overwrite
12
+ */
13
+ export declare const addResourceBundle: (lng: string, ns: string, resources: any, deep?: boolean, overwrite?: boolean) => any;
14
+ export declare const getResourceBundle: (lng: string, ns: string) => any;
15
+ export declare const getDataByLanguage: (lng: string) => any;
16
+ export declare const exists: (key: string, options: StringMap) => any;
17
+ export declare const changeLanguage: (lng: string, options?: any, callback?: Callback) => any;
18
+ export declare const format: (value: any, format?: string, lng?: string) => any;
19
+ export declare const getLanguages: () => any;
20
+ export declare const loadLanguages: (lngs: any, callback: any) => any;
21
+ export declare const loadNamespaces: (ns: any, callback: any) => any;
22
+ export declare const on: (event: events, listener: (...args: any[]) => void) => any;
23
+ export declare const off: (event: string, listener: (...args: any[]) => void) => any;
24
+ export * from './i18n/i18n';
25
+ export * from './i18n/i18n.app';
26
+ export * from './translations';
@@ -0,0 +1 @@
1
+ export declare const locales: (req: any, res: any) => Promise<void>;
@@ -0,0 +1,6 @@
1
+ export declare const initExportObjectI18nTemplateRouter: ({ app }: {
2
+ app: any;
3
+ }) => void;
4
+ export declare const initLocalesRouter: ({ app }: {
5
+ app: any;
6
+ }) => void;
@@ -0,0 +1,24 @@
1
+ export * from './objectTranslation';
2
+ export * from './translation';
3
+ export * from './templates/objectTranslation';
4
+ export * from './templates/translation';
5
+ export declare const convertObject: (object: StringMap) => void;
6
+ export declare enum SteedosTranslationPrefixKeys {
7
+ Object = "CustomObject",
8
+ Field = "CustomField",
9
+ Action = "CustomAction",
10
+ Listview = "CustomListview",
11
+ Permission = "CustomPermission",
12
+ ValidationRule = "CustomValidationRule",
13
+ Application = "CustomApplication",
14
+ Permissionset = "CustomPermissionset",
15
+ Profile = "CustomProfile",
16
+ Report = "CustomReport",
17
+ Workflow = "Workflow",
18
+ Layout = "Layout",
19
+ Client = "Client",
20
+ Server = "Server",
21
+ Function = "Function",
22
+ Router = "Router",
23
+ Trigger = "Trigger"
24
+ }
@@ -0,0 +1,5 @@
1
+ export declare const translationObjectLabel: (lng: any, name: any, def: any) => any;
2
+ export declare const translationObject: (lng: string, objectName: string, object: StringMap, convert?: boolean, ignoreBase?: boolean) => any;
3
+ export declare const translationObjects: (lng: string, objects: StringMap) => void;
4
+ export declare const getObjectTranslationTemplate: (lng: string, objectName: string, _object: StringMap) => {};
5
+ export declare const addObjectsTranslation: (i18nArray: any) => void;
@@ -0,0 +1,3 @@
1
+ export declare const getObjectMetadataTranslationTemplate: (lng: string, objectName: string, _object: StringMap, ignoreBase?: boolean) => {
2
+ name: string;
3
+ };
@@ -0,0 +1,5 @@
1
+ export declare const getAppMetadataTranslationTemplate: (lng: string, appId: string, _app: StringMap) => {
2
+ CustomApplications: {
3
+ [x: string]: {};
4
+ };
5
+ };
@@ -0,0 +1,7 @@
1
+ export declare const translationApp: (lng: string, appId: string, app: StringMap) => void;
2
+ export declare const translationMenus: (lng: string, menus: Array<any>) => void;
3
+ export declare const translationApps: (lng: string, apps: StringMap) => void;
4
+ export declare const getAppTranslationTemplate: (lng: string, appId: string, _app: StringMap) => {};
5
+ export declare function convertTranslationData(record: any): any;
6
+ export declare const convertTranslation: (_translation: any) => {};
7
+ export declare const addTranslations: (translations: any) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@steedos/i18n",
3
3
  "private": false,
4
- "version": "2.2.52",
4
+ "version": "2.2.53-beta.4",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "scripts": {
@@ -11,9 +11,10 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@steedos/cachers": "2.2.52",
14
+ "@steedos/cachers": "2.2.53-beta.4",
15
15
  "i18next": "^19.3.4",
16
- "i18next-sprintf-postprocessor": "^0.2.2"
16
+ "i18next-sprintf-postprocessor": "^0.2.2",
17
+ "underscore": "1.13.4"
17
18
  },
18
19
  "devDependencies": {
19
20
  "typescript": "4.6.3"
@@ -21,5 +22,5 @@
21
22
  "publishConfig": {
22
23
  "access": "public"
23
24
  },
24
- "gitHead": "1447c9ca4fb57a49233704f50a7d757aff0c5027"
25
+ "gitHead": "4e43f69e542667e1b83485832a65bfa12371786a"
25
26
  }