mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 00:23:21 +00:00
Merge pull request #1514 from frappe/js-translate-refactor
JS translation refactor
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
// show tasks
|
||||
cur_frm.cscript.refresh = function(doc) {
|
||||
if(!doc.__islocal) {
|
||||
cur_frm.appframe.add_button(frappe._("Gantt Chart"), function() {
|
||||
cur_frm.appframe.add_button(__("Gantt Chart"), function() {
|
||||
frappe.route_options = {"project": doc.name}
|
||||
frappe.set_route("Gantt", "Task");
|
||||
}, "icon-tasks");
|
||||
cur_frm.add_custom_button(frappe._("Tasks"), function() {
|
||||
cur_frm.add_custom_button(__("Tasks"), function() {
|
||||
frappe.route_options = {"project": doc.name}
|
||||
frappe.set_route("List", "Task");
|
||||
}, "icon-list");
|
||||
|
||||
@@ -6,7 +6,7 @@ frappe.views.calendar["Task"] = {
|
||||
"start": "exp_start_date",
|
||||
"end": "exp_end_date",
|
||||
"id": "name",
|
||||
"title": frappe._("subject"),
|
||||
"title": __("subject"),
|
||||
"allDay": "allDay"
|
||||
},
|
||||
gantt: true,
|
||||
@@ -15,7 +15,7 @@ frappe.views.calendar["Task"] = {
|
||||
"fieldtype": "Link",
|
||||
"fieldname": "project",
|
||||
"options": "Project",
|
||||
"label": frappe._("Project")
|
||||
"label": __("Project")
|
||||
}
|
||||
],
|
||||
get_events_method: "erpnext.projects.doctype.task.task.get_events"
|
||||
|
||||
@@ -6,22 +6,22 @@ frappe.listview_settings['Time Log'] = {
|
||||
add_fields: ["`tabTime Log`.`status`", "`tabTime Log`.`billable`", "`tabTime Log`.`activity_type`"],
|
||||
selectable: true,
|
||||
onload: function(me) {
|
||||
me.appframe.add_button(frappe._("Make Time Log Batch"), function() {
|
||||
me.appframe.add_button(__("Make Time Log Batch"), function() {
|
||||
var selected = me.get_checked_items() || [];
|
||||
|
||||
if(!selected.length) {
|
||||
msgprint(frappe._("Please select Time Logs."))
|
||||
msgprint(__("Please select Time Logs."))
|
||||
}
|
||||
|
||||
// select only billable time logs
|
||||
for(var i in selected) {
|
||||
var d = selected[i];
|
||||
if(!d.billable) {
|
||||
msgprint(frappe._("Time Log is not billable") + ": " + d.name);
|
||||
msgprint(__("Time Log is not billable") + ": " + d.name);
|
||||
return;
|
||||
}
|
||||
if(d.status!="Submitted") {
|
||||
msgprint(frappe._("Time Log Status must be Submitted."));
|
||||
msgprint(__("Time Log Status must be Submitted."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@ cur_frm.set_query("time_log", "time_log_batch_details", function(doc) {
|
||||
$.extend(cur_frm.cscript, {
|
||||
refresh: function(doc) {
|
||||
cur_frm.set_intro({
|
||||
"Draft": frappe._("Select Time Logs and Submit to create a new Sales Invoice."),
|
||||
"Submitted": frappe._("Click on 'Make Sales Invoice' button to create a new Sales Invoice."),
|
||||
"Billed": frappe._("This Time Log Batch has been billed."),
|
||||
"Cancelled": frappe._("This Time Log Batch has been cancelled.")
|
||||
"Draft": __("Select Time Logs and Submit to create a new Sales Invoice."),
|
||||
"Submitted": __("Click on 'Make Sales Invoice' button to create a new Sales Invoice."),
|
||||
"Billed": __("This Time Log Batch has been billed."),
|
||||
"Cancelled": __("This Time Log Batch has been cancelled.")
|
||||
}[doc.status]);
|
||||
|
||||
if(doc.status=="Submitted") {
|
||||
cur_frm.add_custom_button(frappe._("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() },
|
||||
cur_frm.add_custom_button(__("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() },
|
||||
"icon-file-alt");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5,13 +5,13 @@ frappe.query_reports["Daily Time Log Summary"] = {
|
||||
"filters": [
|
||||
{
|
||||
"fieldname":"from_date",
|
||||
"label": frappe._("From Date"),
|
||||
"label": __("From Date"),
|
||||
"fieldtype": "Date",
|
||||
"default": frappe.datetime.get_today()
|
||||
},
|
||||
{
|
||||
"fieldname":"to_date",
|
||||
"label": frappe._("To Date"),
|
||||
"label": __("To Date"),
|
||||
"fieldtype": "Date",
|
||||
"default": frappe.datetime.get_today()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user