Browse Source

Translation dispatch fixes

Neal Wilson 8 years ago
parent
commit
8785866e44
2 changed files with 14 additions and 14 deletions
  1. 10
    10
      src/typica.cpp
  2. 4
    4
      src/typica.w

+ 10
- 10
src/typica.cpp View File

11069
 bar->setObjectName("menuBar");
11069
 bar->setObjectName("menuBar");
11070
 if(element.hasAttribute("name"))
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
 element.attribute("name").toUtf8().data()));
11073
 element.attribute("name").toUtf8().data()));
11074
 menu->setParent(bar);
11074
 menu->setParent(bar);
11075
 if(element.hasAttribute("type"))
11075
 if(element.hasAttribute("type"))
11111
 if(!titleNode.isNull())
11111
 if(!titleNode.isNull())
11112
 {
11112
 {
11113
 QDomElement titleElement= titleNode.toElement();
11113
 QDomElement titleElement= titleNode.toElement();
11114
-QString title= QCoreApplication::translate(translationContext.toAscii().data(),
11114
+QString title= QCoreApplication::translate("configuration",
11115
 titleElement.text().toUtf8().data());
11115
 titleElement.text().toUtf8().data());
11116
 if(!title.isEmpty())
11116
 if(!title.isEmpty())
11117
 {
11117
 {
11178
 QDomElement itemElement= item.toElement();
11178
 QDomElement itemElement= item.toElement();
11179
 if(itemElement.tagName()=="item")
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
 itemElement.text().toUtf8().data()),menu);
11182
 itemElement.text().toUtf8().data()),menu);
11183
 if(itemElement.hasAttribute("id"))
11183
 if(itemElement.hasAttribute("id"))
11184
 {
11184
 {
17880
 QScriptValue scriptTr(QScriptContext*context,QScriptEngine*)
17880
 QScriptValue scriptTr(QScriptContext*context,QScriptEngine*)
17881
 {
17881
 {
17882
 return QScriptValue(QCoreApplication::translate(
17882
 return QScriptValue(QCoreApplication::translate(
17883
-argument<QString> (0,context).toAscii().data(),
17883
+"configuration",
17884
 argument<QString> (1,context).toUtf8().data()));
17884
 argument<QString> (1,context).toUtf8().data()));
17885
 }
17885
 }
17886
 
17886
 
17969
 bar->setObjectName("menuBar");
17969
 bar->setObjectName("menuBar");
17970
 if(element.hasAttribute("name"))
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
 element.attribute("name").toUtf8().data()));
17973
 element.attribute("name").toUtf8().data()));
17974
 menu->setParent(bar);
17974
 menu->setParent(bar);
17975
 if(element.hasAttribute("type"))
17975
 if(element.hasAttribute("type"))
18011
 if(!titleNode.isNull())
18011
 if(!titleNode.isNull())
18012
 {
18012
 {
18013
 QDomElement titleElement= titleNode.toElement();
18013
 QDomElement titleElement= titleNode.toElement();
18014
-QString title= QCoreApplication::translate(translationContext.toAscii().data(),
18014
+QString title= QCoreApplication::translate("configuration",
18015
 titleElement.text().toUtf8().data());
18015
 titleElement.text().toUtf8().data());
18016
 if(!title.isEmpty())
18016
 if(!title.isEmpty())
18017
 {
18017
 {
18078
 QDomElement itemElement= item.toElement();
18078
 QDomElement itemElement= item.toElement();
18079
 if(itemElement.tagName()=="item")
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
 itemElement.text().toUtf8().data()),menu);
18082
 itemElement.text().toUtf8().data()),menu);
18083
 if(itemElement.hasAttribute("id"))
18083
 if(itemElement.hasAttribute("id"))
18084
 {
18084
 {
18221
 bar->setObjectName("menuBar");
18221
 bar->setObjectName("menuBar");
18222
 if(element.hasAttribute("name"))
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
 element.attribute("name").toUtf8().data()));
18225
 element.attribute("name").toUtf8().data()));
18226
 menu->setParent(bar);
18226
 menu->setParent(bar);
18227
 if(element.hasAttribute("type"))
18227
 if(element.hasAttribute("type"))
18263
 if(!titleNode.isNull())
18263
 if(!titleNode.isNull())
18264
 {
18264
 {
18265
 QDomElement titleElement= titleNode.toElement();
18265
 QDomElement titleElement= titleNode.toElement();
18266
-QString title= QCoreApplication::translate(translationContext.toAscii().data(),
18266
+QString title= QCoreApplication::translate("configuration",
18267
 titleElement.text().toUtf8().data());
18267
 titleElement.text().toUtf8().data());
18268
 if(!title.isEmpty())
18268
 if(!title.isEmpty())
18269
 {
18269
 {
18330
 QDomElement itemElement= item.toElement();
18330
 QDomElement itemElement= item.toElement();
18331
 if(itemElement.tagName()=="item")
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
 itemElement.text().toUtf8().data()),menu);
18334
 itemElement.text().toUtf8().data()),menu);
18335
 if(itemElement.hasAttribute("id"))
18335
 if(itemElement.hasAttribute("id"))
18336
 {
18336
 {

+ 4
- 4
src/typica.w View File

4299
 QScriptValue scriptTr(QScriptContext *context, QScriptEngine *)
4299
 QScriptValue scriptTr(QScriptContext *context, QScriptEngine *)
4300
 {
4300
 {
4301
     return QScriptValue(QCoreApplication::translate(
4301
     return QScriptValue(QCoreApplication::translate(
4302
-        argument<QString>(0, context).toAscii().data(),
4302
+        "configuration",
4303
         argument<QString>(1, context).toUtf8().data()));
4303
         argument<QString>(1, context).toUtf8().data()));
4304
 }
4304
 }
4305
 
4305
 
4715
 bar->setObjectName("menuBar");
4715
 bar->setObjectName("menuBar");
4716
 if(element.hasAttribute("name"))
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
                                                            element.attribute("name").toUtf8().data()));
4719
                                                            element.attribute("name").toUtf8().data()));
4720
     menu->setParent(bar);
4720
     menu->setParent(bar);
4721
     if(element.hasAttribute("type"))
4721
     if(element.hasAttribute("type"))
4748
         QDomElement itemElement = item.toElement();
4748
         QDomElement itemElement = item.toElement();
4749
         if(itemElement.tagName() == "item")
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
                                               itemElement.text().toUtf8().data()), menu);
4752
                                               itemElement.text().toUtf8().data()), menu);
4753
             if(itemElement.hasAttribute("id"))
4753
             if(itemElement.hasAttribute("id"))
4754
             {
4754
             {
13929
     if(!titleNode.isNull())
13929
     if(!titleNode.isNull())
13930
     {
13930
     {
13931
         QDomElement titleElement = titleNode.toElement();
13931
         QDomElement titleElement = titleNode.toElement();
13932
-        QString title = QCoreApplication::translate(translationContext.toAscii().data(),
13932
+        QString title = QCoreApplication::translate("configuration",
13933
                                                     titleElement.text().toUtf8().data());
13933
                                                     titleElement.text().toUtf8().data());
13934
         if(!title.isEmpty())
13934
         if(!title.isEmpty())
13935
         {
13935
         {

Loading…
Cancel
Save