Part: Fix translation bug in FaceMaker

This commit is contained in:
Chris Hennes
2024-01-22 12:14:54 -06:00
parent 6dda56117a
commit 84380b3a56
5 changed files with 11 additions and 10 deletions

View File

@@ -59,7 +59,7 @@ void Part::FaceMaker::addShape(const TopoDS_Shape& sh)
this->myWires.push_back(BRepBuilderAPI_MakeWire(TopoDS::Edge(sh)).Wire());
break;
default:
throw Base::TypeError("Shape must be a wire, edge or compound. Something else was supplied.");
throw Base::TypeError(tr("Shape must be a wire, edge or compound. Something else was supplied.").toStdString());
break;
}
this->mySourceShapes.push_back(sh);
@@ -172,12 +172,12 @@ TYPESYSTEM_SOURCE(Part::FaceMakerSimple, Part::FaceMakerPublic)
std::string Part::FaceMakerSimple::getUserFriendlyName() const
{
return {QT_TRANSLATE_NOOP("Part_FaceMaker","Simple")};
return {tr("Simple").toStdString()};
}
std::string Part::FaceMakerSimple::getBriefExplanation() const
{
return {QT_TRANSLATE_NOOP("Part_FaceMaker","Makes separate plane face from every wire independently. No support for holes; wires can be on different planes.")};
return {tr("Makes separate plane face from every wire independently. No support for holes; wires can be on different planes.").toStdString()};
}
void Part::FaceMakerSimple::Build_Essence()

View File

@@ -28,12 +28,12 @@
#include <TopoDS_Compound.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
#include <QCoreApplication>
#include <memory>
#include <Base/BaseClass.h>
#include <Mod/Part/PartGlobal.h>
namespace Part
{
@@ -47,6 +47,7 @@ namespace Part
*/
class PartExport FaceMaker: public BRepBuilderAPI_MakeShape, public Base::BaseClass
{
Q_DECLARE_TR_FUNCTIONS(FaceMaker);
TYPESYSTEM_HEADER_WITH_OVERRIDE();
public:

View File

@@ -55,12 +55,12 @@ void FaceMakerBullseye::setPlane(const gp_Pln &plane)
std::string FaceMakerBullseye::getUserFriendlyName() const
{
return {QT_TRANSLATE_NOOP("Part_FaceMaker","Bull's-eye facemaker")};
return {tr("Bull's-eye facemaker").toStdString()};
}
std::string FaceMakerBullseye::getBriefExplanation() const
{
return {QT_TRANSLATE_NOOP("Part_FaceMaker","Supports making planar faces with holes with islands.")};
return {tr("Supports making planar faces with holes with islands.").toStdString()};
}
void FaceMakerBullseye::Build_Essence()

View File

@@ -244,12 +244,12 @@ TopoDS_Shape FaceMakerCheese::makeFace(const std::vector<TopoDS_Wire>& w)
std::string FaceMakerCheese::getUserFriendlyName() const
{
return {QT_TRANSLATE_NOOP("Part_FaceMaker","Cheese facemaker")};
return {tr("Cheese facemaker").toStdString()};
}
std::string FaceMakerCheese::getBriefExplanation() const
{
return {QT_TRANSLATE_NOOP("Part_FaceMaker","Supports making planar faces with holes, but no islands inside holes.")};
return {tr("Supports making planar faces with holes, but no islands inside holes.").toStdString()};
}
void FaceMakerCheese::Build_Essence()

View File

@@ -334,12 +334,12 @@ TYPESYSTEM_SOURCE(Part::FaceMakerExtrusion, Part::FaceMakerCheese)
std::string FaceMakerExtrusion::getUserFriendlyName() const
{
return {QT_TRANSLATE_NOOP("Part_FaceMaker", "Part Extrude facemaker")};
return {tr("Part Extrude facemaker").toStdString()};
}
std::string FaceMakerExtrusion::getBriefExplanation() const
{
return {QT_TRANSLATE_NOOP("Part_FaceMaker", "Supports making faces with holes, does not support nesting.")};
return {tr("Supports making faces with holes, does not support nesting.").toStdString()};
}
#if OCC_VERSION_HEX >= 0x070600