@yuneta/gobj-ui 7.23.111 → 7.23.113

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.
@@ -7007,8 +7007,10 @@ function toolbar_button$1(gobj, name) {
7007
7007
  "button",
7008
7008
  {
7009
7009
  class: "button p-1 button-save",
7010
- title: "save",
7011
- "aria-label": "save",
7010
+ title: t("save"),
7011
+ "data-i18n-title": "save",
7012
+ "aria-label": t("save"),
7013
+ "data-i18n-aria-label": "save",
7012
7014
  disabled: true
7013
7015
  },
7014
7016
  [[
@@ -7032,8 +7034,10 @@ function toolbar_button$1(gobj, name) {
7032
7034
  "button",
7033
7035
  {
7034
7036
  class: "button p-1 button-undo",
7035
- title: "undo",
7036
- "aria-label": "undo",
7037
+ title: t("undo"),
7038
+ "data-i18n-title": "undo",
7039
+ "aria-label": t("undo"),
7040
+ "data-i18n-aria-label": "undo",
7037
7041
  disabled: true
7038
7042
  },
7039
7043
  [[
@@ -7057,8 +7061,10 @@ function toolbar_button$1(gobj, name) {
7057
7061
  "button",
7058
7062
  {
7059
7063
  class: "button p-1 button-clear",
7060
- title: "clear",
7061
- "aria-label": "clear"
7064
+ title: t("clear"),
7065
+ "data-i18n-title": "clear",
7066
+ "aria-label": t("clear"),
7067
+ "data-i18n-aria-label": "clear"
7062
7068
  },
7063
7069
  [[
7064
7070
  "span",
@@ -7081,8 +7087,10 @@ function toolbar_button$1(gobj, name) {
7081
7087
  "button",
7082
7088
  {
7083
7089
  class: "button p-1 button-copy",
7084
- title: "copy",
7085
- "aria-label": "copy"
7090
+ title: t("copy"),
7091
+ "data-i18n-title": "copy",
7092
+ "aria-label": t("copy"),
7093
+ "data-i18n-aria-label": "copy"
7086
7094
  },
7087
7095
  [[
7088
7096
  "span",
@@ -7105,8 +7113,10 @@ function toolbar_button$1(gobj, name) {
7105
7113
  "button",
7106
7114
  {
7107
7115
  class: "button p-1 button-paste",
7108
- title: "paste",
7109
- "aria-label": "paste"
7116
+ title: t("paste"),
7117
+ "data-i18n-title": "paste",
7118
+ "aria-label": t("paste"),
7119
+ "data-i18n-aria-label": "paste"
7110
7120
  },
7111
7121
  [[
7112
7122
  "span",
@@ -8367,7 +8377,7 @@ function template2columns(gobj, columns, template, sub_elements) {
8367
8377
  column.editorParams = {
8368
8378
  format: "dd/MM/yyyy hh:mm",
8369
8379
  verticalNavigation: "table",
8370
- elementAttributes: { title: "slide bar to choose option" }
8380
+ elementAttributes: { title: t("slide bar to choose option") }
8371
8381
  };
8372
8382
  field_desc.real_type;
8373
8383
  break;
@@ -9309,7 +9319,9 @@ var EditControl = class {
9309
9319
  {
9310
9320
  class: "button is-small is-flex is-align-items-center is-justify-content-center",
9311
9321
  title: t("maplibre.drag_mark"),
9312
- "aria-label": t("maplibre.drag_mark")
9322
+ "data-i18n-title": "maplibre.drag_mark",
9323
+ "aria-label": t("maplibre.drag_mark"),
9324
+ "data-i18n-aria-label": "maplibre.drag_mark"
9313
9325
  },
9314
9326
  parseSVG(`
9315
9327
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="22" height="22" fill="#CCCCCC"><path d="M273 7c-9.4-9.4-24.6-9.4-33.9 0L167 79c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l31-31L232 232 81.9 232l31-31c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L7 239c-9.4 9.4-9.4 24.6 0 33.9l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-31-31L232 280l0 150.1-31-31c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c9.4 9.4 24.6 9.4 33.9 0l72-72c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-31 31L280 280l150.1 0-31 31c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l72-72c9.4-9.4 9.4-24.6 0-33.9l-72-72c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l31 31L280 232l0-150.1 31 31c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L273 7z"/></svg>
@@ -9368,7 +9380,9 @@ var MarkerControl = class {
9368
9380
  {
9369
9381
  class: "button is-small is-flex is-align-items-center is-justify-content-center",
9370
9382
  title: t("maplibre.center_map"),
9371
- "aria-label": t("maplibre.center_map")
9383
+ "data-i18n-title": "maplibre.center_map",
9384
+ "aria-label": t("maplibre.center_map"),
9385
+ "data-i18n-aria-label": "maplibre.center_map"
9372
9386
  },
9373
9387
  parseSVG(`
9374
9388
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" width="22" height="22"><path d="M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z"/></svg>
@@ -9385,7 +9399,9 @@ var MarkerControl = class {
9385
9399
  {
9386
9400
  class: "button is-small is-flex is-align-items-center is-justify-content-center",
9387
9401
  title: t("maplibre.user_location"),
9388
- "aria-label": t("maplibre.user_location")
9402
+ "data-i18n-title": "maplibre.user_location",
9403
+ "aria-label": t("maplibre.user_location"),
9404
+ "data-i18n-aria-label": "maplibre.user_location"
9389
9405
  },
9390
9406
  parseSVG(`
9391
9407
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="22" height="22" fill="#CCCCCC"><path d="M256 0c17.7 0 32 14.3 32 32l0 34.7C368.4 80.1 431.9 143.6 445.3 224l34.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-34.7 0C431.9 368.4 368.4 431.9 288 445.3l0 34.7c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.7C143.6 431.9 80.1 368.4 66.7 288L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l34.7 0C80.1 143.6 143.6 80.1 224 66.7L224 32c0-17.7 14.3-32 32-32zM128 256a128 128 0 1 0 256 0 128 128 0 1 0 -256 0zm128-80a80 80 0 1 1 0 160 80 80 0 1 1 0-160z"/></svg>
@@ -20533,8 +20549,10 @@ function render_tabs(gobj, items) {
20533
20549
  class: "icon is-small yui-nav-close ml-2",
20534
20550
  "data-close-item": it.id,
20535
20551
  role: "button",
20536
- "aria-label": "close",
20537
- title: "close"
20552
+ "aria-label": t("close"),
20553
+ "data-i18n-aria-label": "close",
20554
+ title: t("close"),
20555
+ "data-i18n-title": "close"
20538
20556
  },
20539
20557
  ["i", {
20540
20558
  class: "yi-xmark",
@@ -24982,7 +25000,8 @@ function create_tabulator(gobj) {
24982
25000
  }
24983
25001
  if (write_plan(gobj).in_row_icons) columns.push({
24984
25002
  field: "_operation",
24985
- title: "Op",
25003
+ title: "",
25004
+ titleFormatter: () => t("operations"),
24986
25005
  hozAlign: "center",
24987
25006
  frozen: "right",
24988
25007
  visible: false,
@@ -72077,37 +72096,37 @@ var TRAFFIC_TS_FIELDS = {
72077
72096
  var TRACE_DEFS = [
72078
72097
  [
72079
72098
  "trace_automata",
72080
- "Automata",
72099
+ "automata",
72081
72100
  trace_automata
72082
72101
  ],
72083
72102
  [
72084
72103
  "trace_creation",
72085
- "Creation",
72104
+ "creation",
72086
72105
  trace_creation
72087
72106
  ],
72088
72107
  [
72089
72108
  "trace_start_stop",
72090
- "Start/Stop",
72109
+ "start / stop",
72091
72110
  trace_start_stop
72092
72111
  ],
72093
72112
  [
72094
72113
  "trace_subscriptions",
72095
- "Subscriptions",
72114
+ "subscriptions",
72096
72115
  trace_subscriptions
72097
72116
  ],
72098
72117
  [
72099
72118
  "trace_i18n",
72100
- "I18n",
72119
+ "i18n",
72101
72120
  trace_i18n
72102
72121
  ],
72103
72122
  [
72104
72123
  "trace_traffic",
72105
- "Traffic",
72124
+ "traffic",
72106
72125
  trace_traffic
72107
72126
  ],
72108
72127
  [
72109
72128
  "no_poll",
72110
- "No Poll",
72129
+ "no poll",
72111
72130
  set_no_poll
72112
72131
  ]
72113
72132
  ];
@@ -72581,7 +72600,8 @@ function mute_button(sig) {
72581
72600
  {
72582
72601
  class: "TRAFFIC_MUTE",
72583
72602
  type: "button",
72584
- title: "Mute " + sig
72603
+ title: t("mute this message"),
72604
+ "data-i18n-title": "mute this message"
72585
72605
  },
72586
72606
  "⊘",
72587
72607
  { click: (ev) => {
@@ -73081,7 +73101,7 @@ function set_no_poll() {
73081
73101
  function refresh_dev_chrome() {
73082
73102
  document.querySelectorAll(".YDEV_CHIP[data-trace]").forEach(($b) => {
73083
73103
  let key = $b.getAttribute("data-trace");
73084
- let label = $b.getAttribute("data-label") || "";
73104
+ let label = t($b.getAttribute("data-label") || "");
73085
73105
  let v = dev_num(key, 0);
73086
73106
  $b.textContent = key === "trace_automata" && v > 0 ? label + " " + v : label;
73087
73107
  $b.classList.toggle("is-active", v > 0);
@@ -73115,7 +73135,8 @@ function refresh_dev_chrome() {
73115
73135
  if (set.size) {
73116
73136
  let $lbl = document.createElement("span");
73117
73137
  $lbl.className = "YDEV_LABEL";
73118
- $lbl.textContent = "Muted";
73138
+ $lbl.textContent = t("muted");
73139
+ $lbl.setAttribute("data-i18n", "muted");
73119
73140
  $m.appendChild($lbl);
73120
73141
  set.forEach((sig) => {
73121
73142
  $m.appendChild(createElement2([
@@ -73123,7 +73144,8 @@ function refresh_dev_chrome() {
73123
73144
  {
73124
73145
  class: "YDEV_MUTED_CHIP",
73125
73146
  type: "button",
73126
- title: "Unmute"
73147
+ title: t("unmute"),
73148
+ "data-i18n-title": "unmute"
73127
73149
  },
73128
73150
  "⊘ " + sig + " ✕",
73129
73151
  { click: (ev) => {
@@ -73178,15 +73200,16 @@ function dev_fallback_copy(text) {
73178
73200
  document.body.removeChild(ta);
73179
73201
  }
73180
73202
  function build_control_bar() {
73181
- let trace_chips = TRACE_DEFS.map(([key, label, fn]) => [
73203
+ let trace_chips = TRACE_DEFS.map(([key, label_key, fn]) => [
73182
73204
  "button",
73183
73205
  {
73184
73206
  class: "YDEV_CHIP",
73185
73207
  "data-trace": key,
73186
- "data-label": label,
73208
+ "data-label": label_key,
73209
+ "data-i18n": label_key,
73187
73210
  type: "button"
73188
73211
  },
73189
- label,
73212
+ t(label_key),
73190
73213
  { click: (ev) => {
73191
73214
  ev.stopPropagation();
73192
73215
  fn();
@@ -73198,9 +73221,11 @@ function build_control_bar() {
73198
73221
  class: "YDEV_CHIP",
73199
73222
  "data-toggle": "automata-simple",
73200
73223
  type: "button",
73201
- title: "Machine trace shape. On (default): one line per transition, event first, like the C kernel. Off: the legacy three-line shape (the call, the state change and the return)"
73224
+ title: t("machine trace shape"),
73225
+ "data-i18n-title": "machine trace shape",
73226
+ "data-i18n": "simple mach"
73202
73227
  },
73203
- "Simple mach",
73228
+ t("simple mach"),
73204
73229
  { click: (ev) => {
73205
73230
  ev.stopPropagation();
73206
73231
  let v = dev_simple_mach() ? 0 : 1;
@@ -73214,9 +73239,10 @@ function build_control_bar() {
73214
73239
  {
73215
73240
  class: "YDEV_SEG_BTN",
73216
73241
  "data-view": v,
73242
+ "data-i18n": label,
73217
73243
  type: "button"
73218
73244
  },
73219
- label,
73245
+ t(label),
73220
73246
  { click: (ev) => {
73221
73247
  ev.stopPropagation();
73222
73248
  set_view(v);
@@ -73229,16 +73255,16 @@ function build_control_bar() {
73229
73255
  id: "ydev-seg"
73230
73256
  },
73231
73257
  [
73232
- mk_view("detailed", "Detailed"),
73233
- mk_view("full", "Expanded"),
73234
- mk_view("compact", "Compact"),
73235
- mk_view("name", "Name only")
73258
+ mk_view("detailed", "detailed"),
73259
+ mk_view("full", "expanded"),
73260
+ mk_view("compact", "compact"),
73261
+ mk_view("name", "name only")
73236
73262
  ]
73237
73263
  ];
73238
73264
  let OUT_TITLES = {
73239
- window: "Dev window only (browser console stays clean)",
73240
- console: "Browser console only (nothing shown in this window)",
73241
- both: "Dev window and browser console"
73265
+ window: "dev window only",
73266
+ console: "browser console only",
73267
+ both: "dev window and browser console"
73242
73268
  };
73243
73269
  let mk_out = (v, label) => [
73244
73270
  "button",
@@ -73246,9 +73272,11 @@ function build_control_bar() {
73246
73272
  class: "YDEV_SEG_BTN",
73247
73273
  "data-output": v,
73248
73274
  type: "button",
73249
- title: OUT_TITLES[v]
73275
+ title: t(OUT_TITLES[v]),
73276
+ "data-i18n-title": OUT_TITLES[v],
73277
+ "data-i18n": label
73250
73278
  },
73251
- label,
73279
+ t(label),
73252
73280
  { click: (ev) => {
73253
73281
  ev.stopPropagation();
73254
73282
  set_output_route(v);
@@ -73261,9 +73289,9 @@ function build_control_bar() {
73261
73289
  id: "ydev-output"
73262
73290
  },
73263
73291
  [
73264
- mk_out("window", "Window"),
73265
- mk_out("console", "Console"),
73266
- mk_out("both", "Both")
73292
+ mk_out("window", "window"),
73293
+ mk_out("console", "console"),
73294
+ mk_out("both", "both")
73267
73295
  ]
73268
73296
  ];
73269
73297
  let mk_expand = (key, label) => [
@@ -73272,9 +73300,11 @@ function build_control_bar() {
73272
73300
  class: "YDEV_CHIP",
73273
73301
  "data-expand": key,
73274
73302
  type: "button",
73275
- title: "Show " + label + " in the Expanded view"
73303
+ title: t("show this section in the expanded view"),
73304
+ "data-i18n-title": "show this section in the expanded view",
73305
+ "data-i18n": label
73276
73306
  },
73277
- label,
73307
+ t(label),
73278
73308
  { click: (ev) => {
73279
73309
  ev.stopPropagation();
73280
73310
  toggle_pref(key, key === "dev_full_data" ? 1 : 0);
@@ -73289,12 +73319,15 @@ function build_control_bar() {
73289
73319
  [
73290
73320
  [
73291
73321
  "span",
73292
- { class: "YDEV_LABEL" },
73293
- "Expand"
73322
+ {
73323
+ class: "YDEV_LABEL",
73324
+ "data-i18n": "expand"
73325
+ },
73326
+ t("expand")
73294
73327
  ],
73295
- mk_expand("dev_full_schema", "Schema"),
73296
- mk_expand("dev_full_data", "Data"),
73297
- mk_expand("dev_full_meta", "Metadata")
73328
+ mk_expand("dev_full_schema", "schema"),
73329
+ mk_expand("dev_full_data", "data"),
73330
+ mk_expand("dev_full_meta", "metadata")
73298
73331
  ]
73299
73332
  ];
73300
73333
  let mk_dir = (dir, glyph, key, title) => [
@@ -73303,7 +73336,8 @@ function build_control_bar() {
73303
73336
  class: "YDEV_CHIP s-" + dir,
73304
73337
  "data-dir": key,
73305
73338
  type: "button",
73306
- title
73339
+ title: t(title),
73340
+ "data-i18n-title": title
73307
73341
  },
73308
73342
  glyph,
73309
73343
  { click: (ev) => {
@@ -73312,9 +73346,9 @@ function build_control_bar() {
73312
73346
  } }
73313
73347
  ];
73314
73348
  let dir_chips = [
73315
- mk_dir("out", "⇢", "dev_filter_out", "Outgoing"),
73316
- mk_dir("in", "⇠", "dev_filter_in", "Incoming"),
73317
- mk_dir("err", "⚠", "dev_filter_err", "Errors")
73349
+ mk_dir("out", "⇢", "dev_filter_out", "outgoing"),
73350
+ mk_dir("in", "⇠", "dev_filter_in", "incoming"),
73351
+ mk_dir("err", "⚠", "dev_filter_err", "errors")
73318
73352
  ];
73319
73353
  let periodic_chip = [
73320
73354
  "button",
@@ -73322,9 +73356,18 @@ function build_control_bar() {
73322
73356
  class: "YDEV_CHIP",
73323
73357
  "data-toggle": "periodic",
73324
73358
  type: "button",
73325
- title: "Hide the timers: EV_TIMEOUT / PERIODIC / HEARTBEAT / PING transitions, and recurring traffic. On by default"
73359
+ title: t("hide the timers and the recurring traffic"),
73360
+ "data-i18n-title": "hide the timers and the recurring traffic"
73326
73361
  },
73327
- "⊘ Periodic",
73362
+ [[
73363
+ "span",
73364
+ { class: "YDEV_GLYPH" },
73365
+ "⊘"
73366
+ ], [
73367
+ "span",
73368
+ { "data-i18n": "periodic" },
73369
+ t("periodic")
73370
+ ]],
73328
73371
  { click: (ev) => {
73329
73372
  ev.stopPropagation();
73330
73373
  toggle_pref("dev_hide_periodic", HIDE_PERIODIC_DEFAULT);
@@ -73335,8 +73378,9 @@ function build_control_bar() {
73335
73378
  {
73336
73379
  class: "YDEV_SEARCH",
73337
73380
  type: "search",
73338
- placeholder: "filter events / payload…",
73339
- "data-role": "search"
73381
+ "data-role": "search",
73382
+ placeholder: t("filter events / payload"),
73383
+ "data-i18n-placeholder": "filter events / payload"
73340
73384
  },
73341
73385
  "",
73342
73386
  { input: (ev) => {
@@ -73349,15 +73393,17 @@ function build_control_bar() {
73349
73393
  {
73350
73394
  class: "YDEV_CHIP",
73351
73395
  type: "button",
73352
- title: "Copy visible traffic to clipboard"
73396
+ title: t("copy visible traffic to clipboard"),
73397
+ "data-i18n-title": "copy visible traffic to clipboard",
73398
+ "data-i18n": "copy"
73353
73399
  },
73354
- "Copy",
73400
+ t("copy"),
73355
73401
  { click: (ev) => {
73356
73402
  ev.stopPropagation();
73357
73403
  let btn = ev.currentTarget;
73358
73404
  dev_copy_text(traffic_to_text()).then(() => {
73359
73405
  let prev = btn.textContent;
73360
- btn.textContent = "Copied";
73406
+ btn.textContent = t("copied");
73361
73407
  setTimeout(() => {
73362
73408
  btn.textContent = prev;
73363
73409
  }, 1e3);
@@ -73369,9 +73415,11 @@ function build_control_bar() {
73369
73415
  {
73370
73416
  class: "YDEV_CHIP",
73371
73417
  type: "button",
73372
- title: "Clear captured traffic"
73418
+ title: t("clear captured traffic"),
73419
+ "data-i18n-title": "clear captured traffic",
73420
+ "data-i18n": "clear"
73373
73421
  },
73374
- "Clear",
73422
+ t("clear"),
73375
73423
  { click: (ev) => {
73376
73424
  ev.stopPropagation();
73377
73425
  clear_traffic();
@@ -73382,8 +73430,11 @@ function build_control_bar() {
73382
73430
  { class: "YDEV_GROUP" },
73383
73431
  [[
73384
73432
  "span",
73385
- { class: "YDEV_LABEL" },
73386
- label
73433
+ {
73434
+ class: "YDEV_LABEL",
73435
+ "data-i18n": label
73436
+ },
73437
+ t(label)
73387
73438
  ], ...items]
73388
73439
  ];
73389
73440
  let sep = () => [
@@ -73395,18 +73446,18 @@ function build_control_bar() {
73395
73446
  "div",
73396
73447
  { class: "YDEV_BAR" },
73397
73448
  [
73398
- grp("Traces", [...trace_chips, simple_mach]),
73449
+ grp("traces", [...trace_chips, simple_mach]),
73399
73450
  sep(),
73400
- grp("Output", [output_seg]),
73451
+ grp("output", [output_seg]),
73401
73452
  sep(),
73402
- grp("View", [view_seg]),
73453
+ grp("view", [view_seg]),
73403
73454
  expand_grp,
73404
73455
  sep(),
73405
- grp("Show", [...dir_chips, periodic_chip]),
73456
+ grp("show", [...dir_chips, periodic_chip]),
73406
73457
  sep(),
73407
- grp("Find", [search]),
73458
+ grp("find", [search]),
73408
73459
  sep(),
73409
- grp("Log", [copy, clear])
73460
+ grp("log", [copy, clear])
73410
73461
  ]
73411
73462
  ]);
73412
73463
  }
@@ -73416,12 +73467,18 @@ function build_title_header() {
73416
73467
  { class: "YDEV_TITLE" },
73417
73468
  [[
73418
73469
  "span",
73419
- { class: "YDEV_TITLE_MAIN" },
73420
- "Developer"
73470
+ {
73471
+ class: "YDEV_TITLE_MAIN",
73472
+ "data-i18n": "developer"
73473
+ },
73474
+ t("developer")
73421
73475
  ], [
73422
73476
  "span",
73423
- { class: "YDEV_TITLE_SUB" },
73424
- "yuno monitor · traffic & traces"
73477
+ {
73478
+ class: "YDEV_TITLE_SUB",
73479
+ "data-i18n": "yuno monitor"
73480
+ },
73481
+ t("yuno monitor")
73425
73482
  ]]
73426
73483
  ]);
73427
73484
  }
@@ -73519,7 +73576,7 @@ function setup_dev(self, show) {
73519
73576
  showFooter: false,
73520
73577
  auto_save_size_and_position: true,
73521
73578
  center: false,
73522
- title: "Developer",
73579
+ title: "developer",
73523
73580
  icon: "yi-terminal",
73524
73581
  manager: gobj_find_service("__window_manager__", false) || null,
73525
73582
  keep_on_navigate: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "7.23.111",
3
+ "version": "7.23.113",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
package/src/c_yui_form.js CHANGED
@@ -347,7 +347,7 @@ function toolbar_button(gobj, name)
347
347
  {
348
348
  switch(name) {
349
349
  case "save":
350
- return ['button', {class: 'button p-1 button-save', title: 'save', 'aria-label': 'save', disabled: true}, [
350
+ return ['button', {class: 'button p-1 button-save', title: t('save'), 'data-i18n-title': 'save', 'aria-label': t('save'), 'data-i18n-aria-label': 'save', disabled: true}, [
351
351
  ['span', {class: 'icon m-0'}, '<i class="yi-floppy-disk"></i>'],
352
352
  ['span', {class: 'is-hidden-mobile pl-1 pr-1', i18n: 'save'}, 'save']
353
353
  ], {
@@ -357,7 +357,7 @@ function toolbar_button(gobj, name)
357
357
  }
358
358
  }];
359
359
  case "undo":
360
- return ['button', {class: 'button p-1 button-undo', title: 'undo', 'aria-label': 'undo', disabled: true}, [
360
+ return ['button', {class: 'button p-1 button-undo', title: t('undo'), 'data-i18n-title': 'undo', 'aria-label': t('undo'), 'data-i18n-aria-label': 'undo', disabled: true}, [
361
361
  ['span', {class: 'icon m-0'}, '<i class="yi-arrow-rotate-left"></i>'],
362
362
  ['span', {class: 'is-hidden-mobile pl-1 pr-1', i18n: 'undo'}, 'undo']
363
363
  ], {
@@ -367,7 +367,7 @@ function toolbar_button(gobj, name)
367
367
  }
368
368
  }];
369
369
  case "clear":
370
- return ['button', {class: 'button p-1 button-clear', title: 'clear', 'aria-label': 'clear'}, [
370
+ return ['button', {class: 'button p-1 button-clear', title: t('clear'), 'data-i18n-title': 'clear', 'aria-label': t('clear'), 'data-i18n-aria-label': 'clear'}, [
371
371
  ['span', {class: 'icon m-0'}, '<i class="yi-broom-wide"></i>'],
372
372
  ['span', {class: 'is-hidden-mobile pl-1 pr-1', i18n: 'clear'}, 'clear']
373
373
  ], {
@@ -377,7 +377,7 @@ function toolbar_button(gobj, name)
377
377
  }
378
378
  }];
379
379
  case "copy":
380
- return ['button', {class: 'button p-1 button-copy', title: 'copy', 'aria-label': 'copy'}, [
380
+ return ['button', {class: 'button p-1 button-copy', title: t('copy'), 'data-i18n-title': 'copy', 'aria-label': t('copy'), 'data-i18n-aria-label': 'copy'}, [
381
381
  ['span', {class: 'icon m-0'}, '<i class="yi-copy"></i>'],
382
382
  ['span', {class: 'is-hidden-mobile pl-1 pr-1', i18n: 'copy'}, 'copy']
383
383
  ], {click: function(evt) {
@@ -386,7 +386,7 @@ function toolbar_button(gobj, name)
386
386
  }
387
387
  }];
388
388
  case "paste":
389
- return ['button', {class: 'button p-1 button-paste', title: 'paste', 'aria-label': 'paste'}, [
389
+ return ['button', {class: 'button p-1 button-paste', title: t('paste'), 'data-i18n-title': 'paste', 'aria-label': t('paste'), 'data-i18n-aria-label': 'paste'}, [
390
390
  ['span', {class: 'icon m-0'}, '<i class="yi-paste"></i>'],
391
391
  ['span', {class: 'is-hidden-mobile pl-1 pr-1', i18n: 'paste'}, 'paste']
392
392
  ], {click: async function(evt) {
@@ -2011,7 +2011,10 @@ function template2columns(gobj, columns, template, sub_elements)
2011
2011
  format: "dd/MM/yyyy hh:mm", // the format of the date value stored in the cell
2012
2012
  verticalNavigation: "table", //navigate cursor around table without changing the value
2013
2013
  elementAttributes: {
2014
- title:"slide bar to choose option" // custom tooltip
2014
+ /* Tabulator writes this attribute once, when the
2015
+ * editor opens, so it is translated then -- which
2016
+ * is also when it is read. */
2017
+ title: t("slide bar to choose option")
2015
2018
  }
2016
2019
  };
2017
2020
  switch(field_desc.real_type) {
package/src/c_yui_nav.js CHANGED
@@ -74,6 +74,8 @@ import {
74
74
  createElement2, empty_string, is_array, is_object, is_string,
75
75
  } from "@yuneta/gobj-js";
76
76
 
77
+ import {t} from "i18next";
78
+
77
79
  import { cards_grid_descriptor } from "./nav_cards_helpers.js";
78
80
  import {
79
81
  BULMA_BP_ORDER,
@@ -407,7 +409,8 @@ function render_tabs(gobj, items)
407
409
  if(it.closable) {
408
410
  children.push(["span", {class: "icon is-small yui-nav-close ml-2",
409
411
  "data-close-item": it.id, role: "button",
410
- "aria-label": "close", title: "close"},
412
+ "aria-label": t("close"), "data-i18n-aria-label": "close",
413
+ title: t("close"), "data-i18n-title": "close"},
411
414
  ["i", {class: "yi-xmark", "aria-hidden":"true"}]]);
412
415
  }
413
416
  let a_attrs = {
@@ -1384,7 +1384,13 @@ function create_tabulator(gobj)
1384
1384
  if(with_in_row_edit_icons) {
1385
1385
  columns.push({
1386
1386
  field: '_operation',
1387
- title: 'Op',
1387
+ /* A FORMATTER and not a `title`, like every other column of
1388
+ * this table: a language change re-runs `setColumns()` over
1389
+ * the SAME definitions, so a title decided when they were
1390
+ * built -- `'Op'`, in English and abbreviated -- is frozen
1391
+ * there for the life of the view. */
1392
+ title: '',
1393
+ titleFormatter: () => t('operations'),
1388
1394
  hozAlign: 'center',
1389
1395
  frozen: "right",
1390
1396
  visible: false,
@@ -61,7 +61,9 @@ class EditControl {
61
61
  {
62
62
  class: 'button is-small is-flex is-align-items-center is-justify-content-center',
63
63
  title: t('maplibre.drag_mark'),
64
+ "data-i18n-title": 'maplibre.drag_mark',
64
65
  "aria-label": t('maplibre.drag_mark'),
66
+ "data-i18n-aria-label": 'maplibre.drag_mark',
65
67
  },
66
68
  parseSVG(`
67
69
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="22" height="22" fill="#CCCCCC"><path d="M273 7c-9.4-9.4-24.6-9.4-33.9 0L167 79c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l31-31L232 232 81.9 232l31-31c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L7 239c-9.4 9.4-9.4 24.6 0 33.9l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-31-31L232 280l0 150.1-31-31c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c9.4 9.4 24.6 9.4 33.9 0l72-72c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-31 31L280 280l150.1 0-31 31c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l72-72c9.4-9.4 9.4-24.6 0-33.9l-72-72c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l31 31L280 232l0-150.1 31 31c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L273 7z"/></svg>
@@ -144,7 +146,9 @@ class MarkerControl {
144
146
  {
145
147
  class: 'button is-small is-flex is-align-items-center is-justify-content-center',
146
148
  title: t('maplibre.center_map'),
149
+ "data-i18n-title": 'maplibre.center_map',
147
150
  "aria-label": t('maplibre.center_map'),
151
+ "data-i18n-aria-label": 'maplibre.center_map',
148
152
  },
149
153
  parseSVG(`
150
154
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" width="22" height="22"><path d="M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z"/></svg>
@@ -166,7 +170,9 @@ class MarkerControl {
166
170
  {
167
171
  class: 'button is-small is-flex is-align-items-center is-justify-content-center',
168
172
  title: t('maplibre.user_location'),
173
+ "data-i18n-title": 'maplibre.user_location',
169
174
  "aria-label": t('maplibre.user_location'),
175
+ "data-i18n-aria-label": 'maplibre.user_location',
170
176
  },
171
177
  parseSVG(`
172
178
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="22" height="22" fill="#CCCCCC"><path d="M256 0c17.7 0 32 14.3 32 32l0 34.7C368.4 80.1 431.9 143.6 445.3 224l34.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-34.7 0C431.9 368.4 368.4 431.9 288 445.3l0 34.7c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.7C143.6 431.9 80.1 368.4 66.7 288L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l34.7 0C80.1 143.6 143.6 80.1 224 66.7L224 32c0-17.7 14.3-32 32-32zM128 256a128 128 0 1 0 256 0 128 128 0 1 0 -256 0zm128-80a80 80 0 1 1 0 160 80 80 0 1 1 0-160z"/></svg>