fix: translating Error (#18140)

This commit is contained in:
Anurag Mishra
2019-07-03 11:42:33 +05:30
committed by Nabin Hait
parent bdeaf4880f
commit 29433f2b1b
11 changed files with 24 additions and 20 deletions

View File

@@ -2,6 +2,7 @@ from __future__ import unicode_literals
import frappe
import json
from frappe import _
from frappe import _
from frappe.frappeclient import FrappeClient
@@ -120,7 +121,7 @@ def get_valid_items(search_value=''):
def publish_selected_items(items_to_publish):
items_to_publish = json.loads(items_to_publish)
if not len(items_to_publish):
frappe.throw('No items to publish')
frappe.throw(_('No items to publish'))
for item in items_to_publish:
item_code = item.get('item_code')
@@ -165,7 +166,7 @@ def item_sync_preprocess(intended_item_publish_count):
frappe.db.set_value("Marketplace Settings", "Marketplace Settings", "sync_in_progress", 1)
return response
else:
frappe.throw('Unable to update remote activity')
frappe.throw(_('Unable to update remote activity'))
def item_sync_postprocess():
@@ -173,7 +174,7 @@ def item_sync_postprocess():
if response:
frappe.db.set_value('Marketplace Settings', 'Marketplace Settings', 'last_sync_datetime', frappe.utils.now())
else:
frappe.throw('Unable to update remote activity')
frappe.throw(_('Unable to update remote activity'))
frappe.db.set_value('Marketplace Settings', 'Marketplace Settings', 'sync_in_progress', 0)