PD: Add translation to error messages

This commit is contained in:
Chris Hennes
2023-04-28 11:32:56 -05:00
parent 2ab9abbb01
commit 272a84ca5b
16 changed files with 214 additions and 219 deletions

View File

@@ -90,7 +90,7 @@ App::DocumentObjectExecReturn *Fillet::execute()
double radius = Radius.getValue();
if(radius <= 0)
return new App::DocumentObjectExecReturn("Fillet radius must be greater than zero");
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Fillet radius must be greater than zero"));
this->positionByBaseFeature();
@@ -113,11 +113,11 @@ App::DocumentObjectExecReturn *Fillet::execute()
mkFillet.Build();
if (!mkFillet.IsDone())
return new App::DocumentObjectExecReturn("Failed to create fillet");
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Failed to create fillet"));
TopoDS_Shape shape = mkFillet.Shape();
if (shape.IsNull())
return new App::DocumentObjectExecReturn("Resulting shape is null");
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is null"));
TopTools_ListOfShape aLarg;
aLarg.Append(baseShape.getShape());
@@ -128,13 +128,13 @@ App::DocumentObjectExecReturn *Fillet::execute()
aSfs->Perform();
shape = aSfs->Shape();
if (!BRepAlgo::IsValid(aLarg, shape, Standard_False, Standard_False)) {
return new App::DocumentObjectExecReturn("Resulting shape is invalid");
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is invalid"));
}
}
int solidCount = countSolids(shape);
if (solidCount > 1) {
return new App::DocumentObjectExecReturn("Fillet: Result has multiple solids. This is not supported at this time.");
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Fillet: Result has multiple solids. This is not supported at this time."));
}
shape = refineShapeIfActive(shape);