Przeglądaj źródła

Translation dispatch fixes

Neal Wilson 8 lat temu
rodzic
commit
8785866e44
2 zmienionych plików z 14 dodań i 14 usunięć
  1. 10
    10
      src/typica.cpp
  2. 4
    4
      src/typica.w

+ 10
- 10
src/typica.cpp Wyświetl plik

@@ -11069,7 +11069,7 @@ bar->setParent(window);
11069 11069
 bar->setObjectName("menuBar");
11070 11070
 if(element.hasAttribute("name"))
11071 11071
 {
11072
-QMenu*menu= bar->addMenu(QCoreApplication::translate(targetID.toAscii().data(),
11072
+QMenu*menu= bar->addMenu(QCoreApplication::translate("configuration",
11073 11073
 element.attribute("name").toUtf8().data()));
11074 11074
 menu->setParent(bar);
11075 11075
 if(element.hasAttribute("type"))
@@ -11111,7 +11111,7 @@ QDomNode titleNode= root.elementsByTagName("reporttitle").at(0);
11111 11111
 if(!titleNode.isNull())
11112 11112
 {
11113 11113
 QDomElement titleElement= titleNode.toElement();
11114
-QString title= QCoreApplication::translate(translationContext.toAscii().data(),
11114
+QString title= QCoreApplication::translate("configuration",
11115 11115
 titleElement.text().toUtf8().data());
11116 11116
 if(!title.isEmpty())
11117 11117
 {
@@ -11178,7 +11178,7 @@ if(item.isElement())
11178 11178
 QDomElement itemElement= item.toElement();
11179 11179
 if(itemElement.tagName()=="item")
11180 11180
 {
11181
-QAction*itemAction= new QAction(QCoreApplication::translate(targetID.toAscii().data(),
11181
+QAction*itemAction= new QAction(QCoreApplication::translate("configuration",
11182 11182
 itemElement.text().toUtf8().data()),menu);
11183 11183
 if(itemElement.hasAttribute("id"))
11184 11184
 {
@@ -17880,7 +17880,7 @@ return QScriptValue();
17880 17880
 QScriptValue scriptTr(QScriptContext*context,QScriptEngine*)
17881 17881
 {
17882 17882
 return QScriptValue(QCoreApplication::translate(
17883
-argument<QString> (0,context).toAscii().data(),
17883
+"configuration",
17884 17884
 argument<QString> (1,context).toUtf8().data()));
17885 17885
 }
17886 17886
 
@@ -17969,7 +17969,7 @@ bar->setParent(window);
17969 17969
 bar->setObjectName("menuBar");
17970 17970
 if(element.hasAttribute("name"))
17971 17971
 {
17972
-QMenu*menu= bar->addMenu(QCoreApplication::translate(targetID.toAscii().data(),
17972
+QMenu*menu= bar->addMenu(QCoreApplication::translate("configuration",
17973 17973
 element.attribute("name").toUtf8().data()));
17974 17974
 menu->setParent(bar);
17975 17975
 if(element.hasAttribute("type"))
@@ -18011,7 +18011,7 @@ QDomNode titleNode= root.elementsByTagName("reporttitle").at(0);
18011 18011
 if(!titleNode.isNull())
18012 18012
 {
18013 18013
 QDomElement titleElement= titleNode.toElement();
18014
-QString title= QCoreApplication::translate(translationContext.toAscii().data(),
18014
+QString title= QCoreApplication::translate("configuration",
18015 18015
 titleElement.text().toUtf8().data());
18016 18016
 if(!title.isEmpty())
18017 18017
 {
@@ -18078,7 +18078,7 @@ if(item.isElement())
18078 18078
 QDomElement itemElement= item.toElement();
18079 18079
 if(itemElement.tagName()=="item")
18080 18080
 {
18081
-QAction*itemAction= new QAction(QCoreApplication::translate(targetID.toAscii().data(),
18081
+QAction*itemAction= new QAction(QCoreApplication::translate("configuration",
18082 18082
 itemElement.text().toUtf8().data()),menu);
18083 18083
 if(itemElement.hasAttribute("id"))
18084 18084
 {
@@ -18221,7 +18221,7 @@ bar->setParent(window);
18221 18221
 bar->setObjectName("menuBar");
18222 18222
 if(element.hasAttribute("name"))
18223 18223
 {
18224
-QMenu*menu= bar->addMenu(QCoreApplication::translate(targetID.toAscii().data(),
18224
+QMenu*menu= bar->addMenu(QCoreApplication::translate("configuration",
18225 18225
 element.attribute("name").toUtf8().data()));
18226 18226
 menu->setParent(bar);
18227 18227
 if(element.hasAttribute("type"))
@@ -18263,7 +18263,7 @@ QDomNode titleNode= root.elementsByTagName("reporttitle").at(0);
18263 18263
 if(!titleNode.isNull())
18264 18264
 {
18265 18265
 QDomElement titleElement= titleNode.toElement();
18266
-QString title= QCoreApplication::translate(translationContext.toAscii().data(),
18266
+QString title= QCoreApplication::translate("configuration",
18267 18267
 titleElement.text().toUtf8().data());
18268 18268
 if(!title.isEmpty())
18269 18269
 {
@@ -18330,7 +18330,7 @@ if(item.isElement())
18330 18330
 QDomElement itemElement= item.toElement();
18331 18331
 if(itemElement.tagName()=="item")
18332 18332
 {
18333
-QAction*itemAction= new QAction(QCoreApplication::translate(targetID.toAscii().data(),
18333
+QAction*itemAction= new QAction(QCoreApplication::translate("configuration",
18334 18334
 itemElement.text().toUtf8().data()),menu);
18335 18335
 if(itemElement.hasAttribute("id"))
18336 18336
 {

+ 4
- 4
src/typica.w Wyświetl plik

@@ -4299,7 +4299,7 @@ translated into other languages.
4299 4299
 QScriptValue scriptTr(QScriptContext *context, QScriptEngine *)
4300 4300
 {
4301 4301
     return QScriptValue(QCoreApplication::translate(
4302
-        argument<QString>(0, context).toAscii().data(),
4302
+        "configuration",
4303 4303
         argument<QString>(1, context).toUtf8().data()));
4304 4304
 }
4305 4305
 
@@ -4715,7 +4715,7 @@ bar->setParent(window);
4715 4715
 bar->setObjectName("menuBar");
4716 4716
 if(element.hasAttribute("name"))
4717 4717
 {
4718
-    QMenu *menu = bar->addMenu(QCoreApplication::translate(targetID.toAscii().data(),
4718
+    QMenu *menu = bar->addMenu(QCoreApplication::translate("configuration",
4719 4719
                                                            element.attribute("name").toUtf8().data()));
4720 4720
     menu->setParent(bar);
4721 4721
     if(element.hasAttribute("type"))
@@ -4748,7 +4748,7 @@ while(j < menuItems.count())
4748 4748
         QDomElement itemElement = item.toElement();
4749 4749
         if(itemElement.tagName() == "item")
4750 4750
         {
4751
-            QAction *itemAction = new QAction(QCoreApplication::translate(targetID.toAscii().data(),
4751
+            QAction *itemAction = new QAction(QCoreApplication::translate("configuration",
4752 4752
                                               itemElement.text().toUtf8().data()), menu);
4753 4753
             if(itemElement.hasAttribute("id"))
4754 4754
             {
@@ -13929,7 +13929,7 @@ if(file.open(QIODevice::ReadOnly))
13929 13929
     if(!titleNode.isNull())
13930 13930
     {
13931 13931
         QDomElement titleElement = titleNode.toElement();
13932
-        QString title = QCoreApplication::translate(translationContext.toAscii().data(),
13932
+        QString title = QCoreApplication::translate("configuration",
13933 13933
                                                     titleElement.text().toUtf8().data());
13934 13934
         if(!title.isEmpty())
13935 13935
         {

Ładowanie…
Anuluj
Zapisz