fix: translations and route fixes
diff --git a/erpnext/hub_node/api.py b/erpnext/hub_node/api.py
index 06ad222..3f260f0 100644
--- a/erpnext/hub_node/api.py
+++ b/erpnext/hub_node/api.py
@@ -138,7 +138,7 @@
items_to_update.append(item)
hub_tracked_item = frappe.get_doc('Hub Tracked Item', item_code)
hub_tracked_item.update(hub_dict)
- hub_tracked_items.save()
+ hub_tracked_item.save()
else:
frappe.get_doc(hub_dict).insert(ignore_if_duplicate=True)
diff --git a/erpnext/public/js/hub/pages/Home.vue b/erpnext/public/js/hub/pages/Home.vue
index 79cfe46..2aa4f29 100644
--- a/erpnext/public/js/hub/pages/Home.vue
+++ b/erpnext/public/js/hub/pages/Home.vue
@@ -60,7 +60,9 @@
},
mounted() {
frappe.route.on('change', () => {
- this.get_items();
+ if (frappe.get_route_str() === 'marketplace/home') {
+ this.get_items();
+ }
})
},
methods: {
diff --git a/erpnext/public/js/hub/pages/Item.vue b/erpnext/public/js/hub/pages/Item.vue
index d0c0ebe..6d738eb 100644
--- a/erpnext/public/js/hub/pages/Item.vue
+++ b/erpnext/public/js/hub/pages/Item.vue
@@ -205,9 +205,7 @@
hub_user: frappe.session.user
})
.then(() => {
- const saved_items_link = `<b><a href="#marketplace/saved-items">${__(
- 'Saved'
- )}</a></b>`;
+ const saved_items_link = `<b><a href="#marketplace/saved-items">${__('Saved')}</a></b>`;
frappe.show_alert(saved_items_link);
erpnext.hub.trigger('action:item_save');
})
@@ -223,9 +221,7 @@
hub_user: frappe.session.user
})
.then(() => {
- const featured_items_link = `<b><a href="#marketplace/featured-items">${__(
- 'Added to Featured Items'
- )}</a></b>`;
+ const featured_items_link = `<b><a href="#marketplace/featured-items">${__('Added to Featured Items')}</a></b>`;
frappe.show_alert(featured_items_link);
erpnext.hub.trigger('action:item_feature');
})
@@ -309,7 +305,7 @@
},
unpublish_item() {
- frappe.confirm(__(`Unpublish ${this.item.item_name}?`), () => {
+ frappe.confirm(__(`Unpublish {0}?`, [this.item.item_name]), () => {
frappe
.call('erpnext.hub_node.api.unpublish_item', {
item_code: this.item.item_code,