Browse Source

Mark for translation: historyreport.xml

Neal Wilson 9 years ago
parent
commit
55f78dc0b2
1 changed files with 26 additions and 28 deletions
  1. 26
    28
      config/Reports/historyreport.xml

+ 26
- 28
config/Reports/historyreport.xml View File

20
     </menu>
20
     </menu>
21
     <program>
21
     <program>
22
         <![CDATA[
22
         <![CDATA[
23
-            this.setWindowTitle("Typica - Batch Log");
23
+            this.setWindowTitle(TTR("batchreport", "Typica - Batch Log"));
24
             var dateSelect = findChildObject(this, 'dates');
24
             var dateSelect = findChildObject(this, 'dates');
25
             var dateQuery = new QSqlQuery();
25
             var dateQuery = new QSqlQuery();
26
             dateQuery.exec("SELECT time::date FROM roasting_log WHERE time = (SELECT min(time) FROM roasting_log) OR time = (SELECT max(time) FROM roasting_log) ORDER BY time ASC");
26
             dateQuery.exec("SELECT time::date FROM roasting_log WHERE time = (SELECT min(time) FROM roasting_log) OR time = (SELECT max(time) FROM roasting_log) ORDER BY time ASC");
42
                 refresh();
42
                 refresh();
43
             });
43
             });
44
             var unitBox = findChildObject(this, 'unit');
44
             var unitBox = findChildObject(this, 'unit');
45
-            unitBox.addItem("Kg");
46
-            unitBox.addItem("Lb");
45
+            unitBox.addItem(TTR("batchreport", "Kg"));
46
+            unitBox.addItem(TTR("batchreport", "Lb"));
47
             unitBox.currentIndex = QSettings.value("script/history_unit", 1);
47
             unitBox.currentIndex = QSettings.value("script/history_unit", 1);
48
             unitBox['currentIndexChanged(int)'].connect(function() {
48
             unitBox['currentIndexChanged(int)'].connect(function() {
49
                 QSettings.setValue("script/history_unit", unitBox.currentIndex);
49
                 QSettings.setValue("script/history_unit", unitBox.currentIndex);
50
                 refresh();
50
                 refresh();
51
             });
51
             });
52
             var batchType = findChildObject(this, 'batchtype');
52
             var batchType = findChildObject(this, 'batchtype');
53
-            batchType.addItem("Any");
54
-            batchType.addItem("Production Roasts");
55
-            batchType.addItem("Sample Roasts");
53
+            batchType.addItem(TTR("batchreport", "Any"));
54
+            batchType.addItem(TTR("batchreport", "Production Roasts"));
55
+            batchType.addItem(TTR("batchreport", "Sample Roasts"));
56
             batchType.currentIndex = QSettings.value("script/history/batchtypefilter", 1);
56
             batchType.currentIndex = QSettings.value("script/history/batchtypefilter", 1);
57
             batchType['currentIndexChanged(int)'].connect(function() {
57
             batchType['currentIndexChanged(int)'].connect(function() {
58
                 QSettings.setValue("script/history/batchtypefilter", batchType.currentIndex);
58
                 QSettings.setValue("script/history/batchtypefilter", batchType.currentIndex);
59
                 refresh();
59
                 refresh();
60
             });
60
             });
61
             var approval = findChildObject(this, 'approval');
61
             var approval = findChildObject(this, 'approval');
62
-            approval.addItem("Any");
63
-            approval.addItem("Approved");
64
-            approval.addItem("Not Approved");
62
+            approval.addItem(TTR("batchreport", "Any"));
63
+            approval.addItem(TTR("batchreport", "Approved"));
64
+            approval.addItem(TTR("batchreport", "Not Approved"));
65
             approval.currentIndex = QSettings.value("script/history/approvalfilter", 1);
65
             approval.currentIndex = QSettings.value("script/history/approvalfilter", 1);
