[TechDraw] Translations and grammer (#16301)

Co-authored-by: WandererFan <WandererFan@gmail.com>
This commit is contained in:
Benjamin Bræstrup Sayoc
2024-12-02 18:27:39 +01:00
committed by GitHub
parent 7df1a5d00a
commit e025b1bfe2
26 changed files with 77 additions and 76 deletions

View File

@@ -53,7 +53,7 @@ DrawViewDimExtent::DrawViewDimExtent(void)
Source.setScope(App::LinkScope::Global);
//Source3d is a candidate for deprecation as References3D contains the same information
ADD_PROPERTY_TYPE(Source3d, (nullptr, nullptr), "", (App::PropertyType)(App::Prop_Output), "3d geometry to be dimensioned");
ADD_PROPERTY_TYPE(Source3d, (nullptr, nullptr), "", (App::PropertyType)(App::Prop_Output), "3D geometry to be dimensioned");
Source3d.setScope(App::LinkScope::Global);
ADD_PROPERTY_TYPE(DirExtent ,(0), "", App::Prop_Output, "Horizontal / Vertical");

View File

@@ -1095,9 +1095,9 @@ arcPoints DrawViewDimension::arcPointsFromBaseGeom(TechDraw::BaseGeomPtr base)
else {
// fubar - can't have non-circular spline as target of Diameter dimension, but this is
// already checked, so something has gone badly wrong.
Base::Console().Error("%s: can not make a Circle from this BSpline edge\n",
Base::Console().Error("%s: can not make a Circle from this B-spline edge\n",
getNameInDocument());
throw Base::RuntimeError("Bad BSpline geometry for arc dimension");
throw Base::RuntimeError("Bad B-spline geometry for arc dimension");
}
}
else {
@@ -1173,7 +1173,7 @@ arcPoints DrawViewDimension::arcPointsFromEdge(TopoDS_Edge occEdge)
pts.isArc = isArc;
BRepAdaptor_Curve adaptCircle(circleEdge);
if (adaptCircle.GetType() != GeomAbs_Circle) {
throw Base::RuntimeError("failed to get circle from bspline");
throw Base::RuntimeError("failed to get circle from B-spline");
}
gp_Circ circle = adapt.Circle();
// TODO: same code as above. reuse opportunity.
@@ -1196,7 +1196,7 @@ arcPoints DrawViewDimension::arcPointsFromEdge(TopoDS_Edge occEdge)
}
}
else {
throw Base::RuntimeError("failed to make circle from bspline");
throw Base::RuntimeError("failed to make circle from B-spline");
}
}
else {

View File

@@ -594,7 +594,7 @@ TopoDS_Edge BaseGeom::completeEdge(const TopoDS_Edge &edge) {
// If an arc of ellipse was provided, return full ellipse
return BRepBuilderAPI_MakeEdge(curve.Ellipse());
default:
// Currently we are not extrapolating BSplines, though it is technically possible
// Currently we are not extrapolating B-splines, though it is technically possible
return BRepBuilderAPI_MakeEdge(curve.Curve().Curve());
}
}
@@ -1219,7 +1219,7 @@ BSpline::BSpline(const TopoDS_Edge &e)
}
//! Can this BSpline be represented by a straight line?
//! Can this B-spline be represented by a straight line?
// if len(first-last) == sum(len(pi - pi+1)) then it is a line
bool BSpline::isLine()
{
@@ -1232,7 +1232,7 @@ bool BSpline::isCircle()
return GeometryUtils::isCircle(occEdge);
}
// make a circular edge from BSpline
// make a circular edge from B-spline
TopoDS_Edge BSpline::asCircle(bool& arc)
{
return GeometryUtils::asCircle(occEdge, arc);
@@ -1561,7 +1561,7 @@ bool GeometryUtils::isCircle(TopoDS_Edge occEdge)
return GeometryUtils::getCircleParms(occEdge, radius, center, isArc);
}
//! tries to interpret a BSpline edge as a circle. Used by DVDim for approximate dimensions.
//! tries to interpret a B-spline edge as a circle. Used by DVDim for approximate dimensions.
//! calculates the curvature of the spline at a number of places and measures the deviation from the average
//! a true circle has constant curvature and would have no deviation from the average.
bool GeometryUtils::getCircleParms(TopoDS_Edge occEdge, double& radius, Base::Vector3d& center, bool& isArc)
@@ -1708,7 +1708,7 @@ bool GeometryUtils::isLine(TopoDS_Edge occEdge)
}
//! make a line Edge from BSpline Edge
//! make a line Edge from B-spline Edge
TopoDS_Edge GeometryUtils::asLine(TopoDS_Edge occEdge)
{
BRepAdaptor_Curve c(occEdge);

View File

@@ -1417,7 +1417,7 @@ void CmdTechDrawClipGroupAdd::activated(int iMsg)
std::string ClipName = clip->getNameInDocument();
std::string ViewName = view->getNameInDocument();
openCommand(QT_TRANSLATE_NOOP("Command", "ClipGroupAdd"));
openCommand(QT_TRANSLATE_NOOP("Command", "Add clip group"));
doCommand(Doc, "App.activeDocument().%s.ViewObject.Visibility = False", ViewName.c_str());
doCommand(Doc, "App.activeDocument().%s.addView(App.activeDocument().%s)", ClipName.c_str(),
ViewName.c_str());
@@ -1488,7 +1488,7 @@ void CmdTechDrawClipGroupRemove::activated(int iMsg)
std::string ClipName = clip->getNameInDocument();
std::string ViewName = view->getNameInDocument();
openCommand(QT_TRANSLATE_NOOP("Command", "ClipGroupRemove"));
openCommand(QT_TRANSLATE_NOOP("Command", "Remove clip group"));
doCommand(Doc, "App.activeDocument().%s.ViewObject.Visibility = False", ViewName.c_str());
doCommand(Doc, "App.activeDocument().%s.removeView(App.activeDocument().%s)", ClipName.c_str(),
ViewName.c_str());
@@ -1853,7 +1853,7 @@ void CmdTechDrawExportPageDXF::activated(int iMsg)
QString defaultDir;
QString fileName = Gui::FileDialog::getSaveFileName(
Gui::getMainWindow(), QString::fromUtf8(QT_TR_NOOP("Save DXF file")), defaultDir,
QString::fromUtf8(QT_TR_NOOP("DXF (*.dxf)")));
QString::fromUtf8("DXF (*.dxf)"));
if (fileName.isEmpty()) {
return;

View File

@@ -120,7 +120,7 @@ void CmdTechDrawLeaderLine::activated(int iMsg)
baseFeat = dynamic_cast<TechDraw::DrawView *>(selection[0].getObject());
if (!baseFeat) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong Selection"),
QObject::tr("Can not attach leader. No base View selected."));
QObject::tr("Can not attach leader. No base View selected."));
return;
}
} else {

View File

@@ -2440,7 +2440,7 @@ void execDim(Gui::Command* cmd, std::string type, StringVector acceptableGeometr
if (geometryRefs2d == isBSplineCircle || geometryRefs3d == isBSplineCircle) {
QMessageBox::StandardButton result = QMessageBox::warning(
Gui::getMainWindow(),
QObject::tr("BSpline Curve Warning"),
QObject::tr("B-spline Curve Warning"),
QObject::tr("Selected edge is a B-spline. Value will be approximate. Continue?"),
QMessageBox::Ok | QMessageBox::Cancel,
QMessageBox::Cancel);
@@ -2451,7 +2451,7 @@ void execDim(Gui::Command* cmd, std::string type, StringVector acceptableGeometr
if (geometryRefs2d == isBSpline || geometryRefs3d == isBSpline) {
QMessageBox::critical(
Gui::getMainWindow(),
QObject::tr("BSpline Curve Error"),
QObject::tr("B-spline Curve Error"),
QObject::tr("Selected edge is a B-spline and a radius/diameter can not be calculated."));
return;
}

View File

@@ -108,7 +108,7 @@ void CmdTechDrawHatch::activated(int iMsg)
if (TechDraw::DrawHatch::faceIsHatched(face, hatchObjs)) {
QMessageBox::StandardButton rc =
QMessageBox::question(Gui::getMainWindow(), QObject::tr("Replace Hatch?"),
QObject::tr("Some Faces in selection are already hatched. Replace?"));
QObject::tr("Some Faces in selection are already hatched. Replace?"));
if (rc == QMessageBox::StandardButton::NoButton) {
return;
}

View File

@@ -26,7 +26,7 @@
<item>
<widget class="QLabel" name="lPrompt">
<property name="text">
<string>FreeCAD could not determine which Page to use. Please select a Page.</string>
<string>FreeCAD could not determine which Page to use. Please select a Page.</string>
</property>
<property name="wordWrap">
<bool>true</bool>

View File

@@ -402,7 +402,7 @@ Multiplier of 'Font Size'</string>
</font>
</property>
<property name="toolTip">
<string>Controls the size of the gap between the dimension point and the start of the extension line for ISO dimensions.</string>
<string>Controls the gap size between the dimension point and the start of the extension line for ISO dimensions.</string>
</property>
<property name="text">
<string>Extension Gap Factor - ISO</string>
@@ -430,7 +430,7 @@ Multiplier of 'Font Size'</string>
</font>
</property>
<property name="toolTip">
<string>Controls the size of the gap between the dimension point and the start of the extension line for ASME dimensions.</string>
<string>Controls the gap size between the dimension point and the start of the extension line for ASME dimensions.</string>
</property>
<property name="text">
<string>Extension Gap Factor - ASME</string>
@@ -440,7 +440,7 @@ Multiplier of 'Font Size'</string>
<item row="9" column="2">
<widget class="Gui::PrefDoubleSpinBox" name="pdsbGapISO">
<property name="toolTip">
<string>Controls the size of the gap between the dimension point and the start of the extension line for ISO dimensions.
<string>Controls the gap size between the dimension point and the start of the extension line for ISO dimensions.
Value * linewidth is the gap.
Normally, no gap is used. If using a gap, the recommended value is 8.</string>
</property>
@@ -458,7 +458,7 @@ Multiplier of 'Font Size'</string>
<item row="10" column="2">
<widget class="Gui::PrefDoubleSpinBox" name="pdsbGapASME">
<property name="toolTip">
<string>Controls the size of the gap between the dimension point and the start of the extension line for ASME dimensions. Value * linewidth is the gap.
<string>Controls the gap size between the dimension point and the start of the extension line for ASME dimensions. Value * linewidth is the gap.
Normally, no gap is used. If using a gap, the recommended value is 6.</string>
</property>
<property name="value">
@@ -480,7 +480,7 @@ Multiplier of 'Font Size'</string>
</font>
</property>
<property name="toolTip">
<string>Controls the size of spacing between dimension line and dimension text for ISO dimensions.</string>
<string>Controls the gap size between dimension line and dimension text for ISO dimensions.</string>
</property>
<property name="text">
<string>Line Spacing - ISO</string>
@@ -490,7 +490,7 @@ Multiplier of 'Font Size'</string>
<item row="11" column="2">
<widget class="Gui::PrefDoubleSpinBox" name="pdsbLineSpacingFactorISO">
<property name="toolTip">
<string>Controls the size of spacing between dimension line and dimension text.
<string>Controls the gap size between dimension line and dimension text.
Value * linewidth is the line spacing.</string>
</property>
<property name="value">

View File

@@ -382,12 +382,12 @@ for ProjectionGroups</string>
</property>
<item>
<property name="text">
<string>ANSI</string>
<string notr="true">ANSI</string>
</property>
</item>
<item>
<property name="text">
<string>ISO</string>
<string notr="true">ISO</string>
</property>
</item>
</widget>

View File

@@ -392,7 +392,7 @@ void MDIViewPage::print(QPrinter* printer)
if (doPrint && printer->pageLayout().orientation() != pageAttr.orientation()) {
int ret = QMessageBox::warning(
this, tr("Different orientation"),
tr("The printer uses a different orientation than the drawing.\n"
tr("The printer uses a different orientation than the drawing.\n"
"Do you want to continue?"),
QMessageBox::Yes | QMessageBox::No);
if (ret != QMessageBox::Yes) {
@@ -471,7 +471,7 @@ void MDIViewPage::saveSVG(std::string filename)
void MDIViewPage::saveSVG()
{
QStringList filter;
filter << QObject::tr("SVG (*.svg)");
filter << QStringLiteral("SVG (*.svg)");
filter << QObject::tr("All Files (*.*)");
QString fn =
Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), QObject::tr("Export page as SVG"),
@@ -494,7 +494,7 @@ void MDIViewPage::saveDXF()
QString defaultDir;
QString fileName = Gui::FileDialog::getSaveFileName(
Gui::getMainWindow(), QString::fromUtf8(QT_TR_NOOP("Save DXF file")), defaultDir,
QString::fromUtf8(QT_TR_NOOP("DXF (*.dxf)")));
QString::fromUtf8("DXF (*.dxf)"));
if (fileName.isEmpty()) {
return;
}
@@ -517,7 +517,7 @@ void MDIViewPage::savePDF()
QString defaultDir;
QString fileName = Gui::FileDialog::getSaveFileName(
Gui::getMainWindow(), QString::fromUtf8(QT_TR_NOOP("Save PDF file")), defaultDir,
QString::fromUtf8(QT_TR_NOOP("PDF (*.pdf)")));
QString::fromUtf8("PDF (*.pdf)"));
if (fileName.isEmpty()) {
return;
}

View File

@@ -416,9 +416,10 @@ void PagePrinter::saveDXF(ViewProviderPage* vpPage, const std::string& inFileNam
{
TechDraw::DrawPage* page = vpPage->getDrawPage();
std::string PageName = page->getNameInDocument();
auto filespec = Base::Tools::escapeEncodeFilename(inFileName);
filespec = DU::cleanFilespecBackslash(filespec);
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Save page to dxf"));
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Save page to DXF"));
Gui::Command::doCommand(Gui::Command::Doc, "import TechDraw");
Gui::Command::doCommand(Gui::Command::Doc,
"TechDraw.writeDXFPage(App.activeDocument().%s, u\"%s\")",

View File

@@ -305,7 +305,7 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="unit" stdset="0">
<string>mm</string>
<string notr="true">mm</string>
</property>
<property name="value">
<double>3.000000000000000</double>

View File

@@ -103,7 +103,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>X</string>
<string notr="true">X</string>
</property>
</widget>
</item>
@@ -139,7 +139,7 @@
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Y</string>
<string notr="true">Y</string>
</property>
</widget>
</item>

View File

@@ -98,7 +98,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>X:</string>
<string notr="true">X:</string>
</property>
</widget>
</item>
@@ -112,7 +112,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Y:</string>
<string notr="true">Y:</string>
</property>
</widget>
</item>
@@ -126,7 +126,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Z:</string>
<string notr="true">Z:</string>
</property>
</widget>
</item>

View File

@@ -91,7 +91,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>X:</string>
<string notr="true">X:</string>
</property>
</widget>
</item>
@@ -105,7 +105,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Y:</string>
<string notr="true">Y:</string>
</property>
</widget>
</item>
@@ -119,7 +119,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Z:</string>
<string notr="true">Z:</string>
</property>
</widget>
</item>
@@ -170,7 +170,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>X:</string>
<string notr="true">X:</string>
</property>
</widget>
</item>
@@ -184,7 +184,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Y:</string>
<string notr="true">Y:</string>
</property>
</widget>
</item>
@@ -198,7 +198,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Z:</string>
<string notr="true">Z:</string>
</property>
</widget>
</item>

View File

@@ -111,7 +111,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>X</string>
<string notr="true">X</string>
</property>
</widget>
</item>
@@ -150,7 +150,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Y</string>
<string notr="true">Y</string>
</property>
</widget>
</item>

View File

@@ -135,7 +135,7 @@ void TaskDimRepair::slotUseSelection()
if (geometryRefs2d == isInvalid) {
QMessageBox::warning(Gui::getMainWindow(),
QObject::tr("Incorrect Selection"),
QObject::tr("Can not make a dimension from selection"));
QObject::tr("Can not make dimension from selection"));
return;
}
//what 3d geometry configuration did we receive?

View File

@@ -144,7 +144,7 @@ bool TaskDimension::accept()
{
if (m_dimensionVP.expired()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Missing Dimension"),
QObject::tr("Dimension not found. Was it deleted? Can not continue."));
QObject::tr("Dimension not found. Was it deleted? Can not continue."));
return true;
}
Gui::Document* doc = m_dimensionVP->getDocument();
@@ -159,7 +159,7 @@ bool TaskDimension::reject()
{
if (m_dimensionVP.expired()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Missing Dimension"),
QObject::tr("Dimension not found. Was it deleted? Can not continue."));
QObject::tr("Dimension not found. Was it deleted? Can not continue."));
return true;
}
Gui::Document* doc = m_dimensionVP->getDocument();

View File

@@ -104,7 +104,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Svg Line Color</string>
<string>SVG Line Color</string>
</property>
</widget>
</item>

View File

@@ -59,82 +59,82 @@
</property>
<item>
<property name="text">
<string>c11</string>
<string notr="true">c11</string>
</property>
</item>
<item>
<property name="text">
<string>f7</string>
<string notr="true">f7</string>
</property>
</item>
<item>
<property name="text">
<string>h6</string>
<string notr="true">h6</string>
</property>
</item>
<item>
<property name="text">
<string>h7</string>
<string notr="true">h7</string>
</property>
</item>
<item>
<property name="text">
<string>h9</string>
<string notr="true">h9</string>
</property>
</item>
<item>
<property name="text">
<string>h9</string>
<string notr="true">h9</string>
</property>
</item>
<item>
<property name="text">
<string>h9</string>
<string notr="true">h9</string>
</property>
</item>
<item>
<property name="text">
<string>h6</string>
<string notr="true">h6</string>
</property>
</item>
<item>
<property name="text">
<string>h6</string>
<string notr="true">h6</string>
</property>
</item>
<item>
<property name="text">
<string>h6</string>
<string notr="true">h6</string>
</property>
</item>
<item>
<property name="text">
<string>h6</string>
<string notr="true">h6</string>
</property>
</item>
<item>
<property name="text">
<string>h6</string>
<string notr="true">h6</string>
</property>
</item>
<item>
<property name="text">
<string>k6</string>
<string notr="true">k6</string>
</property>
</item>
<item>
<property name="text">
<string>n6</string>
<string notr="true">n6</string>
</property>
</item>
<item>
<property name="text">
<string>r6</string>
<string notr="true">r6</string>
</property>
</item>
<item>
<property name="text">
<string>s6</string>
<string notr="true">s6</string>
</property>
</item>
</widget>
@@ -149,7 +149,7 @@
<item row="0" column="1">
<widget class="QLabel" name="lbBaseField">
<property name="text">
<string> H11/</string>
<string notr="true"> H11/</string>
</property>
</widget>
</item>

View File

@@ -96,7 +96,7 @@
<item row="4" column="2">
<widget class="QComboBox" name="cb_Style">
<property name="toolTip">
<string>The use of the Qt line style is being phased out. Please use a standard line style instead.</string>
<string>The use of the Qt line style is being phased out. Please use a standard line style instead.</string>
</property>
<property name="currentIndex">
<number>-1</number>

View File

@@ -957,7 +957,7 @@ void DirectionEditDialog::createUI() {
// Create layout and widgets for X
auto* xLayout = new QHBoxLayout;
auto* xLabel = new QLabel(tr("X: "));
auto* xLabel = new QLabel(QStringLiteral("X: "));
xSpinBox = new Gui::QuantitySpinBox;
xSpinBox->setUnit(Base::Unit::Length);
xLayout->addWidget(xLabel);
@@ -965,7 +965,7 @@ void DirectionEditDialog::createUI() {
// Create layout and widgets for Y
auto* yLayout = new QHBoxLayout;
auto* yLabel = new QLabel(tr("Y: "));
auto* yLabel = new QLabel(QStringLiteral("Y: "));
ySpinBox = new Gui::QuantitySpinBox;
ySpinBox->setUnit(Base::Unit::Length);
yLayout->addWidget(yLabel);
@@ -973,7 +973,7 @@ void DirectionEditDialog::createUI() {
// Create layout and widgets for Z
auto* zLayout = new QHBoxLayout;
auto* zLabel = new QLabel(tr("Z: "));
auto* zLabel = new QLabel(QStringLiteral("Z: "));
zSpinBox = new Gui::QuantitySpinBox;
zSpinBox->setUnit(Base::Unit::Length);
zLayout->addWidget(zLabel);

View File

@@ -315,7 +315,7 @@
</size>
</property>
<property name="text">
<string>X</string>
<string notr="true">X</string>
</property>
</widget>
</item>
@@ -369,7 +369,7 @@
</size>
</property>
<property name="text">
<string>Y</string>
<string notr="true">Y</string>
</property>
</widget>
</item>
@@ -410,7 +410,7 @@
</size>
</property>
<property name="text">
<string>Z</string>
<string notr="true">Z</string>
</property>
</widget>
</item>

View File

@@ -265,7 +265,7 @@
<string>Use ISO standard</string>
</property>
<property name="text">
<string>ISO</string>
<string notr="true">ISO</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -278,7 +278,7 @@
<string>Use ASME standard</string>
</property>
<property name="text">
<string>ASME</string>
<string notr="true">ASME</string>
</property>
</widget>
</item>

View File

@@ -305,7 +305,7 @@ This directory will be used for the symbol selection.</string>
<enum>Gui::FileChooser::Directory</enum>
</property>
<property name="filter">
<string>*.svg</string>
<string notr="true">*.svg</string>
</property>
</widget>
</item>