Browse Source

Mark up chart.xml for translation

Neal Wilson 9 years ago
parent
commit
67a3de41e2
1 changed files with 41 additions and 41 deletions
  1. 41
    41
      config/Reports/chart.xml

+ 41
- 41
config/Reports/chart.xml View File

2
 	<reporttitle>Production:->Previous Year Production Comparison</reporttitle>
2
 	<reporttitle>Production:->Previous Year Production Comparison</reporttitle>
3
     <layout type="vertical">
3
     <layout type="vertical">
4
         <layout type="horizontal">
4
         <layout type="horizontal">
5
-            <label>Batch Type: </label>
5
+            <label>Batch Type:</label>
6
             <sqldrop id="batchtype" />
6
             <sqldrop id="batchtype" />
7
-            <label>Approval: </label>
7
+            <label>Approval:</label>
8
             <sqldrop id="approval" />
8
             <sqldrop id="approval" />
9
             <daterange id="dates" initial="19" /><!-- Current Year to Date -->
9
             <daterange id="dates" initial="19" /><!-- Current Year to Date -->
10
-            <label>Days to Average</label>
10
+            <label>Days to Average:</label>
11
             <line validator="integer" id="days">7</line>
11
             <line validator="integer" id="days">7</line>
12
             <label>Weight Unit:</label>
12
             <label>Weight Unit:</label>
13
             <sqldrop id="unit" />
13
             <sqldrop id="unit" />
16
         <webview id="report" />
16
         <webview id="report" />
17
     </layout>
17
     </layout>
18
     <menu name="File">
18
     <menu name="File">
19
-        <item id="print" shortcut="Ctrl+P">Print</item>
19
+        <item id="print" shortcut="Ctrl+P">Print...</item>
20
     </menu>
20
     </menu>
21
     <program>
21
     <program>
22
         <![CDATA[
22
         <![CDATA[
23
-            this.windowTitle = "Typica - Previous Year Production Comparison";
23
+            this.windowTitle = TTR("pytdprodcomp", "Typica - Previous Year Production Comparison");
24
             var dateSelect = findChildObject(this, 'dates');
24
             var dateSelect = findChildObject(this, 'dates');
25
             dateSelect.removeIndex(23); // Remove Lifetime range
25
             dateSelect.removeIndex(23); // Remove Lifetime range
26
             var view = findChildObject(this, 'report');
26
             var view = findChildObject(this, 'report');
30
             });
30
             });
31
             var avgField = findChildObject(this, 'days');
31
             var avgField = findChildObject(this, 'days');
32
             var unitBox = findChildObject(this, 'unit');
32
             var unitBox = findChildObject(this, 'unit');
33
-            unitBox.addItem("Kg");
34
-            unitBox.addItem("Lb");
33
+            unitBox.addItem(TTR("pytdprodcomp", "Kg"));
34
+            unitBox.addItem(TTR("pytdprodcomp", "Lb"));
35
             unitBox.currentIndex = QSettings.value("script/report_unit", 1);
35
             unitBox.currentIndex = QSettings.value("script/report_unit", 1);
36
             unitBox['currentIndexChanged(int)'].connect(function() {
36
             unitBox['currentIndexChanged(int)'].connect(function() {
37
                 QSettings.setValue("script/report_unit", unitBox.currentIndex);
37
                 QSettings.setValue("script/report_unit", unitBox.currentIndex);
38
                 refresh();
38
                 refresh();
39
             });
39
             });
40
             var batchType = findChildObject(this, 'batchtype');
40
             var batchType = findChildObject(this, 'batchtype');
41
-            batchType.addItem("Any");
42
-            batchType.addItem("Production Roasts");
43
-            batchType.addItem("SampleRoasts");
41
+            batchType.addItem(TTR("pytdprodcomp", "Any"));
42
+            batchType.addItem(TTR("pytdprodcomp", "Production Roasts"));
43
+            batchType.addItem(TTR("pytdprodcomp", "Sample Roasts"));
44
             batchType.currentIndex = QSettings.value("script/batchtypefilter", 1);
44
             batchType.currentIndex = QSettings.value("script/batchtypefilter", 1);
45
             batchType['currentIndexChanged(int)'].connect(function() {
45
             batchType['currentIndexChanged(int)'].connect(function() {
46
                 QSettings.setValue("script/batchtypefilter", batchType.currentIndex);
46
                 QSettings.setValue("script/batchtypefilter", batchType.currentIndex);
47
                 refresh();
47
                 refresh();
48
             });
48
             });
49
             var approval = findChildObject(this, 'approval');
49
             var approval = findChildObject(this, 'approval');
