Pārlūkot izejas kodu

Allow report menu items to be translated

Neal Wilson 8 gadus atpakaļ
vecāks
revīzija
44489a1778
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3
    1
      src/typica.w

+ 3
- 1
src/typica.w Parādīt failu

@@ -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(":->");

Notiek ielāde…
Atcelt
Saglabāt