瀏覽代碼

Mark for translation: rwacp.xml

Neal Wilson 8 年之前
父節點
當前提交
f865e5be4c
共有 1 個文件被更改,包括 25 次插入21 次删除
  1. 25
    21
      config/Reports/rwacp.xml

+ 25
- 21
config/Reports/rwacp.xml 查看文件

21
     </menu>
21
     </menu>
22
     <program>
22
     <program>
23
         <![CDATA[
23
         <![CDATA[
24
-            this.windowTitle = "Typica - Recent Average Coffee Production";
24
+            this.windowTitle = TTR("productionreport", "Typica - Recent Average Coffee Production");
25
             var report = findChildObject(this, 'report');
25
             var report = findChildObject(this, 'report');
26
             var printMenu = findChildObject(this, 'print');
26
             var printMenu = findChildObject(this, 'print');
27
             printMenu.triggered.connect(function() {
27
             printMenu.triggered.connect(function() {
28
                 report.print();
28
                 report.print();
29
             });
29
             });
30
             var sortBox = findChildObject(this, 'sort');
30
             var sortBox = findChildObject(this, 'sort');
31
-            sortBox.addItem("Roasted Coffee A-Z");
32
-            sortBox.addItem("Roasted Coffee Z-A");
33
-            sortBox.addItem("Weekly Use Ascending");
34
-            sortBox.addItem("Weekly Use Descending");
31
+            sortBox.addItem(TTR("productionreport", "Roasted Coffee A-Z"));
32
+            sortBox.addItem(TTR("productionreport", "Roasted Coffee Z-A"));
33
+            sortBox.addItem(TTR("productionreport", "Weekly Use Ascending"));
34
+            sortBox.addItem(TTR("productionreport", "Weekly Use Descending"));
35
             sortBox.currentIndex = QSettings.value("rwacp_sort", 3);
35
             sortBox.currentIndex = QSettings.value("rwacp_sort", 3);
36
             var unitBox = findChildObject(this, 'unit');
36
             var unitBox = findChildObject(this, 'unit');
37
-            unitBox.addItem("Kg");
38
-            unitBox.addItem("Lb");
37
+            unitBox.addItem(TTR("productionreport", "Kg"));
38
+            unitBox.addItem(TTR("productionreport", "Lb"));
39
             unitBox.currentIndex = QSettings.value("script/report_unit", 1);
39
             unitBox.currentIndex = QSettings.value("script/report_unit", 1);
40
             var batchType = findChildObject(this, 'batchtype');
40
             var batchType = findChildObject(this, 'batchtype');
41
-            batchType.addItem("Any");
42
-            batchType.addItem("Production Roasts");
43
-            batchType.addItem("Sample Roasts");
41
+            batchType.addItem(TTR("productionreport", "Any"));
42
+            batchType.addItem(TTR("productionreport", "Production Roasts"));
43
+            batchType.addItem(TTR("productionreport", "Sample Roasts"));
44
             batchType.currentIndex = QSettings.value("script/racpreport/batchtypefilter", 1);
44
             batchType.currentIndex = QSettings.value("script/racpreport/batchtypefilter", 1);
45
             batchType['currentIndexChanged(int)'].connect(function() {
45
             batchType['currentIndexChanged(int)'].connect(function() {
46
                 QSettings.setValue("script/racpreport/batchtypefilter",
46
                 QSettings.setValue("script/racpreport/batchtypefilter",
74
                 output.writeStartElement("html");
74
                 output.writeStartElement("html");
75
                 output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
75
                 output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
76
                 output.writeStartElement("head");
76
                 output.writeStartElement("head");
77
-                output.writeTextElement("title", "Recent Average Coffee Production");
77
+                output.writeTextElement("title", TTR("productionreport", "Recent Average Coffee Production"));
78
                 output.writeEndElement();
78
                 output.writeEndElement();
79
                 output.writeStartElement("body");
79
                 output.writeStartElement("body");
80
-                output.writeTextElement("h1", "Recent Average Coffee Production");
80
+                output.writeTextElement("h1", TTR("productionreport", "Recent Average Coffee Production"));
81
                 switch(unitBox.currentIndex)
81
                 switch(unitBox.currentIndex)
82
                 {
82
                 {
83
                     case 0:
83
                     case 0:
84
-                        output.writeTextElement("p", "This is a report of average coffee production per " + scaleBox.text + " days in kilograms over the past " + daysBox.text + " days.");
84
+                        output.writeTextElement("p", TTR("productionreport", "This is a report of average coffee production per ") + scaleBox.text + 
85
+                        TTR("productionreport", " days in kilograms over the past ") + daysBox.text +
86
+                        TTR("productionreport", " days."));
85
                         break;
87
                         break;
86
                     case 1:
88
                     case 1:
87
-                        output.writeTextElement("p", "This is a report of average coffee production per " + scaleBox.text + " days in pounds over the past " + daysBox.text + " days.");
89
+                        output.writeTextElement("p", TTR("productionreport", "This is a report of average coffee production per ") + scaleBox.text +
90
+                        TTR("productionreport", " days in pounds over the past ") + daysBox.text +
91
+                        TTR("productionreport", " days."));
88
                         break;
92
                         break;
89
                 }
93
                 }
90
                 output.writeStartElement("table");
94
                 output.writeStartElement("table");
92
                 output.writeAttribute("cellpadding", "3px");
96
                 output.writeAttribute("cellpadding", "3px");
93
                 output.writeStartElement("thead");
97
                 output.writeStartElement("thead");
94
                 output.writeStartElement("tr");
98
                 output.writeStartElement("tr");
95
-                output.writeTextElement("th", "Roasted Coffee");
96
-                output.writeTextElement("th", "Weekly Use");
99
+                output.writeTextElement("th", TTR("productionreport", "Roasted Coffee"));
100
+                output.writeTextElement("th", TTR("productionreport", "Weekly Use"));
97
                 output.writeEndElement();
101
                 output.writeEndElement();
98
                 output.writeEndElement();
102
                 output.writeEndElement();
99
                 output.writeStartElement("tbody");
103
                 output.writeStartElement("tbody");
144
                 }
148
                 }
145
                 output.writeEndElement();
149
                 output.writeEndElement();
146
                 output.writeStartElement("tfoot")
150
                 output.writeStartElement("tfoot")
147
-                output.writeTextElement("th", "Total");
151
+                output.writeTextElement("th", TTR("productionreport", "Total:"));
148
                 query.prepare("SELECT ((sum(roasted_quantity) / :scale) / :conversion)::numeric(18,2) FROM roasting_log WHERE time > current_date - integer '" + daysBox.text + "' AND roasted_quantity > 0 " + batchClause);
152
                 query.prepare("SELECT ((sum(roasted_quantity) / :scale) / :conversion)::numeric(18,2) FROM roasting_log WHERE time > current_date - integer '" + daysBox.text + "' AND roasted_quantity > 0 " + batchClause);
149
                 switch(unitBox.currentIndex)
153
                 switch(unitBox.currentIndex)
150
                 {
154
                 {
173
                 QSettings.setValue("rwacp_sort", sortBox.currentIndex);
177
                 QSettings.setValue("rwacp_sort", sortBox.currentIndex);
174
                 refresh();
178
                 refresh();
175
             });
179
             });
176
-			unitBox['currentIndexChanged(int)'].connect(function() {
177
-				QSettings.setValue("script/report_unit", unitBox.currentIndex);
178
-				refresh();
179
-			});
180
+            unitBox['currentIndexChanged(int)'].connect(function() {
181
+                QSettings.setValue("script/report_unit", unitBox.currentIndex);
182
+                refresh();
183
+            });
180
         ]]>
184
         ]]>
181
     </program>
185
     </program>
182
 </window>
186
 </window>

Loading…
取消
儲存