locizify 5.2.9 → 5.2.11
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/CHANGELOG.md +8 -0
- package/README.md +0 -1
- package/dist/commonjs/index.js +2 -12
- package/dist/es/index.js +2 -12
- package/dist/umd/locizify.js +228 -122
- package/dist/umd/locizify.min.js +2 -2
- package/locizify.js +228 -122
- package/locizify.min.js +2 -2
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
[](https://travis-ci.org/locize/locizify)
|
|
2
2
|
[](https://coveralls.io/github/locize/locizify)
|
|
3
3
|
[](https://www.npmjs.com/package/locizify)
|
|
4
|
-
[](https://david-dm.org/locize/locizify)
|
|
5
4
|
|
|
6
5
|
# locizify
|
|
7
6
|
|
package/dist/commonjs/index.js
CHANGED
|
@@ -17,9 +17,9 @@ var _i18nextLocizeBackend = _interopRequireDefault(require("i18next-locize-backe
|
|
|
17
17
|
|
|
18
18
|
var _locize = require("locize");
|
|
19
19
|
|
|
20
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
20
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
21
|
|
|
22
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
22
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
|
|
24
24
|
var i18next = _i18nextify["default"].i18next;
|
|
25
25
|
var enforce = {
|
|
@@ -29,20 +29,10 @@ var defaults = {
|
|
|
29
29
|
reloadOnSave: true,
|
|
30
30
|
bindSavedMissing: true
|
|
31
31
|
};
|
|
32
|
-
var reloadEditorOptions = {
|
|
33
|
-
onEditorSaved: function onEditorSaved(lng, ns) {
|
|
34
|
-
i18next.reloadResources(lng, ns, function () {
|
|
35
|
-
i18next.emit('editorSaved');
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
32
|
i18next.use(_i18nextLocizeBackend["default"]).use(_locize.locizePlugin);
|
|
40
33
|
i18next.on('editorSaved', function () {
|
|
41
34
|
_i18nextify["default"].forceRerender();
|
|
42
35
|
});
|
|
43
|
-
i18next.on('languageChanged', function (lng) {
|
|
44
|
-
window.document.documentElement.lang = lng;
|
|
45
|
-
});
|
|
46
36
|
var originalInit = i18next.init;
|
|
47
37
|
|
|
48
38
|
i18next.init = function () {
|
package/dist/es/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
|
|
8
8
|
import i18nextify from 'i18nextify';
|
|
9
9
|
import LocizeBackend from 'i18next-locize-backend';
|
|
@@ -16,20 +16,10 @@ var defaults = {
|
|
|
16
16
|
reloadOnSave: true,
|
|
17
17
|
bindSavedMissing: true
|
|
18
18
|
};
|
|
19
|
-
var reloadEditorOptions = {
|
|
20
|
-
onEditorSaved: function onEditorSaved(lng, ns) {
|
|
21
|
-
i18next.reloadResources(lng, ns, function () {
|
|
22
|
-
i18next.emit('editorSaved');
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
19
|
i18next.use(LocizeBackend).use(locizePlugin);
|
|
27
20
|
i18next.on('editorSaved', function () {
|
|
28
21
|
i18nextify.forceRerender();
|
|
29
22
|
});
|
|
30
|
-
i18next.on('languageChanged', function (lng) {
|
|
31
|
-
window.document.documentElement.lang = lng;
|
|
32
|
-
});
|
|
33
23
|
var originalInit = i18next.init;
|
|
34
24
|
|
|
35
25
|
i18next.init = function () {
|