You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(geolocation): remove geolocation utility, replace with new DDO service method - getLocation (#10547)
### Related Ticket(s)
[GeoLocation service]: API endpoint has been retired, switch to DDO #10546
### Description
As the API endpoint we were using before to detect user's location (country code) has been retired by the webmaster team, new method is to grab from the DDO (`digitalData.user.location`) populated by the IBM analytics script.
This PR adds a new method the DDO service, which grabs the location from the DDO in the page and removes all instances of the geolocation utility which no longer works.
### Changelog
**New**
- `getLocation()` method under the DDO service
- have the `Locale` service use the new DDO `getLocation` method instead
**Removed**
- instances of the `geolocation` utility
<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
description: Utility to grab all alternative languages on the page. this scrapes the page of all elements and returns as a readable object.
12
+
description:
13
+
Utility to grab all alternative languages on the page. this scrapes the
14
+
page of all elements and returns as a readable object.
12
15
type: function
13
16
platform: web
14
17
status: stable
@@ -30,7 +33,9 @@ assets:
30
33
- utility
31
34
decode-string:
32
35
name: decodeString
33
-
description: Utility function to parse and decode text content. Strings can become encoded for various reasons. This utility decodes those strings.
36
+
description:
37
+
Utility function to parse and decode text content. Strings can become
38
+
encoded for various reasons. This utility decodes those strings.
34
39
type: function
35
40
platform: web
36
41
status: stable
@@ -63,7 +68,9 @@ assets:
63
68
- utility
64
69
ipc-info-cookie:
65
70
name: ipcinfoCookie
66
-
description: Utility to set and get the ipcInfo cookie needed to determine country and language code.
71
+
description:
72
+
Utility to set and get the ipcInfo cookie needed to determine country and
73
+
language code.
67
74
type: function
68
75
platform: web
69
76
status: stable
@@ -74,7 +81,11 @@ assets:
74
81
- utility
75
82
format-video-caption:
76
83
name: formatVideoCaption
77
-
description: The default g11n formatter for video caption, combining video name and video duration. Components using this function should have a mechanism to allow translators to replace it with one accomodating the preferences of specific locale.
84
+
description:
85
+
The default g11n formatter for video caption, combining video name and
86
+
video duration. Components using this function should have a mechanism to
87
+
allow translators to replace it with one accomodating the preferences of
88
+
specific locale.
78
89
type: function
79
90
platform: web
80
91
status: stable
@@ -85,7 +96,12 @@ assets:
85
96
- utility
86
97
format-video-duration:
87
98
name: formatVideoDuration
88
-
description: The default g11n formatter for video duration. Components using this function should have a mechanism to allow translators to replace it with one accomodating the preferences of specific locale, or to replace it with general-purpose g11n formatting library. (e.g. moment, though it’s too big for us to make it a hard dependency)
99
+
description:
100
+
The default g11n formatter for video duration. Components using this
101
+
function should have a mechanism to allow translators to replace it with
102
+
one accomodating the preferences of specific locale, or to replace it with
103
+
general-purpose g11n formatting library. (e.g. moment, though it’s too big
0 commit comments