hotfix for project wise report

translation patch for email digest and support ticket.
This commit is contained in:
81552433qqcom 2014-09-16 16:49:58 +08:00
parent 93c2adb2cd
commit 1db294e837
4 changed files with 10 additions and 10 deletions

View File

@ -26,7 +26,7 @@ def get_columns():
_("Cost of Issued Items") + ":Currency:160", _("Cost of Delivered Items") + ":Currency:160",
_("Project Name") + "::120", _("Project Status") + "::120", _("Company") + ":Link/Company:100",
_("Customer") + ":Link/Customer:140", _("Project Value") + ":Currency:120",
_("Project Start Date") + ":Date:120", _("Completion Date") + ":Date:120"]+
_("Project Start Date") + ":Date:120", _("Completion Date") + ":Date:120"]
def get_project_details():
return frappe.db.sql(""" select name, project_name, status, company, customer, project_value,

View File

@ -73,7 +73,7 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
var fullname = frappe.user.full_name(v.name);
if(fullname !== v.name) v.name = fullname + " <" + v.name + ">";
if(v.enabled==0) {
v.name = repl("<span style='color: red'> %(name)s (disabled user)</span>", {name: v.name});
v.name = repl("<span style='color: red'> %(name)s (" + __("disabled user") + ")</span>", {name: v.name});
}
var user = $a($td(tab, i+1, 1), 'span', '', '', v.name);
//user.onclick = function() { check.checked = !check.checked; }
@ -81,11 +81,11 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
// Display add recipients button
if(r.user_list.length>15) {
$btn($td(tab, 0, 1), add_or_update + ' Recipients', function() {
$btn($td(tab, 0, 1), __('{0} Recipients',[__(add_or_update)]), function() {
cur_frm.cscript.add_to_rec_list(doc, tab, r.user_list.length);
});
}
$btn($td(tab, r.user_list.length+1, 1), add_or_update + ' Recipients', function() {
$btn($td(tab, r.user_list.length+1, 1),__('{0} Recipients',[__(add_or_update)]), function() {
cur_frm.cscript.add_to_rec_list(doc, tab, r.user_list.length);
});

View File

@ -129,7 +129,7 @@ class EmailDigest(Document):
with_value = "\n".join(with_value)
else:
has_updates = False
with_value = "<p>There were no updates in the items selected for this digest.</p><hr>"
with_value = "<p>" + _("There were no updates in the items selected for this digest.") + "</p><hr>"
if not has_updates and send_only_if_updates:
return
@ -137,7 +137,7 @@ class EmailDigest(Document):
# seperate out no value items
no_value = [o[1] for o in out if not o[0]]
if no_value:
no_value = """<h4>No Updates For:</h4>""" + "\n".join(no_value)
no_value = """<h4>""" + _("No Updates For") + """:</h4>""" + "\n".join(no_value)
date = self.frequency == "Daily" and formatdate(self.from_date) or \
"%s to %s" % (formatdate(self.from_date), formatdate(self.to_date))
@ -311,9 +311,9 @@ class EmailDigest(Document):
(e.subject, datetime_in_user_format(e.starts_on), datetime_in_user_format(e.ends_on))
if html:
return 1, "<h4>Upcoming Calendar Events (max 10):</h4><ul>" + html + "</ul><hr>"
return 1, "<h4>" + _("Upcoming Calendar Events (max 10)") + ":</h4><ul>" + html + "</ul><hr>"
else:
return 0, "<p>Calendar Events</p>"
return 0, "<p>" + _("Calendar Events") + "</p>"
def get_todo_list(self, user_id):
todo_list = frappe.db.sql("""select *

View File

@ -14,9 +14,9 @@ $.extend(cur_frm.cscript, {
cur_frm.cscript.make_listing(doc);
if(!doc.__islocal) {
if(cur_frm.fields_dict.status.get_status()=="Write") {
if(doc.status!='Closed') cur_frm.add_custom_button('Close',
if(doc.status!='Closed') cur_frm.add_custom_button(__('Close'),
cur_frm.cscript['Close Ticket'], "icon-ok", "btn-success");
if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket',
if(doc.status=='Closed') cur_frm.add_custom_button(__('Re-Open Ticket'),
cur_frm.cscript['Re-Open Ticket'], null, "btn-default");
}