Browse Source

Mark for translation: historyreport.xml

Neal Wilson 8 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,7 +20,7 @@
20 20
     </menu>
21 21
     <program>
22 22
         <![CDATA[
23
-            this.setWindowTitle("Typica - Batch Log");
23
+            this.setWindowTitle(TTR("batchreport", "Typica - Batch Log"));
24 24
             var dateSelect = findChildObject(this, 'dates');
25 25
             var dateQuery = new QSqlQuery();
26 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,26 +42,26 @@
42 42
                 refresh();
43 43
             });
44 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 47
             unitBox.currentIndex = QSettings.value("script/history_unit", 1);
48 48
             unitBox['currentIndexChanged(int)'].connect(function() {
49 49
                 QSettings.setValue("script/history_unit", unitBox.currentIndex);
50 50
                 refresh();
51 51
             });
52 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 56
             batchType.currentIndex = QSettings.value("script/history/batchtypefilter", 1);
57 57
             batchType['currentIndexChanged(int)'].connect(function() {
58 58
                 QSettings.setValue("script/history/batchtypefilter", batchType.currentIndex);
59 59
                 refresh();
60 60
             });
61 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 65
             approval.currentIndex = QSettings.value("script/history/approvalfilter", 1);
66 66
             approval['currentIndexChanged(int)'].connect(function() {
67 67
                 QSettings.setValue("script/history/approvalfilter", approval.currentIndex);
@@ -79,7 +79,6 @@
79 79
             view.scriptLinkClicked.connect(function(url) {
80 80
                 var arg = decodeURI(url.slice(2, url.length));
81 81
                 var key = arg.split("@");
82
-                print("Handling click with key " + key);
83 82
                 var details = createWindow("batchDetails");
84 83
                 var fakeTable = new Object;
85 84
                 fakeTable.holding = new Array(7);
@@ -98,7 +97,6 @@
98 97
                 query.exec();
99 98
                 query.next();
100 99
                 for(var i = 0; i < 8; i++) {
101
-                    print("Constructing row with " + query.value(i));
102 100
                     fakeTable.holding[i] = query.value(i);
103 101
                 }
104 102
                 fakeTable.holding[0] = key[1];
@@ -160,7 +158,7 @@
160 158
                 output.writeStartElement("html");
161 159
                 output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
162 160
                 output.writeStartElement("head");
163
-                output.writeTextElement("title", "Batch Log");
161
+                output.writeTextElement("title", TTR("batchreport", "Batch Log"));
164 162
                 output.writeEndElement();
165 163
                 output.writeStartElement("body");
166 164
                 output.writeStartElement("table");
@@ -170,33 +168,33 @@
170 168
                 output.writeStartElement("thead");
171 169
                 output.writeStartElement("tr");
172 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 175
                 output.writeEndElement();
178 176
                 output.writeStartElement("tr");
179 177
                 output.writeAttribute("valign", "bottom");
180 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 182
                 output.writeEndElement();
185 183
                 output.writeStartElement("tr");
186 184
                 output.writeAttribute("valign", "bottom");
187 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 189
                 output.writeEndElement();
192 190
                 output.writeStartElement("tr");
193 191
                 output.writeAttribute("valign", "bottom");
194 192
                 output.writeEmptyElement("td");
195 193
                 output.writeStartElement("th");
196 194
                 output.writeAttribute("colspan", "2");
197
-                output.writeCharacters("Batch Notes");
195
+                output.writeCharacters(TTR("batchreport", "Batch Notes"));
198 196
                 output.writeEndElement();
199
-                output.writeTextElement("th", "Specification Notes");
197
+                output.writeTextElement("th", TTR("batchreport", "Specification Notes"));
200 198
                 output.writeEndElement();
201 199
                 output.writeEndElement();
202 200
                 output.writeStartElement("tbody");
@@ -279,10 +277,10 @@
279 277
                 output.writeStartElement("tfoot");
280 278
                 output.writeStartElement("tr");
281 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 284
                 output.writeEndElement();
287 285
                 output.writeStartElement("tr");
288 286
                 output.writeAttribute("valign", "top");

Loading…
Cancel
Save