diff --git a/frappe/desk/doctype/desktop_icon/desktop_icon.py b/frappe/desk/doctype/desktop_icon/desktop_icon.py index fb707df280..90ebd95b80 100644 --- a/frappe/desk/doctype/desktop_icon/desktop_icon.py +++ b/frappe/desk/doctype/desktop_icon/desktop_icon.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ import json import random from frappe.model.document import Document @@ -81,6 +82,10 @@ def get_desktop_icons(user=None): # sort by idx user_icons.sort(lambda a, b: 1 if a.idx > b.idx else -1) + # translate + for d in user_icons: + if d.label: d.label = _(d.label) + frappe.cache().hset('desktop_icons', user, user_icons) return user_icons diff --git a/frappe/integrations/paypal.py b/frappe/integrations/paypal.py index d7c6fef91f..f490e04295 100644 --- a/frappe/integrations/paypal.py +++ b/frappe/integrations/paypal.py @@ -2,14 +2,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals -import frappe -import json -from frappe import _ -from urllib import urlencode -from frappe.utils import get_url, call_hook_method -from frappe.integration_broker.integration_controller import IntegrationController - """ # Integrating PayPal @@ -58,6 +50,14 @@ For paypal payment status parameter is one from: [Completed, Cancelled, Failed] """ +from __future__ import unicode_literals +import frappe +import json +from frappe import _ +from urllib import urlencode +from frappe.utils import get_url, call_hook_method +from frappe.integration_broker.integration_controller import IntegrationController + class Controller(IntegrationController): service_name = 'PayPal' parameters_template = [ diff --git a/frappe/integrations/razorpay.py b/frappe/integrations/razorpay.py index 30485cfb53..93e3dfc475 100644 --- a/frappe/integrations/razorpay.py +++ b/frappe/integrations/razorpay.py @@ -2,13 +2,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals -import frappe -from frappe import _ -import urllib, json -from frappe.utils import get_url, call_hook_method -from frappe.integration_broker.integration_controller import IntegrationController - """ # Integrating RazorPay @@ -59,6 +52,12 @@ payment_status - payment gateway will put payment status on callback. For razorpay payment status is Authorized """ +from __future__ import unicode_literals +import frappe +from frappe import _ +import urllib, json +from frappe.utils import get_url, call_hook_method +from frappe.integration_broker.integration_controller import IntegrationController class Controller(IntegrationController): service_name = 'Razorpay' diff --git a/frappe/public/js/frappe/ui/filters/filters.js b/frappe/public/js/frappe/ui/filters/filters.js index cb439f637e..cec3a86924 100644 --- a/frappe/public/js/frappe/ui/filters/filters.js +++ b/frappe/public/js/frappe/ui/filters/filters.js @@ -406,10 +406,13 @@ frappe.ui.Filter = Class.extend({ value = this.field.get_value(); } + // for translations + // __("like"), __("not like"), __("in") + this.$btn_group.find(".toggle-filter") .html(repl('%(label)s %(condition)s "%(value)s"', { label: __(this.field.df.label), - condition: this.get_condition(), + condition: __(this.get_condition()), value: __(value), })); }