66
             approval['currentIndexChanged(int)'].connect(function() {
66
             approval['currentIndexChanged(int)'].connect(function() {
67
                 QSettings.setValue("script/history/approvalfilter", approval.currentIndex);
67
                 QSettings.setValue("script/history/approvalfilter", approval.currentIndex);
79
             view.scriptLinkClicked.connect(function(url) {
79
             view.scriptLinkClicked.connect(function(url) {
80
                 var arg = decodeURI(url.slice(2, url.length));
80
                 var arg = decodeURI(url.slice(2, url.length));
81
                 var key = arg.split("@");
81
                 var key = arg.split("@");
82
-                print("Handling click with key " + key);
83
                 var details = createWindow("batchDetails");
82
                 var details = createWindow("batchDetails");
84
                 var fakeTable = new Object;
83
                 var fakeTable = new Object;
85
                 fakeTable.holding = new Array(7);
84
                 fakeTable.holding = new Array(7);
98
                 query.exec();
97
                 query.exec();
99
                 query.next();
98
                 query.next();
100
                 for(var i = 0; i < 8; i++) {
99
                 for(var i = 0; i < 8; i++) {
101
-                    print("Constructing row with " + query.value(i));
102
                     fakeTable.holding[i] = query.value(i);
100
                     fakeTable.holding[i] = query.value(i);
103
                 }
101
                 }
104
                 fakeTable.holding[0] = key[1];
102
                 fakeTable.holding[0] = key[1];
160
                 output.writeStartElement("html");
158
                 output.writeStartElement("html");
161
                 output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
159
                 output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
162
                 output.writeStartElement("head");
160
                 output.writeStartElement("head");
163
-                output.writeTextElement("title", "Batch Log");
161
+                output.writeTextElement("title", TTR("batchreport", "Batch Log"));
164
                 output.writeEndElement();
162
                 output.writeEndElement();
165
                 output.writeStartElement("body");
163
                 output.writeStartElement("body");
166
                 output.writeStartElement("table");
164
                 output.writeStartElement("table");
170
                 output.writeStartElement("thead");
168
                 output.writeStartElement("thead");
171
                 output.writeStartElement("tr");
169
                 output.writeStartElement("tr");
172
                 output.writeAttribute("valign", "bottom");
170
                 output.writeAttribute("valign", "bottom");
173
-                output.writeTextElement("th", "Time");
174
-                output.writeTextElement("th", "File Numbers");
175
-                output.writeTextElement("th", "Operator");
176
-                output.writeTextElement("th", "Roasted Coffee");
171
+                output.writeTextElement("th", TTR("batchreport", "Time"));
172
+                output.writeTextElement("th", TTR("batchreport", "File Numbers"));
173
+                output.writeTextElement("th", TTR("batchreport", "Operator"));
174
+                output.writeTextElement("th", TTR("batchreport", "Roasted Coffee"));
177
                 output.writeEndElement();
175
                 output.writeEndElement();
178
                 output.writeStartElement("tr");
176
                 output.writeStartElement("tr");
179
                 output.writeAttribute("valign", "bottom");
177
                 output.writeAttribute("valign", "bottom");
180
                 output.writeEmptyElement("td");
178
                 output.writeEmptyElement("td");
181
-                output.writeTextElement("th", "Duration");
182
-                output.writeTextElement("th", "Machine");
183
-                output.writeTextElement("th", "Green Coffees");
179
+                output.writeTextElement("th", TTR("batchreport", "Duration"));
180
+                output.writeTextElement("th", TTR("batchreport", "Machine"));
181
+                output.writeTextElement("th", TTR("batchreport", "Green Coffees"));
184
                 output.writeEndElement();
182
                 output.writeEndElement();
185
                 output.writeStartElement("tr");
183
                 output.writeStartElement("tr");
186
                 output.writeAttribute("valign", "bottom");
184
                 output.writeAttribute("valign", "bottom");
187
                 output.writeEmptyElement("td");
185
                 output.writeEmptyElement("td");
188
-                output.writeTextElement("th", "Green Weight");
189
-                output.writeTextElement("th", "Roasted Weight");
190
-                output.writeTextElement("th", "% Weight Loss");
186
+                output.writeTextElement("th", TTR("batchreport", "Green Weight"));
187
+                output.writeTextElement("th", TTR("batchreport", "Roasted Weight"));
188
+                output.writeTextElement("th", TTR("batchreport", "% Weight Loss"));
191
                 output.writeEndElement();
189
                 output.writeEndElement();
192
                 output.writeStartElement("tr");
190
                 output.writeStartElement("tr");
193
                 output.writeAttribute("valign", "bottom");
191
                 output.writeAttribute("valign", "bottom");
194
                 output.writeEmptyElement("td");
192
                 output.writeEmptyElement("td");
195
                 output.writeStartElement("th");
193
                 output.writeStartElement("th");
196
                 output.writeAttribute("colspan", "2");
194
                 output.writeAttribute("colspan", "2");
197
-                output.writeCharacters("Batch Notes");
195
+                output.writeCharacters(TTR("batchreport", "Batch Notes"));
198
                 output.writeEndElement();
196
                 output.writeEndElement();
199
-                output.writeTextElement("th", "Specification Notes");
197
+                output.writeTextElement("th", TTR("batchreport", "Specification Notes"));
200
                 output.writeEndElement();
198
                 output.writeEndElement();
201
                 output.writeEndElement();
199
                 output.writeEndElement();
202
                 output.writeStartElement("tbody");
200
                 output.writeStartElement("tbody");
279
                 output.writeStartElement("tfoot");
277
                 output.writeStartElement("tfoot");
280
                 output.writeStartElement("tr");
278
                 output.writeStartElement("tr");
281
                 output.writeAttribute("valign", "bottom");
279
                 output.writeAttribute("valign", "bottom");
282
-                output.writeTextElement("th", "Total Batches");
283
-                output.writeTextElement("th", "Total Duration");
284
-                output.writeTextElement("th", "Total Green Weight");
285
-                output.writeTextElement("th", "Total Roasted Weight");
280
+                output.writeTextElement("th", TTR("batchreport", "Total Batches"));
281
+                output.writeTextElement("th", TTR("batchreport", "Total Duration"));
282
+                output.writeTextElement("th", TTR("batchreport", "Total Green Weight"));
283
+                output.writeTextElement("th", TTR("batchreport", "Total Roasted Weight"));
286
                 output.writeEndElement();
284
                 output.writeEndElement();
287
                 output.writeStartElement("tr");
285
                 output.writeStartElement("tr");
288
                 output.writeAttribute("valign", "top");
286
                 output.writeAttribute("valign", "top");

Loading…
Cancel
Save