浏览代码

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

version-14
Rushabh Mehta 8 年前
父节点
当前提交
7166bc3e61
共有 4 个文件被更改,包括 23 次插入16 次删除
  1. +5
    -0
      frappe/desk/doctype/desktop_icon/desktop_icon.py
  2. +8
    -8
      frappe/integrations/paypal.py
  3. +6
    -7
      frappe/integrations/razorpay.py
  4. +4
    -1
      frappe/public/js/frappe/ui/filters/filters.js

+ 5
- 0
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


+ 8
- 8
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 = [


+ 6
- 7
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'


+ 4
- 1
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),
}));
}


正在加载...
取消
保存