Browse Source

Mark upp cogr.xml for translations

Neal Wilson 9 years ago
parent
commit
487ca55e64
1 changed files with 14 additions and 12 deletions
  1. 14
    12
      config/Reports/cogr.xml

+ 14
- 12
config/Reports/cogr.xml View File

@@ -8,19 +8,19 @@
8 8
         <webview id="report" />
9 9
     </layout>
10 10
     <menu name="File">
11
-        <item id="print" shortcut="Ctrl+P">Print</item>
11
+        <item id="print" shortcut="Ctrl+P">Print...</item>
12 12
     </menu>
13 13
     <program>
14 14
         <![CDATA[
15
-            this.windowTitle = "Typica - Cost of Green Coffee for Roasted Coffee";
15
+            this.windowTitle = TTR("greencost", "Typica - Cost of Green Coffee for Roasted Coffee");
16 16
             var report = findChildObject(this, 'report');
17 17
             var printMenu = findChildObject(this, 'print');
18 18
             printMenu.triggered.connect(function() {
19 19
                 report.print();
20 20
             });
21 21
             var unitBox = findChildObject(this, 'unit');
22
-            unitBox.addItem("Kg");
23
-            unitBox.addItem("Lb");
22
+            unitBox.addItem(TTR("greencost", "Kg");
23
+            unitBox.addItem(TTR("greencost", "Lb");
24 24
             unitBox.currentIndex = QSettings.value("script/report_unit", 1);
25 25
             unitBox['currentIndexChanged(int)'].connect(function() {
26 26
                 QSettings.setValue("script/report_unit", unitBox.currentIndex);
@@ -39,12 +39,14 @@
39 39
                 output.writeStartElement("html");
40 40
                 output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
41 41
                 output.writeStartElement("head");
42
-                output.writeTextElement("title", "Cost of Green Coffee for Roasted Coffee");
42
+                output.writeTextElement("title", TTR("greencost", "Cost of Green Coffee for Roasted Coffee"));
43 43
                 output.writeEndElement();
44 44
                 output.writeStartElement("body");
45
-                var unit = (unitBox.currentIndex == 0 ? "Kg" : "Lb");
46
-                output.writeTextElement("h1", "Cost of Green Coffee for Roasted Coffee");
47
-                output.writeTextElement("p", "Cost of green coffee per " + unit + " of roasted coffee");
45
+                var unit = (unitBox.currentIndex == 0 ? TTR("greencost", "Kg") : 
46
+                    TTR("greencost", "Lb"));
47
+                output.writeTextElement("h1", TTR("greencost", "Cost of Green Coffee for Roasted Coffee"));
48
+                output.writeTextElement("p", TTR("greencost", "Cost of green coffee per ") +
49
+                    unit + TTR("greencost", " of roasted coffee"));
48 50
                 var query = new QSqlQuery();
49 51
                 query.exec("SELECT item, (SELECT name FROM items WHERE id = item) AS name FROM current_items ORDER BY name");
50 52
                 var roastedItems = new Array();
@@ -140,10 +142,10 @@
140 142
                 output.writeAttribute("cellpadding", "3px");
141 143
                 output.writeStartElement("thead");
142 144
                 output.writeStartElement("tr");
143
-                output.writeTextElement("th", "Coffee");
144
-                output.writeTextElement("th", "Minimum Cost");
145
-                output.writeTextElement("th", "Maximum Cost");
146
-                output.writeTextElement("th", "Mean Cost");
145
+                output.writeTextElement("th", TTR("greencost", "Coffee"));
146
+                output.writeTextElement("th", TTR("greencost", "Minimum Cost"));
147
+                output.writeTextElement("th", TTR("greencost", "Maximum Cost"));
148
+                output.writeTextElement("th", TTR("greencost", "Mean Cost"));
147 149
                 output.writeEndElement();
148 150
                 output.writeEndElement();
149 151
                 output.writeStartElement("tbody");

Loading…
Cancel
Save