View Issue Details

IDProjectCategoryView StatusLast Update
0000296FreeCADBugpublic2011-08-31 07:59
Reporterwmayer Assigned ToJriegel 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version0.12 
Summary0000296: Untranslatable header of task watchers
DescriptionThe header e.g. Create Geometry is not translatable because the string is not marked so that Qt's lupdate tool can pick it up. The second point is the the plain char string is passed through the constructor of TaskWatcherCommands and then QString::fromUtf8(name) is called. So, the string will never go through the tr() method.

To fix this bug two changes are needed:
1. Replace the third argument of TaskWatcherCommands, the const char* with a const QString&
2. From where the header of the watchers are defined, do something like
   Watcher.push_back(new Gui::TaskView::TaskWatcherCommandsEmptyDoc(
         Empty,
        qApp->translate("Workbench", "Create Geometry"),
        "Part_Box"
    ));
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2011-08-31 07:59

administrator   ~0001023

This is a solution without changing the API.TaskWatcherCommands uses trUtf8() instead of QString::fromUtf8() in its constructor. To make the text translatable lines must be added like:

#if 0
    qApp->translate("Gui::TaskView::TaskWatcherCommands", "Create Geometry");
#endif

Issue History

Date Modified Username Field Change
2011-03-03 09:20 wmayer New Issue
2011-03-03 09:20 wmayer Status new => assigned
2011-03-03 09:20 wmayer Assigned To => Jriegel
2011-08-31 07:59 wmayer Note Added: 0001023
2011-08-31 07:59 wmayer Status assigned => closed
2011-08-31 07:59 wmayer Resolution open => fixed
2011-08-31 07:59 wmayer Fixed in Version => 0.12