@zohodesk/i18n 1.0.0-beta.22 → 1.0.0-beta.24

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.
Files changed (46) hide show
  1. package/README.md +97 -89
  2. package/es/components/I18N.js +1 -0
  3. package/es/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  4. package/es/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  5. package/es/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  6. package/es/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  7. package/es/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  8. package/es/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  9. package/es/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  10. package/es/index.js +1 -1
  11. package/es/utils.js +62 -9
  12. package/lib/components/I18N.js +1 -0
  13. package/lib/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  14. package/lib/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  15. package/lib/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  16. package/lib/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  17. package/lib/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  18. package/lib/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  19. package/lib/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  20. package/lib/index.js +18 -0
  21. package/lib/utils.js +65 -9
  22. package/package.json +29 -29
  23. package/src/I18NContext.js +2 -2
  24. package/src/components/DateTimeDiffFormat.js +256 -256
  25. package/src/components/FormatText.js +14 -14
  26. package/src/components/HOCI18N.js +37 -37
  27. package/src/components/I18N.js +74 -73
  28. package/src/components/I18NProvider.js +110 -110
  29. package/src/components/PluralFormat.js +37 -37
  30. package/src/components/UserTimeDiffFormat.js +97 -97
  31. package/src/components/__tests__/DateTimeDiffFormat.spec.js +618 -618
  32. package/src/components/__tests__/FormatText.spec.js +26 -26
  33. package/src/components/__tests__/HOCI18N.spec.js +33 -33
  34. package/src/components/__tests__/I18N.spec.js +29 -29
  35. package/src/components/__tests__/I18NProvider.spec.js +65 -65
  36. package/src/components/__tests__/PluralFormat.spec.js +27 -27
  37. package/src/components/__tests__/UserTimeDiffFormat.spec.js +1076 -1076
  38. package/src/components/__tests__/__snapshots__/DateTimeDiffFormat.spec.js.snap +258 -258
  39. package/src/components/__tests__/__snapshots__/FormatText.spec.js.snap +17 -17
  40. package/src/components/__tests__/__snapshots__/HOCI18N.spec.js.snap +15 -15
  41. package/src/components/__tests__/__snapshots__/I18N.spec.js.snap +17 -17
  42. package/src/components/__tests__/__snapshots__/I18NProvider.spec.js.snap +13 -13
  43. package/src/components/__tests__/__snapshots__/PluralFormat.spec.js.snap +17 -17
  44. package/src/components/__tests__/__snapshots__/UserTimeDiffFormat.spec.js.snap +366 -366
  45. package/src/index.js +36 -33
  46. package/src/utils.js +585 -527
package/README.md CHANGED
@@ -1,89 +1,97 @@
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
1
+ # i18n
2
+
3
+ # 1.0.0-beta.24
4
+
5
+ - I18N support for Days, Months and 12-hour time variables.
6
+
7
+ # 1.0.0-beta.23
8
+
9
+ - Zoho security version updated.
10
+
11
+ # 1.0.0-beta.22
12
+
13
+ - Data test id added for I18N.js
14
+
15
+ # 1.0.0-beta.21
16
+
17
+ - Data test id added for dateTimedifformat.js
18
+
19
+ # 1.0.0-beta.20
20
+
21
+ - Date field issue fixed in UserTimeDiffFormat component
22
+
23
+ # 1.0.0-beta.19
24
+
25
+ - In this version we have made changes in i18n provider to call user date format function only if the time zone data is available.
26
+
27
+ # 1.0.0-beta.18
28
+
29
+ - Localization feature added and incorporated into getI18NValue Method.
30
+
31
+ # 1.0.0-beta.17
32
+
33
+ - 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.
34
+
35
+ # 1.0.0-beta.16
36
+
37
+ - DatePattern and dateTimePattern key has been changed for the date format build.
38
+
39
+ # 1.0.0-beta.15.1
40
+
41
+ - Zoho security version updated.
42
+
43
+ # 1.0.0-beta.15
44
+
45
+ - 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.
46
+
47
+ # 1.0.0-beta.14
48
+
49
+ - Issue fixed in enable current year.
50
+
51
+ # 1.0.0-beta.13
52
+
53
+ - Issue fixed in due date.
54
+
55
+ # 1.0.0-beta.12
56
+
57
+ - Issue fixed in date Format Pattern.
58
+
59
+ # 1.0.0-beta.11
60
+
61
+ - Date Format Changes
62
+
63
+ # 1.0.0-beta.10
64
+
65
+ - Date Format Issue Fixes
66
+
67
+ # 1.0.0-beta.9
68
+
69
+ - Date Format Changes
70
+
71
+ # 1.0.0-beta.8
72
+
73
+ - ES Module Support Changes
74
+
75
+ # 1.0.0-beta.7
76
+
77
+ - 'userDateFormat' util method - 'others' function fix
78
+
79
+ # 1.0.0-beta.6
80
+
81
+ - Added new prop 'isNeedTime' for DateTimeDiffFormat Component
82
+
83
+ # 1.0.0-beta.5
84
+
85
+ - Timezone logic moved to @zohodesk/datetimejs
86
+
87
+ # 1.0.0-beta.4
88
+
89
+ - Added new prop 'page' for DateTimeDiffFormat Component
90
+
91
+ # 1.0.0-beta.3
92
+
93
+ - Added support for exact times along with relative times in format() function
94
+
95
+ # 1.0.0-beta.0
96
+
97
+ - Test Publish
@@ -68,6 +68,7 @@ I18N.propTypes = {
68
68
  i18NKey: PropTypes.string.isRequired,
69
69
  isHtml: PropTypes.bool,
70
70
  tag: PropTypes.string,
71
+ dataId: PropTypes.string,
71
72
  values: PropTypes.oneOfType([PropTypes.string, PropTypes.array])
72
73
  };
73
74
  I18N.defaultProps = {