@yuneta/gobj-ui 7.10.1 → 7.10.2

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.
@@ -18540,7 +18540,7 @@ function build_delete_question(gobj, records) {
18540
18540
  ], [
18541
18541
  "span",
18542
18542
  { i18n: "children will be unlinked, not deleted" },
18543
- (0, i18next.t)("children will be unlinked, not deleted")
18543
+ (0, i18next.t)("children will be unlinked, not deleted", { count: impact.children })
18544
18544
  ]]
18545
18545
  ]);
18546
18546
  if (impact.parents > 0) lines.push([
@@ -18563,7 +18563,7 @@ function build_delete_question(gobj, records) {
18563
18563
  [
18564
18564
  "span",
18565
18565
  { i18n: "parents" },
18566
- (0, i18next.t)("parents")
18566
+ (0, i18next.t)("parents", { count: impact.parents })
18567
18567
  ]
18568
18568
  ]
18569
18569
  ]);
@@ -56646,8 +56646,8 @@ function show_delete_confirm(gobj, nodeData) {
56646
56646
  let topic_name = nodeData.data.desc.topic_name;
56647
56647
  let impact = delete_impact(nodeData.data.desc, record);
56648
56648
  let question = (0, i18next.t)("delete") + " " + topic_name + ": " + record.id + "?";
56649
- if (impact.children > 0) question += "\n" + impact.children + " " + (0, i18next.t)("children will be unlinked, not deleted");
56650
- if (impact.parents > 0) question += "\n" + (0, i18next.t)("it will be detached from") + " " + impact.parents + " " + (0, i18next.t)("parents");
56649
+ if (impact.children > 0) question += "\n" + impact.children + " " + (0, i18next.t)("children will be unlinked, not deleted", { count: impact.children });
56650
+ if (impact.parents > 0) question += "\n" + (0, i18next.t)("it will be detached from") + " " + impact.parents + " " + (0, i18next.t)("parents", { count: impact.parents });
56651
56651
  show_confirm_popover(gobj, priv._node_delete_el, question, "delete", "#ff4d4f", () => execute_delete_node(gobj, nodeData), "_delete_confirm_el");
56652
56652
  }
56653
56653
  function hide_delete_confirm(gobj) {
@@ -18535,7 +18535,7 @@ function build_delete_question(gobj, records) {
18535
18535
  ], [
18536
18536
  "span",
18537
18537
  { i18n: "children will be unlinked, not deleted" },
18538
- t("children will be unlinked, not deleted")
18538
+ t("children will be unlinked, not deleted", { count: impact.children })
18539
18539
  ]]
18540
18540
  ]);
18541
18541
  if (impact.parents > 0) lines.push([
@@ -18558,7 +18558,7 @@ function build_delete_question(gobj, records) {
18558
18558
  [
18559
18559
  "span",
18560
18560
  { i18n: "parents" },
18561
- t("parents")
18561
+ t("parents", { count: impact.parents })
18562
18562
  ]
18563
18563
  ]
18564
18564
  ]);
@@ -56633,8 +56633,8 @@ function show_delete_confirm(gobj, nodeData) {
56633
56633
  let topic_name = nodeData.data.desc.topic_name;
56634
56634
  let impact = delete_impact(nodeData.data.desc, record);
56635
56635
  let question = t("delete") + " " + topic_name + ": " + record.id + "?";
56636
- if (impact.children > 0) question += "\n" + impact.children + " " + t("children will be unlinked, not deleted");
56637
- if (impact.parents > 0) question += "\n" + t("it will be detached from") + " " + impact.parents + " " + t("parents");
56636
+ if (impact.children > 0) question += "\n" + impact.children + " " + t("children will be unlinked, not deleted", { count: impact.children });
56637
+ if (impact.parents > 0) question += "\n" + t("it will be detached from") + " " + impact.parents + " " + t("parents", { count: impact.parents });
56638
56638
  show_confirm_popover(gobj, priv._node_delete_el, question, "delete", "#ff4d4f", () => execute_delete_node(gobj, nodeData), "_delete_confirm_el");
56639
56639
  }
56640
56640
  function hide_delete_confirm(gobj) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "7.10.1",
3
+ "version": "7.10.2",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -5012,11 +5012,11 @@ function show_delete_confirm(gobj, nodeData)
5012
5012
  let question = t('delete') + ' ' + topic_name + ': ' + record.id + '?';
5013
5013
  if(impact.children > 0) {
5014
5014
  question += '\n' + impact.children + ' ' +
5015
- t('children will be unlinked, not deleted');
5015
+ t('children will be unlinked, not deleted', {count: impact.children});
5016
5016
  }
5017
5017
  if(impact.parents > 0) {
5018
5018
  question += '\n' + t('it will be detached from') + ' ' +
5019
- impact.parents + ' ' + t('parents');
5019
+ impact.parents + ' ' + t('parents', {count: impact.parents});
5020
5020
  }
5021
5021
 
5022
5022
  show_confirm_popover(gobj, priv._node_delete_el,
@@ -3070,15 +3070,20 @@ function build_delete_question(gobj, records)
3070
3070
  lines.push(["p", {class: "DELETE_ASK_CHILDREN has-text-weight-semibold",
3071
3071
  style: ROW}, [
3072
3072
  ["strong", {}, String(impact.children)],
3073
+ /* `count` picks the singular: i18next looks for the `_one`
3074
+ * variant and falls back to the base key for the plural, so
3075
+ * the validator still sees a key it can find. Safe against a
3076
+ * language switch because this is a MODAL — a dialog with a
3077
+ * backdrop never sees one; the language button is behind it. */
3073
3078
  ["span", {i18n: "children will be unlinked, not deleted"},
3074
- t("children will be unlinked, not deleted")]
3079
+ t("children will be unlinked, not deleted", {count: impact.children})]
3075
3080
  ]]);
3076
3081
  }
3077
3082
  if(impact.parents > 0) {
3078
3083
  lines.push(["p", {class: "DELETE_ASK_PARENTS", style: ROW}, [
3079
3084
  ["span", {i18n: "it will be detached from"}, t("it will be detached from")],
3080
3085
  ["strong", {}, String(impact.parents)],
3081
- ["span", {i18n: "parents"}, t("parents")]
3086
+ ["span", {i18n: "parents"}, t("parents", {count: impact.parents})]
3082
3087
  ]]);
3083
3088
  }
3084
3089