@autobusal/providers 1.29.0 → 1.29.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.
- package/CHANGELOG.md +14 -0
- package/Setup/Setup.tsx +21 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.29.1
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **The domain's language outranks the stored preference only on a ccTLD**,
|
|
8
|
+
not on the brand's primary. Every primary declares a locale (the backfill
|
|
9
|
+
gave it one), so 1.29.0 applied the override everywhere — quietly ending
|
|
10
|
+
the deliberate, already-shipped behaviour where a returning visitor who
|
|
11
|
+
last read the site in Albanian types `busmagus.com` and gets Albanian. That
|
|
12
|
+
would have changed every brand on the platform, none of which has a second
|
|
13
|
+
domain yet: a change nobody asked for, arriving with a feature nobody has
|
|
14
|
+
switched on. Caught by testing a returning visitor rather than a clean
|
|
15
|
+
browser.
|
|
16
|
+
|
|
3
17
|
|
|
4
18
|
## 1.29.0
|
|
5
19
|
|
package/Setup/Setup.tsx
CHANGED
|
@@ -16,10 +16,27 @@ const Setup = ({ type, children }: Props): JSX.Element => {
|
|
|
16
16
|
useUserBootstrap();
|
|
17
17
|
|
|
18
18
|
// Edited: Ferjolt Ozuni - Date: 2026-08-06
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
|
|
19
|
+
// The language this origin is about, but ONLY when it is a ccTLD - a
|
|
20
|
+
// domain that exists in order to be that language. It outranks the stored
|
|
21
|
+
// preference there; see getLanguage.
|
|
22
|
+
//
|
|
23
|
+
// Not on the PRIMARY, even though it declares a locale too (every brand's
|
|
24
|
+
// primary does - the backfill gave it one). The primary is the brand's
|
|
25
|
+
// address before it is a language, and the stored preference winning at
|
|
26
|
+
// its unprefixed URLs is deliberate and already shipped: a returning
|
|
27
|
+
// visitor who last read the site in Albanian types busmagus.com and gets
|
|
28
|
+
// Albanian. Passing the primary's locale here would have quietly ended
|
|
29
|
+
// that for every brand on the platform, none of which has a second domain
|
|
30
|
+
// yet - a change nobody asked for, arriving with a feature nobody has
|
|
31
|
+
// switched on.
|
|
32
|
+
const origin = data.domains?.find(item => item.domain === data.domain);
|
|
33
|
+
|
|
34
|
+
languages(
|
|
35
|
+
type,
|
|
36
|
+
data.preferences.languages.default,
|
|
37
|
+
data.preferences.languages.available,
|
|
38
|
+
origin && !origin.primary ? origin.locale : null
|
|
39
|
+
);
|
|
23
40
|
|
|
24
41
|
// Edited: Ferjolt Ozuni - Date: 2026-08-01
|
|
25
42
|
// The brand's GTM container, from labels_settings via the admin GUI.
|