@carbon/ibmdotcom-services 2.57.2 → 2.58.0
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/es/services/Translation/Translation.js +4 -0
- package/es/services/Translation/masthead-footer-usen.js +866 -0
- package/lib/services/Translation/Translation.js +4 -0
- package/lib/services/Translation/masthead-footer-usen.js +872 -0
- package/package.json +3 -3
- package/umd/ibmdotcom-services.js +869 -0
- package/umd/ibmdotcom-services.min.js +3 -3
|
@@ -12,6 +12,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
12
12
|
var _axios = _interopRequireDefault(require("axios"));
|
|
13
13
|
var _Locale = require("../Locale");
|
|
14
14
|
var _windowOrGlobal = _interopRequireDefault(require("window-or-global"));
|
|
15
|
+
var _mastheadFooterUsen = _interopRequireDefault(require("./masthead-footer-usen.js"));
|
|
15
16
|
/**
|
|
16
17
|
* Copyright IBM Corp. 2020, 2022
|
|
17
18
|
*
|
|
@@ -184,6 +185,9 @@ var TranslationAPI = /*#__PURE__*/function () {
|
|
|
184
185
|
var sessionTranslation = this.getSessionCache(itemKey);
|
|
185
186
|
if (sessionTranslation) {
|
|
186
187
|
resolve(sessionTranslation);
|
|
188
|
+
} else if (country === 'us' && lang === 'en' && (!endpoint || endpoint === _c4dEndpointDefault)) {
|
|
189
|
+
_requestsTranslation['us-en'] = _requestsTranslation['us-en'] || Promise.resolve(this.transformData(JSON.parse(JSON.stringify(_mastheadFooterUsen.default))));
|
|
190
|
+
_requestsTranslation['us-en'].then(resolve, reject);
|
|
187
191
|
} else {
|
|
188
192
|
var key = country !== 'undefined' ? "".concat(country, "-").concat(lang) : "".concat(lang);
|
|
189
193
|
if (!_requestsTranslation[key]) {
|