@autobusal/providers 1.15.0 → 1.17.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/CHANGELOG.md CHANGED
@@ -7,6 +7,31 @@ adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
7
7
  > Note: 1.8.0 through 1.11.0 were published without changelog entries. The
8
8
  > gap is left as-is rather than reconstructed after the fact.
9
9
 
10
+ ## [1.17.0] - 2026-08-02
11
+
12
+ ### Changed
13
+
14
+ - **`FeatureData` gains `slug` and drops `name_sq`.** Amenity names are
15
+ resolved server-side from obtapi's `lang/{locale}/features.php` now, so
16
+ `name` already arrives in the request's language - for the SPA and the
17
+ partner API alike, from one resolution point. `slug` is the stable
18
+ machine-readable key: `id` is ours alone and `name` moves with the
19
+ language, so it is the only thing safe to map against.
20
+
21
+ ## [1.16.0] - 2026-08-02
22
+
23
+ ### Changed
24
+
25
+ - **SEO overrides are per language.** `LabelSettings.seo` and the location
26
+ types carry a `{locale: {title, description}}` map. The label's homepage
27
+ override is sent WHOLE and picked client-side, unlike the country/city
28
+ ones which resolve server-side - not an inconsistency but a bootstrap fact:
29
+ `/api/settings/get` is the one request that runs before i18n exists, so the
30
+ server cannot know which language to answer in. Resolving it there put
31
+ English copy on the Italian homepage.
32
+ - **`seo_keywords` is gone** everywhere. Google has ignored the meta keywords
33
+ tag since 2009; the field could only ever cost somebody an afternoon.
34
+
10
35
  ## [1.15.0] - 2026-08-02
11
36
 
12
37
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"
@@ -30,9 +30,14 @@ export interface CountryData {
30
30
  // Optional hand-written override for the public country page's title/
31
31
  // description/keywords - see LocationCountry.tsx for the fallback-to-
32
32
  // template logic when these are unset.
33
- seo_title?: string
34
- seo_description?: string
35
- seo_keywords?: string
33
+ // Edited: Ferjolt Ozuni - Date: 2026-08-02
34
+ // Resolved to the request's language server-side on the PUBLIC read,
35
+ // so these stay flat there; `seo` is the raw per-locale map the admin
36
+ // form reads and writes. `seo_keywords` is gone - Google has ignored
37
+ // the meta keywords tag since 2009.
38
+ seo_title?: string | null
39
+ seo_description?: string | null
40
+ seo?: Record<string, { title?: string, description?: string }>
36
41
  }
37
42
 
38
43
  export interface CityStats {
@@ -74,9 +79,14 @@ export interface CityData {
74
79
  // Optional hand-written override for the public city page's title/
75
80
  // description/keywords - see LocationCity.tsx for the fallback-to-
76
81
  // template logic when these are unset.
77
- seo_title?: string
78
- seo_description?: string
79
- seo_keywords?: string
82
+ // Edited: Ferjolt Ozuni - Date: 2026-08-02
83
+ // Resolved to the request's language server-side on the PUBLIC read,
84
+ // so these stay flat there; `seo` is the raw per-locale map the admin
85
+ // form reads and writes. `seo_keywords` is gone - Google has ignored
86
+ // the meta keywords tag since 2009.
87
+ seo_title?: string | null
88
+ seo_description?: string | null
89
+ seo?: Record<string, { title?: string, description?: string }>
80
90
  }
81
91
 
82
92
  export interface StopData {
package/types/routes.ts CHANGED
@@ -70,9 +70,21 @@ export interface TripData {
70
70
 
71
71
  export interface FeatureData {
72
72
  id: number
73
+
74
+ // Edited: Ferjolt Ozuni - Date: 2026-08-02
75
+ // Already in the request's language - resolved server-side from
76
+ // lang/{locale}/features.php, so the SPA and the partner API get the same
77
+ // answer without either translating anything itself.
73
78
  name: string
79
+
80
+ // The stable key the translation hangs off. Exposed because it is the only
81
+ // machine-readable identifier that does not change with the language -
82
+ // `id` is ours alone and `name` moves.
83
+ slug?: string
84
+
85
+ // Admin-facing label and the fallback shown until a slug is translated.
74
86
  name_en?: string
75
- name_sq?: string
87
+
76
88
  image_url: string
77
89
  image?: string[]
78
90
  }
package/types/settings.ts CHANGED
@@ -37,14 +37,18 @@ export interface SettingsData {
37
37
  }
38
38
 
39
39
  // Edited: Ferjolt Ozuni - Date: 2026-07-31
40
- // Optional admin-managed override for the homepage's title/description/
41
- // keywords (Labels\AdminController::seo()) - StaticHome.tsx prefers these
42
- // over its i18n translation-template values when set.
43
- seo?: {
44
- title?: string
45
- description?: string
46
- keywords?: string
47
- }
40
+ // Optional admin-managed override for the homepage's title/description
41
+ // (Labels\AdminController::seo()) - StaticHome.tsx prefers these over its
42
+ // i18n translation-template values when set.
43
+ //
44
+ // Edited: Ferjolt Ozuni - Date: 2026-08-02
45
+ // The WHOLE per-language map, picked client-side by StaticHome - unlike
46
+ // the country/city overrides, which resolve server-side. This one request
47
+ // runs before i18n exists (Setup initialises i18n from the settings it is
48
+ // waiting on), so the server cannot know which language to answer in.
49
+ // A language with no entry has no override and keeps its own template.
50
+ // `keywords` is gone: Google has ignored the meta keywords tag since 2009.
51
+ seo?: Record<string, { title?: string, description?: string }>
48
52
 
49
53
  preferences: {
50
54
  company: string
@@ -226,11 +230,11 @@ export interface LabelSettings {
226
230
  // Edited: Ferjolt Ozuni - Date: 2026-07-31
227
231
  // Admin-managed homepage SEO override (public seo? above is populated
228
232
  // from this) - see Labels\AdminController::seo().
229
- seo?: {
230
- title?: string
231
- description?: string
232
- keywords?: string
233
- }
233
+ //
234
+ // Edited: Ferjolt Ozuni - Date: 2026-08-02
235
+ // Keyed by locale. A language with no entry has no override at all, which
236
+ // is what returns that language's homepage to its own template.
237
+ seo?: Record<string, { title?: string, description?: string }>
234
238
 
235
239
  // Edited: Ferjolt Ozuni - Date: 2026-08-01
236
240
  // Admin-managed Google Tag Manager container. The PUBLIC settings payload