@yuneta/gobj-ui 7.23.121 → 7.23.122

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.
@@ -10626,8 +10626,8 @@ function yui_toolbar(attrs = {}, items = []) {
10626
10626
  class: `yui-horizontal-toolbar-scroll-btn ${side} has-text-link`,
10627
10627
  style: "display:none",
10628
10628
  type: "button",
10629
- title: label,
10630
- "aria-label": label,
10629
+ title: (0, i18next.t)(label),
10630
+ "aria-label": (0, i18next.t)(label),
10631
10631
  "data-i18n-title": label,
10632
10632
  "data-i18n-aria-label": label
10633
10633
  },
@@ -10621,8 +10621,8 @@ function yui_toolbar(attrs = {}, items = []) {
10621
10621
  class: `yui-horizontal-toolbar-scroll-btn ${side} has-text-link`,
10622
10622
  style: "display:none",
10623
10623
  type: "button",
10624
- title: label,
10625
- "aria-label": label,
10624
+ title: t(label),
10625
+ "aria-label": t(label),
10626
10626
  "data-i18n-title": label,
10627
10627
  "data-i18n-aria-label": label
10628
10628
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "7.23.121",
3
+ "version": "7.23.122",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -14,6 +14,8 @@ import {
14
14
  createElement2, debounce
15
15
  } from "@yuneta/gobj-js";
16
16
 
17
+ import {t} from "i18next";
18
+
17
19
  import "./yui_toolbar.css"; // Must be in index.js ?
18
20
 
19
21
 
@@ -66,8 +68,16 @@ function yui_toolbar(attrs={}, items = [])
66
68
  * never a flash of both arrows on a toolbar that doesn't scroll. */
67
69
  style: 'display:none',
68
70
  type: 'button',
69
- title: label,
70
- 'aria-label': label,
71
+ /* Translated HERE, not left as the raw key for the host to
72
+ * repaint: a toolbar is rebuilt on every action it carries
73
+ * (a mode, a chip, a filter), and a host that translates its
74
+ * view once at mount never sees the rebuilt arrows again.
75
+ * Read back on a deployed Spanish map, where the strip that
76
+ * scrolls the family chips offered "scroll left". The keys
77
+ * stay on the element so a language change still reaches
78
+ * them through refresh_language(). */
79
+ title: t(label),
80
+ 'aria-label': t(label),
71
81
  'data-i18n-title': label,
72
82
  'data-i18n-aria-label': label
73
83
  },