@carbon/ibmdotcom-services 2.56.0 → 2.57.1

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.
@@ -3,7 +3,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  /**
6
- * Copyright IBM Corp. 2020, 2022
6
+ * Copyright IBM Corp. 2020, 2026
7
7
  *
8
8
  * This source code is licensed under the Apache-2.0 license found in the
9
9
  * LICENSE file in the root directory of this source tree.
@@ -12,6 +12,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
12
12
  import axios from 'axios';
13
13
  import { LocaleAPI } from '../Locale';
14
14
  import root from 'window-or-global';
15
+ import localLinksData from '../../../../web-components/src/components/masthead/masthead-footer-nav.json';
15
16
 
16
17
  /**
17
18
  * @constant {string | string} Host for the Translation API call
@@ -144,10 +145,16 @@ var TranslationAPI = /*#__PURE__*/function () {
144
145
  lang = locale.lc;
145
146
  country = locale.cc;
146
147
  case 3:
148
+ if (!(country === 'us' && lang === 'en')) {
149
+ _context.next = 4;
150
+ break;
151
+ }
152
+ return _context.abrupt("return", Promise.resolve(localLinksData.us.en));
153
+ case 4:
147
154
  return _context.abrupt("return", new Promise(function (resolve, reject) {
148
155
  _this.fetchTranslation(lang, country, endpoint, resolve, reject);
149
156
  }));
150
- case 4:
157
+ case 5:
151
158
  case "end":
152
159
  return _context.stop();
153
160
  }
@@ -12,8 +12,9 @@ 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 _mastheadFooterNav = _interopRequireDefault(require("../../../../web-components/src/components/masthead/masthead-footer-nav.json"));
15
16
  /**
16
- * Copyright IBM Corp. 2020, 2022
17
+ * Copyright IBM Corp. 2020, 2026
17
18
  *
18
19
  * This source code is licensed under the Apache-2.0 license found in the
19
20
  * LICENSE file in the root directory of this source tree.
@@ -150,10 +151,16 @@ var TranslationAPI = /*#__PURE__*/function () {
150
151
  lang = locale.lc;
151
152
  country = locale.cc;
152
153
  case 3:
154
+ if (!(country === 'us' && lang === 'en')) {
155
+ _context.next = 4;
156
+ break;
157
+ }
158
+ return _context.abrupt("return", Promise.resolve(_mastheadFooterNav.default.us.en));
159
+ case 4:
153
160
  return _context.abrupt("return", new Promise(function (resolve, reject) {
154
161
  _this.fetchTranslation(lang, country, endpoint, resolve, reject);
155
162
  }));
156
- case 4:
163
+ case 5:
157
164
  case "end":
158
165
  return _context.stop();
159
166
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibmdotcom-services",
3
3
  "description": "Carbon for IBM.com Services",
4
- "version": "2.56.0",
4
+ "version": "2.57.1",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@babel/runtime": "^7.16.3",
50
- "@carbon/ibmdotcom-utilities": "2.56.0",
50
+ "@carbon/ibmdotcom-utilities": "2.57.1",
51
51
  "@ibm/telemetry-js": "^1.5.0",
52
52
  "axios": "^1.6.8",
53
53
  "marked": "^4.0.10",
@@ -89,5 +89,5 @@
89
89
  "rollup-plugin-sizes": "^1.0.4",
90
90
  "whatwg-fetch": "^2.0.3"
91
91
  },
92
- "gitHead": "0fa362d61ffe7f5fa01cfc2894fa4e2b5e4bd620"
92
+ "gitHead": "5b66eaeea63ef546742576ebfe3ea1f779d31677"
93
93
  }