Browse Source

Mark up chart.xml for translation

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

Loading…
Cancel
Save