locizify 8.0.1 → 8.0.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.
- package/CHANGELOG.md +4 -0
- package/dist/umd/locizify.js +21 -7
- package/dist/umd/locizify.min.js +2 -2
- package/locizify.js +21 -7
- package/locizify.min.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/umd/locizify.js
CHANGED
|
@@ -7692,7 +7692,7 @@
|
|
|
7692
7692
|
this.isProjectNotExisting = true;
|
|
7693
7693
|
}
|
|
7694
7694
|
if (this.isProjectNotExisting) {
|
|
7695
|
-
callback(new Error(
|
|
7695
|
+
callback(new Error(this.isProjectNotExistingErrorMessage));
|
|
7696
7696
|
return deferred;
|
|
7697
7697
|
}
|
|
7698
7698
|
this.getLanguagesCalls = this.getLanguagesCalls || [];
|
|
@@ -7702,12 +7702,26 @@
|
|
|
7702
7702
|
if (!_this3.somethingLoaded && info && info.resourceNotExisting) {
|
|
7703
7703
|
_this3.isProjectNotExisting = true;
|
|
7704
7704
|
_this3.storage.setProjectNotExisting(_this3.options.projectId);
|
|
7705
|
-
var
|
|
7706
|
-
|
|
7707
|
-
_this3.
|
|
7708
|
-
|
|
7709
|
-
|
|
7705
|
+
var errMsg = "locize project ".concat(_this3.options.projectId, " does not exist!");
|
|
7706
|
+
_this3.isProjectNotExistingErrorMessage = errMsg;
|
|
7707
|
+
var cdnTypeAlt = _this3.options.cdnType === 'standard' ? 'pro' : 'standard';
|
|
7708
|
+
var otherEndpointApiPaths = getApiPaths(cdnTypeAlt);
|
|
7709
|
+
var urlAlt = interpolate(otherEndpointApiPaths.getLanguagesPath, {
|
|
7710
|
+
projectId: _this3.options.projectId
|
|
7710
7711
|
});
|
|
7712
|
+
_this3.loadUrl({}, urlAlt, function (errAlt, retAlt, infoAlt) {
|
|
7713
|
+
if (!errAlt && retAlt && (!infoAlt || !infoAlt.resourceNotExisting)) {
|
|
7714
|
+
errMsg += " It seems you're using the wrong cdnType. Your locize project is configured to use \"".concat(cdnTypeAlt, "\" but here you've configured \"").concat(_this3.options.cdnType, "\".");
|
|
7715
|
+
_this3.isProjectNotExistingErrorMessage = errMsg;
|
|
7716
|
+
}
|
|
7717
|
+
var e = new Error(errMsg);
|
|
7718
|
+
var clbs = _this3.getLanguagesCalls;
|
|
7719
|
+
_this3.getLanguagesCalls = [];
|
|
7720
|
+
clbs.forEach(function (clb) {
|
|
7721
|
+
return clb(e);
|
|
7722
|
+
});
|
|
7723
|
+
});
|
|
7724
|
+
return;
|
|
7711
7725
|
}
|
|
7712
7726
|
if (ret) {
|
|
7713
7727
|
_this3.loadedLanguages = Object.keys(ret);
|
|
@@ -7847,7 +7861,7 @@
|
|
|
7847
7861
|
this.isProjectNotExisting = true;
|
|
7848
7862
|
}
|
|
7849
7863
|
if (this.isProjectNotExisting) {
|
|
7850
|
-
var err = new Error(
|
|
7864
|
+
var err = new Error(this.isProjectNotExistingErrorMessage);
|
|
7851
7865
|
if (logger) logger.error(err.message);
|
|
7852
7866
|
if (callback) callback(err);
|
|
7853
7867
|
return;
|