@zohodesk/i18n 1.0.0-beta.20 → 1.0.0-beta.22
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/README.md +89 -80
- package/es/components/DateTimeDiffFormat.js +2 -1
- package/es/components/HOCI18N.js +1 -1
- package/es/components/I18N.js +1 -0
- package/es/components/PluralFormat.js +1 -1
- package/es/components/__tests__/I18N.spec.js +1 -1
- package/es/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
- package/es/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
- package/es/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
- package/es/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
- package/es/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
- package/es/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
- package/es/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
- package/lib/components/DateTimeDiffFormat.js +4 -3
- package/lib/components/FormatText.js +2 -2
- package/lib/components/HOCI18N.js +3 -3
- package/lib/components/I18N.js +3 -2
- package/lib/components/I18NProvider.js +2 -2
- package/lib/components/PluralFormat.js +3 -3
- package/lib/components/UserTimeDiffFormat.js +2 -2
- package/lib/components/__tests__/I18N.spec.js +1 -1
- package/lib/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
- package/lib/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
- package/lib/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
- package/lib/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
- package/lib/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
- package/lib/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
- package/lib/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
- package/package.json +29 -29
- package/src/I18NContext.js +2 -2
- package/src/components/DateTimeDiffFormat.js +256 -256
- package/src/components/FormatText.js +14 -14
- package/src/components/HOCI18N.js +37 -37
- package/src/components/I18N.js +73 -72
- package/src/components/I18NProvider.js +110 -110
- package/src/components/PluralFormat.js +37 -37
- package/src/components/UserTimeDiffFormat.js +97 -97
- package/src/components/__tests__/DateTimeDiffFormat.spec.js +618 -618
- package/src/components/__tests__/FormatText.spec.js +26 -26
- package/src/components/__tests__/HOCI18N.spec.js +33 -33
- package/src/components/__tests__/I18N.spec.js +29 -29
- package/src/components/__tests__/I18NProvider.spec.js +65 -65
- package/src/components/__tests__/PluralFormat.spec.js +27 -27
- package/src/components/__tests__/UserTimeDiffFormat.spec.js +1076 -1076
- package/src/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
- package/src/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
- package/src/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
- package/src/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
- package/src/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
- package/src/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
- package/src/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
- package/src/index.js +33 -33
- package/src/utils.js +527 -527
package/README.md
CHANGED
|
@@ -1,80 +1,89 @@
|
|
|
1
|
-
# i18n
|
|
2
|
-
|
|
3
|
-
# 1.0.0-beta.
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
# 1.0.0-beta.
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
1
|
+
# i18n
|
|
2
|
+
|
|
3
|
+
# 1.0.0-beta.22
|
|
4
|
+
|
|
5
|
+
- Data test id added for I18N.js
|
|
6
|
+
|
|
7
|
+
# 1.0.0-beta.21
|
|
8
|
+
|
|
9
|
+
- Data test id added for dateTimedifformat.js
|
|
10
|
+
|
|
11
|
+
# 1.0.0-beta.20
|
|
12
|
+
|
|
13
|
+
- Date field issue fixed in UserTimeDiffFormat component
|
|
14
|
+
|
|
15
|
+
# 1.0.0-beta.19
|
|
16
|
+
|
|
17
|
+
- In this version we have made changes in i18n provider to call user date format function only if the time zone data is available.
|
|
18
|
+
|
|
19
|
+
# 1.0.0-beta.18
|
|
20
|
+
|
|
21
|
+
- Localization feature added and incorporated into getI18NValue Method.
|
|
22
|
+
|
|
23
|
+
# 1.0.0-beta.17
|
|
24
|
+
|
|
25
|
+
- There was some i18n changes done in live before moving the date format build to live. Since we need these changes we have published it as new version.
|
|
26
|
+
|
|
27
|
+
# 1.0.0-beta.16
|
|
28
|
+
|
|
29
|
+
- DatePattern and dateTimePattern key has been changed for the date format build.
|
|
30
|
+
|
|
31
|
+
# 1.0.0-beta.15.1
|
|
32
|
+
|
|
33
|
+
- Zoho security version updated.
|
|
34
|
+
|
|
35
|
+
# 1.0.0-beta.15
|
|
36
|
+
|
|
37
|
+
- When working on date format build we have published I18n. Also, before moving date format build to master we had a emergency fix that need to be sent, so when publishing I18n we have published the date format changes with the next version.
|
|
38
|
+
|
|
39
|
+
# 1.0.0-beta.14
|
|
40
|
+
|
|
41
|
+
- Issue fixed in enable current year.
|
|
42
|
+
|
|
43
|
+
# 1.0.0-beta.13
|
|
44
|
+
|
|
45
|
+
- Issue fixed in due date.
|
|
46
|
+
|
|
47
|
+
# 1.0.0-beta.12
|
|
48
|
+
|
|
49
|
+
- Issue fixed in date Format Pattern.
|
|
50
|
+
|
|
51
|
+
# 1.0.0-beta.11
|
|
52
|
+
|
|
53
|
+
- Date Format Changes
|
|
54
|
+
|
|
55
|
+
# 1.0.0-beta.10
|
|
56
|
+
|
|
57
|
+
- Date Format Issue Fixes
|
|
58
|
+
|
|
59
|
+
# 1.0.0-beta.9
|
|
60
|
+
|
|
61
|
+
- Date Format Changes
|
|
62
|
+
|
|
63
|
+
# 1.0.0-beta.8
|
|
64
|
+
|
|
65
|
+
- ES Module Support Changes
|
|
66
|
+
|
|
67
|
+
# 1.0.0-beta.7
|
|
68
|
+
|
|
69
|
+
- 'userDateFormat' util method - 'others' function fix
|
|
70
|
+
|
|
71
|
+
# 1.0.0-beta.6
|
|
72
|
+
|
|
73
|
+
- Added new prop 'isNeedTime' for DateTimeDiffFormat Component
|
|
74
|
+
|
|
75
|
+
# 1.0.0-beta.5
|
|
76
|
+
|
|
77
|
+
- Timezone logic moved to @zohodesk/datetimejs
|
|
78
|
+
|
|
79
|
+
# 1.0.0-beta.4
|
|
80
|
+
|
|
81
|
+
- Added new prop 'page' for DateTimeDiffFormat Component
|
|
82
|
+
|
|
83
|
+
# 1.0.0-beta.3
|
|
84
|
+
|
|
85
|
+
- Added support for exact times along with relative times in format() function
|
|
86
|
+
|
|
87
|
+
# 1.0.0-beta.0
|
|
88
|
+
|
|
89
|
+
- Test Publish
|
|
@@ -195,7 +195,8 @@ export default class DateTimeDiffFormat extends React.Component {
|
|
|
195
195
|
return text ? /*#__PURE__*/React.createElement("span", {
|
|
196
196
|
className: className,
|
|
197
197
|
"data-title": title,
|
|
198
|
-
"data-id": dataId
|
|
198
|
+
"data-id": dataId,
|
|
199
|
+
"data-test-id": dataId
|
|
199
200
|
}, text) : /*#__PURE__*/React.createElement(FormatText, {
|
|
200
201
|
i18NKey: isSuffixEnable && suffix !== '' ? `${key}.${suffix}` : key,
|
|
201
202
|
values: values,
|
package/es/components/HOCI18N.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React, { Children } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
package/es/components/I18N.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import I18N from '../I18N';
|
|
4
4
|
import I18NProvider from '../I18NProvider';
|