TD: Translate default labels
This commit is contained in:
committed by
WandererFan
parent
54bb9c9c62
commit
94426e1f54
@@ -335,7 +335,9 @@ void TaskLeaderLine::onLineStyleChanged()
|
||||
void TaskLeaderLine::createLeaderFeature(std::vector<Base::Vector3d> converted)
|
||||
{
|
||||
// Base::Console().Message("TTL::createLeaderFeature()\n");
|
||||
m_leaderName = m_basePage->getDocument()->getUniqueObjectName("LeaderLine");
|
||||
const std::string objectName{QT_TR_NOOP("LeaderLine")};
|
||||
std::string m_leaderName = m_basePage->getDocument()->getUniqueObjectName(objectName.c_str());
|
||||
std::string generatedSuffix {m_leaderName.substr(objectName.length())};
|
||||
m_leaderType = "TechDraw::DrawLeaderLine";
|
||||
|
||||
std::string PageName = m_basePage->getNameInDocument();
|
||||
@@ -377,6 +379,9 @@ void TaskLeaderLine::createLeaderFeature(std::vector<Base::Vector3d> converted)
|
||||
}
|
||||
}
|
||||
|
||||
std::string translatedObjectName{tr(objectName.c_str()).toStdString()};
|
||||
obj->Label.setValue(translatedObjectName + generatedSuffix);
|
||||
|
||||
Gui::Command::updateActive();
|
||||
Gui::Command::commitCommand();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user