@nocobase/plugin-verification 0.9.0-alpha.1 → 0.9.0-alpha.2

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.
@@ -7,35 +7,30 @@ exports.NAMESPACE = void 0;
7
7
  exports.lang = lang;
8
8
  exports.useVerificationTranslation = useVerificationTranslation;
9
9
 
10
- function _reactI18next() {
11
- const data = require("react-i18next");
10
+ function _client() {
11
+ const data = require("@nocobase/client");
12
12
 
13
- _reactI18next = function _reactI18next() {
13
+ _client = function _client() {
14
14
  return data;
15
15
  };
16
16
 
17
17
  return data;
18
18
  }
19
19
 
20
- function _client() {
21
- const data = require("@nocobase/client");
20
+ function _reactI18next() {
21
+ const data = require("react-i18next");
22
22
 
23
- _client = function _client() {
23
+ _reactI18next = function _reactI18next() {
24
24
  return data;
25
25
  };
26
26
 
27
27
  return data;
28
28
  }
29
29
 
30
- var _zhCN = _interopRequireDefault(require("./zh-CN"));
31
-
32
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
+ const NAMESPACE = 'verification'; // i18n.addResources('zh-CN', NAMESPACE, zhCN);
33
31
 
34
- const NAMESPACE = 'verification';
35
32
  exports.NAMESPACE = NAMESPACE;
36
33
 
37
- _client().i18n.addResources('zh-CN', NAMESPACE, _zhCN.default);
38
-
39
34
  function lang(key) {
40
35
  return _client().i18n.t(key, {
41
36
  ns: NAMESPACE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-verification",
3
- "version": "0.9.0-alpha.1",
3
+ "version": "0.9.0-alpha.2",
4
4
  "description": "",
5
5
  "license": "AGPL-3.0",
6
6
  "main": "./lib/index.js",
@@ -9,13 +9,13 @@
9
9
  "@alicloud/dysmsapi20170525": "2.0.17",
10
10
  "@alicloud/openapi-client": "0.4.1",
11
11
  "@alicloud/tea-util": "1.4.4",
12
- "@nocobase/actions": "0.9.0-alpha.1",
13
- "@nocobase/resourcer": "0.9.0-alpha.1",
14
- "@nocobase/server": "0.9.0-alpha.1",
15
- "@nocobase/utils": "0.9.0-alpha.1"
12
+ "@nocobase/actions": "0.9.0-alpha.2",
13
+ "@nocobase/resourcer": "0.9.0-alpha.2",
14
+ "@nocobase/server": "0.9.0-alpha.2",
15
+ "@nocobase/utils": "0.9.0-alpha.2"
16
16
  },
17
17
  "devDependencies": {
18
- "@nocobase/test": "0.9.0-alpha.1"
18
+ "@nocobase/test": "0.9.0-alpha.2"
19
19
  },
20
- "gitHead": "d84c2a47c42c2ffec4fbf317d53268952fbd58d7"
20
+ "gitHead": "b8f76ad38e60e677c5bb4aab0a4cdb28d98a0f49"
21
21
  }
@@ -1,11 +1,10 @@
1
- import { useTranslation } from 'react-i18next';
2
1
  import { i18n } from '@nocobase/client';
2
+ import { useTranslation } from 'react-i18next';
3
3
 
4
- import zhCN from './zh-CN';
5
4
 
6
5
  export const NAMESPACE = 'verification';
7
6
 
8
- i18n.addResources('zh-CN', NAMESPACE, zhCN);
7
+ // i18n.addResources('zh-CN', NAMESPACE, zhCN);
9
8
 
10
9
  export function lang(key: string) {
11
10
  return i18n.t(key, { ns: NAMESPACE });