Browse Source

Allow report menu items to be translated

Neal Wilson 8 years ago
parent
commit
44489a1778
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/typica.w

+ 3
- 1
src/typica.w View File

@@ -13915,11 +13915,13 @@ if(file.open(QIODevice::ReadOnly))
13915 13915
     QDomDocument document;
13916 13916
     document.setContent(&file, true);
13917 13917
     QDomElement root = document.documentElement();
13918
+    QString translationContext = root.attribute("id");
13918 13919
     QDomNode titleNode = root.elementsByTagName("reporttitle").at(0);
13919 13920
     if(!titleNode.isNull())
13920 13921
     {
13921 13922
         QDomElement titleElement = titleNode.toElement();
13922
-        QString title = titleElement.text();
13923
+        QString title = QCoreApplication::translate(translationContext.toAscii().data(),
13924
+                                                    titleElement.text().toUtf8().data());
13923 13925
         if(!title.isEmpty())
13924 13926
         {
13925 13927
             QStringList hierarchy = title.split(":->");

Loading…
Cancel
Save