Quellcode durchsuchen

Translation markups: cogr.xml and dailyproductiondetail.xml

Neal Wilson vor 9 Jahren
Ursprung
Commit
1f6ec16818
2 geänderte Dateien mit 25 neuen und 25 gelöschten Zeilen
  1. 2
    2
      config/Reports/cogr.xml
  2. 23
    23
      config/Reports/dailyproductiondetail.xml

+ 2
- 2
config/Reports/cogr.xml Datei anzeigen

@@ -19,8 +19,8 @@
19 19
                 report.print();
20 20
             });
21 21
             var unitBox = findChildObject(this, 'unit');
22
-            unitBox.addItem(TTR("greencost", "Kg");
23
-            unitBox.addItem(TTR("greencost", "Lb");
22
+            unitBox.addItem(TTR("greencost", "Kg"));
23
+            unitBox.addItem(TTR("greencost", "Lb"));
24 24
             unitBox.currentIndex = QSettings.value("script/report_unit", 1);
25 25
             unitBox['currentIndexChanged(int)'].connect(function() {
26 26
                 QSettings.setValue("script/report_unit", unitBox.currentIndex);

+ 23
- 23
config/Reports/dailyproductiondetail.xml Datei anzeigen

@@ -49,12 +49,12 @@
49 49
 				output.writeStartElement("html");
50 50
 				output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
51 51
 				output.writeStartElement("head");
52
-				output.writeTextElement("title", "Daily Production Report");
52
+				output.writeTextElement("title", TTR("dailyproduction", "Daily Production Report"));
53 53
 				output.writeEndElement();
54 54
 				output.writeStartElement("body");
55 55
 				var dateString = "" + dateField.year() + "-" + dateField.month() + "-" + dateField.day();
56
-				output.writeTextElement("h1", "Daily Production Report: " + dateString);
57
-				output.writeTextElement("h2", "Batches Roasted");
56
+				output.writeTextElement("h1", TTR("dailyproduction", "Daily Production Report: ") + dateString);
57
+				output.writeTextElement("h2", TTR("dailyproduction", "Batches Roasted"));
58 58
 				var query = new QSqlQuery();
59 59
 				var q = "SELECT time, machine, (SELECT name FROM machine WHERE id = machine), (SELECT name FROM items WHERE id = roasted_id), unroasted_id, unroasted_quantity, unroasted_total_quantity, roasted_id, roasted_quantity, annotation, duration, files, (SELECT loss FROM roasting_specification WHERE item = roasted_id AND time = (SELECT max(time) FROM roasting_specification WHERE time <= roasting_log.time AND item = roasted_id)), (SELECT tolerance FROM roasting_specification WHERE item = roasted_id AND time = (SELECT max(time) FROM roasting_specification WHERE time <= roasting_log.time AND item = roasted_id)), (SELECT notes FROM roasting_specification WHERE item = roasted_id AND time = (SELECT max(time) FROM roasting_specification WHERE time <= roasting_log.time AND item = roasted_id)), approval FROM roasting_log WHERE time > '" + dateString + "' AND time < ('" + dateString + "'::date + integer '1') ORDER BY time";
60 60
 				query.exec(q);
@@ -66,31 +66,31 @@
66 66
 				output.writeStartElement("thead");
67 67
 				output.writeStartElement("tr");
68 68
                                 output.writeAttribute("valign", "bottom");
69
-				output.writeTextElement("th", "Time");
70
-				output.writeTextElement("th", "Machine");
71
-				output.writeTextElement("th", "Batch ID");
69
+				output.writeTextElement("th", TTR("dailyproduction", "Time"));
70
+				output.writeTextElement("th", TTR("dailyproduction", "Machine"));
71
+				output.writeTextElement("th", TTR("dailyproduction", "Batch ID"));
72 72
 				switch(unitBox.currentIndex)
73 73
 				{
74 74
 					case 0:
75
-						output.writeTextElement("th", "Green Weights (Kg)");
75
+						output.writeTextElement("th", TTR("dailyproduction", "Green Weights (Kg)"));
76 76
 						break;
77 77
 					case 1:
78
-						output.writeTextElement("th", "Green Weights (Lb)");
78
+						output.writeTextElement("th", TTR("dailyproduction", "Green Weights (Lb)"));
79 79
 						break;
80 80
 				}
81 81
 				output.writeTextElement("th", "Green Coffees");
82 82
 				switch(unitBox.currentIndex)
83 83
 				{
84 84
 					case 0:
85
-						output.writeTextElement("th", "Roasted Weight (Kg)");
85
+						output.writeTextElement("th", TTR("dailyproduction", "Roasted Weight (Kg)"));
86 86
 						break;
87 87
 					case 1:
88
-						output.writeTextElement("th", "Roasted Weight (Lb)");
88
+						output.writeTextElement("th", TTR("dailyproduction", "Roasted Weight (Lb)"));
89 89
 						break;
90 90
 				}
91
-				output.writeTextElement("th", "Roasted Coffee");
92
-				output.writeTextElement("th", "% Weight Loss");
93
-				output.writeTextElement("th", "Duration");
91
+				output.writeTextElement("th", TTR("dailyproduction", "Roasted Coffee"));
92
+				output.writeTextElement("th", TTR("dailyproduction", "% Weight Loss"));
93
+				output.writeTextElement("th", TTR("dailyproduction", "Duration"));
94 94
 				output.writeEndElement();
95 95
 				output.writeEndElement();
96 96
 				output.writeStartElement("tbody");
@@ -231,7 +231,7 @@
231 231
 					output.writeStartElement("tr");
232 232
 					output.writeStartElement("td");
233 233
 					output.writeAttribute("colspan", "5");
234
-					output.writeTextElement("strong", "Profile Summary");
234
+					output.writeTextElement("strong", TTR("dailyproduction", "Profile Summary"));
235 235
 					var buffer2 = new QBuffer("<points>"+annotations+"</points>");
236 236
 					buffer2.open(1);
237 237
 					var colQuery = new XQuery;
@@ -240,12 +240,12 @@
240 240
 					var result = colQuery.exec();
241 241
 					buffer2.close();
242 242
 					var seriesHeaders = new Array();
243
-					seriesHeaders.push("Time");
243
+					seriesHeaders.push(TTR("dailyproduction", "Time"));
244 244
 					var records = result.split(";");
245 245
 					for(var i = 0; i < records.length - 1; i++) {
246 246
 						seriesHeaders.push(records[i].replace(/^\s+|\s+$/g,""));
247 247
 					}
248
-					seriesHeaders.push("Note");
248
+					seriesHeaders.push(TTR("dailyproduction", "Note"));
249 249
 					output.writeStartElement("table");
250 250
 					output.writeStartElement("thead");
251 251
 					output.writeStartElement("tr");
@@ -328,7 +328,7 @@
328 328
 				output.writeEmptyElement("td");
329 329
 				output.writeEmptyElement("td");
330 330
 				output.writeStartElement("td");
331
-				output.writeTextElement("strong", "Totals:");
331
+				output.writeTextElement("strong", TTR("dailyproduction", "Totals:"));
332 332
 				output.writeEndElement();
333 333
 				q = "SELECT sum(unroasted_total_quantity), sum(roasted_quantity), sum(duration) FROM roasting_log WHERE time > '" + dateString + "' AND time < ('" + dateString + "'::date + integer '1')";
334 334
 				query.exec(q);
@@ -358,17 +358,17 @@
358 358
 				output.writeEndElement();
359 359
 				output.writeEndElement(); //tfoot
360 360
 				output.writeEndElement(); //table
361
-				output.writeTextElement("h2", "Inventory");
361
+				output.writeTextElement("h2", TTR("dailyproduction", "Inventory"));
362 362
 				output.writeStartElement("table");
363 363
 				output.writeAttribute("rules", "groups");
364 364
 				output.writeAttribute("cellpadding", "3px");
365 365
 				output.writeStartElement("thead");
366 366
 				output.writeStartElement("tr");
367
-				output.writeTextElement("th", "Green Coffee");
368
-				output.writeTextElement("th", "Starting Inventory");
369
-				output.writeTextElement("th", "Ending Inventory");
370
-				output.writeTextElement("th", "Change");
371
-				output.writeTextElement("th", "Availability");
367
+				output.writeTextElement("th", TTR("dailyproduction", "Green Coffee"));
368
+				output.writeTextElement("th", TTR("dailyproduction", "Starting Inventory"));
369
+				output.writeTextElement("th", TTR("dailyproduction", "Ending Inventory"));
370
+				output.writeTextElement("th", TTR("dailyproduction", "Change"));
371
+				output.writeTextElement("th", TTR("dailyproduction", "Availability"));
372 372
 				output.writeEndElement();
373 373
 				output.writeEndElement();
374 374
 				output.writeStartElement("tbody");

Laden…
Abbrechen
Speichern