50
-            approval.addItem("Any");
51
-            approval.addItem("Approved");
52
-            approval.addItem("Not Approved");
50
+            approval.addItem(TTR("pytdprodcomp", "Any"));
51
+            approval.addItem(TTR("pytdprodcomp", "Approved"));
52
+            approval.addItem(TTR("pytdprodcomp", "Not Approved"));
53
             approval.currentIndex = QSettings.value("script/approvalfilter", 1);
53
             approval.currentIndex = QSettings.value("script/approvalfilter", 1);
54
             approval['currentIndexChanged(int)'].connect(function() {
54
             approval['currentIndexChanged(int)'].connect(function() {
55
                 QSettings.setValue("script/approvalfilter", approval.currentIndex);
55
                 QSettings.setValue("script/approvalfilter", approval.currentIndex);
68
                 output.writeStartElement("html");
68
                 output.writeStartElement("html");
69
                 output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
69
                 output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
70
                 output.writeStartElement("head");
70
                 output.writeStartElement("head");
71
-                output.writeTextElement("title", "Previous Year Production Comparison");
71
+                output.writeTextElement("title", TTR("pytdprodcomp", "Previous Year Production Comparison"));
72
                 output.writeEndElement();
72
                 output.writeEndElement();
73
                 output.writeStartElement("body");
73
                 output.writeStartElement("body");
74
-                output.writeTextElement("h1", "Previous Year Production Comparison");
75
-                output.writeTextElement("p", "This report provides an itemized and overall comparison of roasted coffee production for the dates specified with those dates in the previous year. A chart of this data along with percent change and rolling average of the percent change is also produced.");
74
+                output.writeTextElement("h1", TTR("pytdprodcomp", "Previous Year Production Comparison"));
75
+                output.writeTextElement("p", TTR("pytdprodcomp", "This report provides an itemized and overall comparison of roasted coffee production for the dates specified with those dates in the previous year. A chart of this data along with percent change and rolling average of the percent change is also produced."));
76
                 output.writeStartElement("table");
76
                 output.writeStartElement("table");
77
                 output.writeAttribute("style", "page-break-after:auto;");
77
                 output.writeAttribute("style", "page-break-after:auto;");
78
                 output.writeAttribute("rules", "groups");
78
                 output.writeAttribute("rules", "groups");
82
                 output.writeTextElement("th", "Coffee");
82
                 output.writeTextElement("th", "Coffee");
83
                 switch(unitBox.currentIndex) {
83
                 switch(unitBox.currentIndex) {
84
                     case 0:
84
                     case 0:
85
-                        output.writeTextElement("th", "Previous (Kg)");
86
-                        output.writeTextElement("th", "Current (Kg)");
87
-                        output.writeTextElement("th", "Change (Kg)");
85
+                        output.writeTextElement("th", TTR("pytdprodcomp", "Previous (Kg)"));
86
+                        output.writeTextElement("th", TTR("pytdprodcomp", "Current (Kg)"));
87
+                        output.writeTextElement("th", TTR("pytdprodcomp", "Change (Kg)"));
88
                         break;
88
                         break;
89
                     case 1:
89
                     case 1:
90
-                        output.writeTextElement("th", "Previous (Lb)");
91
-                        output.writeTextElement("th", "Current (Lb)");
92
-                        output.writeTextElement("th", "Change (Lb)");
90
+                        output.writeTextElement("th", TTR("pytdprodcomp", "Previous (Lb)"));
91
+                        output.writeTextElement("th", TTR("pytdprodcomp", "Current (Lb)"));
92
+                        output.writeTextElement("th", TTR("pytdprodcomp", "Change (Lb)"));
93
                         break;
93
                         break;
94
                 }
94
                 }
95
                 output.writeEndElement();
95
                 output.writeEndElement();
148
                 }
148
                 }
149
                 output.writeEndElement();
149
                 output.writeEndElement();
150
                 output.writeStartElement("tfoot");
150
                 output.writeStartElement("tfoot");
151
-                output.writeTextElement("th", "Totals");
151
+                output.writeTextElement("th", TTR("pytdprodcomp", "Totals"));
152
                 query.exec("SELECT sum(p), sum(c), sum(c-p) FROM comp");
152
                 query.exec("SELECT sum(p), sum(c), sum(c-p) FROM comp");
153
                 query.next();
153
                 query.next();
154
                 output.writeTextElement("td", (query.value(0) / conversion).toFixed(2));
154
                 output.writeTextElement("td", (query.value(0) / conversion).toFixed(2));
424
                     switch(parts[1])
424
                     switch(parts[1])
425
                     {
425
                     {
426
                         case '01':
426
                         case '01':
427
-                            ds = "January ";
427
+                            ds = TTR("pytdprodcomp", "January ");
428
                             break;
428
                             break;
429
                         case '02':
429
                         case '02':
430
-                            ds = "February ";
430
+                            ds = TTR("pytdprodcomp", "February ");
431
                             break;
431
                             break;
432
                         case '03':
432
                         case '03':
433
-                            ds = "March ";
433
+                            ds = TTR("pytdprodcomp", "March ");
434
                             break;
434
                             break;
435
                         case '04':
435
                         case '04':
436
-                            ds = "April ";
436
+                            ds = TTR("pytdprodcomp", "April ");
437
                             break;
437
                             break;
438
                         case '05':
438
                         case '05':
439
-                            ds = "May ";
439
+                            ds = TTR("pytdprodcomp", "May ");
440
                             break;
440
                             break;
441
                         case '06':
441
                         case '06':
442
-                            ds = "June ";
442
+                            ds = TTR("pytdprodcomp", "June ");
443
                             break;
443
                             break;
444
                         case '07':
444
                         case '07':
445
-                            ds = "July ";
445
+                            ds = TTR("pytdprodcomp", "July ");
446
                             break;
446
                             break;
447
                         case '08':
447
                         case '08':
448
-                            ds = "August ";
448
+                            ds = TTR("pytdprodcomp", "August ");
449
                             break;
449
                             break;
450
                         case '09':
450
                         case '09':
451
-                            ds = "September ";
451
+                            ds = TTR("pytdprodcomp", "September ");
452
                             break;
452
                             break;
453
                         case '10':
453
                         case '10':
454
-                            ds = "October ";
454
+                            ds = TTR("pytdprodcomp", "October ");
455
                             break;
455
                             break;
456
                         case '11':
456
                         case '11':
457
-                            ds = "November ";
457
+                            ds = TTR("pytdprodcomp", "November ");
458
                             break;
458
                             break;
459
                         case '12':
459
                         case '12':
460
-                            ds = "December ";
460
+                            ds = TTR("pytdprodcomp", "December ");
461
                             break;
461
                             break;
462
                     }
462
                     }
463
                     ds = ds + Number(parts[2]);
463
                     ds = ds + Number(parts[2]);
487
                 output.writeAttribute("font-size", "12");
487
                 output.writeAttribute("font-size", "12");
488
                 switch(unitBox.currentIndex) {
488
                 switch(unitBox.currentIndex) {
489
                     case 0:
489
                     case 0:
490
-                        output.writeCharacters("Previous Year Kg");
490
+                        output.writeCharacters(TTR("pytdprodcomp", "Previous Year Kg"));
491
                         break;
491
                         break;
492
                     case 1:
492
                     case 1:
493
-                        output.writeCharacters("Previous Year Lb");
493
+                        output.writeCharacters(TTR("pytdprodcomp", "Previous Year Lb"));
494
                         break;
494
                         break;
495
                 }
495
                 }
496
                 output.writeEndElement();
496
                 output.writeEndElement();
507
                 output.writeAttribute("font-size", "12");
507
                 output.writeAttribute("font-size", "12");
508
                 switch(unitBox.currentIndex) {
508
                 switch(unitBox.currentIndex) {
509
                     case 0:
509
                     case 0:
510
-                        output.writeCharacters("Current Year Kg");
510
+                        output.writeCharacters(TTR("pytdprodcomp", "Current Year Kg"));
511
                         break;
511
                         break;
512
                     case 1:
512
                     case 1:
513
-                        output.writeCharacters("Current Year Lb");
513
+                        output.writeCharacters(TTR("pytdprodcomp", "Current Year Lb"));
514
                         break;
514
                         break;
515
                 }
515
                 }
516
                 output.writeEndElement();
516
                 output.writeEndElement();
525
                 output.writeAttribute("x", "375");
525
                 output.writeAttribute("x", "375");
526
                 output.writeAttribute("y", "120");
526
                 output.writeAttribute("y", "120");
527
                 output.writeAttribute("font-size", "12");
527
                 output.writeAttribute("font-size", "12");
528
-                output.writeCharacters("% Change");
528
+                output.writeCharacters(TTR("pytdprodcomp", "% Change"));
529
                 output.writeEndElement();
529
                 output.writeEndElement();
530
                 output.writeStartElement("rect");
530
                 output.writeStartElement("rect");
531
                 output.writeAttribute("fill", "rgb(0,0,255)");
531
                 output.writeAttribute("fill", "rgb(0,0,255)");
538
                 output.writeAttribute("x", "525");
538
                 output.writeAttribute("x", "525");
539
                 output.writeAttribute("y", "120");
539
                 output.writeAttribute("y", "120");
540
                 output.writeAttribute("font-size", "12");
540
                 output.writeAttribute("font-size", "12");
541
-                output.writeCharacters("Average % Change");
541
+                output.writeCharacters(TTR("pytdprodcomp", "Average % Change"));
542
                 output.writeEndElement();
542
                 output.writeEndElement();
543
                 output.writeEndElement();
543
                 output.writeEndElement();
544
                 output.writeEndElement();
544
                 output.writeEndElement();

Loading…
Cancel
Save