[translation] [fixes] frappe/erpnext#5860 and docs

This commit is contained in:
Rushabh Mehta 2016-09-15 15:16:22 +05:30
parent 2e66bd044b
commit 7166bc3e61
4 changed files with 23 additions and 16 deletions

View file

@ -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

View file

@ -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 = [

View file

@ -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'

View file

@ -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),
}));
}