Bladeren bron

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

version-14
Rushabh Mehta 8 jaren geleden
bovenliggende
commit
7166bc3e61
4 gewijzigde bestanden met toevoegingen van 23 en 16 verwijderingen
  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 Bestand weergeven

@@ -5,6 +5,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals


import frappe import frappe
from frappe import _
import json import json
import random import random
from frappe.model.document import Document from frappe.model.document import Document
@@ -81,6 +82,10 @@ def get_desktop_icons(user=None):
# sort by idx # sort by idx
user_icons.sort(lambda a, b: 1 if a.idx > b.idx else -1) 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) frappe.cache().hset('desktop_icons', user, user_icons)


return user_icons return user_icons


+ 8
- 8
frappe/integrations/paypal.py Bestand weergeven

@@ -2,14 +2,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt # 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 # 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): class Controller(IntegrationController):
service_name = 'PayPal' service_name = 'PayPal'
parameters_template = [ parameters_template = [


+ 6
- 7
frappe/integrations/razorpay.py Bestand weergeven

@@ -2,13 +2,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt # 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 # Integrating RazorPay


@@ -59,6 +52,12 @@ payment_status - payment gateway will put payment status on callback.
For razorpay payment status is Authorized 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): class Controller(IntegrationController):
service_name = 'Razorpay' service_name = 'Razorpay'


+ 4
- 1
frappe/public/js/frappe/ui/filters/filters.js Bestand weergeven

@@ -406,10 +406,13 @@ frappe.ui.Filter = Class.extend({
value = this.field.get_value(); value = this.field.get_value();
} }


// for translations
// __("like"), __("not like"), __("in")

this.$btn_group.find(".toggle-filter") this.$btn_group.find(".toggle-filter")
.html(repl('%(label)s %(condition)s "%(value)s"', { .html(repl('%(label)s %(condition)s "%(value)s"', {
label: __(this.field.df.label), label: __(this.field.df.label),
condition: this.get_condition(),
condition: __(this.get_condition()),
value: __(value), value: __(value),
})); }));
} }


Laden…
Annuleren
Opslaan