TechDraw: Update UI strings for consistency

Closes: #22143
This commit is contained in:
Ryan Kembrey
2025-06-23 18:43:09 +10:00
committed by Kacper Donat
parent be0c0e7a74
commit bbfbb6e059
93 changed files with 1112 additions and 1294 deletions

View File

@@ -74,8 +74,8 @@ CmdTechDrawHatch::CmdTechDrawHatch()
{
sAppModule = "TechDraw";
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Hatch a Face using Image File");
sToolTipText = sMenuText;
sMenuText = QT_TR_NOOP("Image Hatch");
sToolTipText = QT_TR_NOOP("Applies a hatch pattern to the selected faces using an image file");
sWhatsThis = "TechDraw_Hatch";
sStatusTip = sToolTipText;
sPixmap = "actions/TechDraw_Hatch";
@@ -108,8 +108,8 @@ void CmdTechDrawHatch::activated(int iMsg)
int face = TechDraw::DrawUtil::getIndexFromName(s);
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?"));
QMessageBox::question(Gui::getMainWindow(), QObject::tr("Replace hatch?"),
QObject::tr("Some faces in the selection are already hatched. Replace?"));
if (rc == QMessageBox::StandardButton::NoButton) {
return;
}
@@ -120,7 +120,7 @@ void CmdTechDrawHatch::activated(int iMsg)
}
if (removeOld) {
openCommand(QT_TRANSLATE_NOOP("Command", "Remove old Hatch"));
openCommand(QT_TRANSLATE_NOOP("Command", "Remove old hatch"));
std::vector<std::pair< int, TechDraw::DrawHatch*> > toRemove;
for (auto& h: hatchObjs) { //all the hatch objects for selected DVP
std::vector<std::string> hatchSubs = h->Source.getSubValues();
@@ -169,8 +169,8 @@ CmdTechDrawGeometricHatch::CmdTechDrawGeometricHatch()
{
sAppModule = "TechDraw";
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Apply Geometric Hatch to Face");
sToolTipText = sMenuText;
sMenuText = QT_TR_NOOP("Geometric Hatch");
sToolTipText = QT_TR_NOOP("Applies a geometric hatch pattern to the selected faces");
sWhatsThis = "TechDraw_GeometricHatch";
sStatusTip = sToolTipText;
sPixmap = "actions/TechDraw_GeometricHatch";
@@ -240,10 +240,10 @@ CmdTechDrawImage::CmdTechDrawImage()
{
// setting the Gui eye-candy
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert Bitmap Image");
sToolTipText = QT_TR_NOOP("Insert Bitmap from a file into a page");
sMenuText = QT_TR_NOOP("Bitmap Image");
sToolTipText = QT_TR_NOOP("Inserts a bitmap from a file into the current page");
sWhatsThis = "TechDraw_Image";
sStatusTip = QT_TR_NOOP("Insert Bitmap from a file into a page");
sStatusTip = QT_TR_NOOP("Insert bitmap from a file into a page");
sPixmap = "actions/TechDraw_Image";
}
@@ -258,7 +258,7 @@ void CmdTechDrawImage::activated(int iMsg)
// Reading an image
QString fileName = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(),
QString::fromUtf8(QT_TR_NOOP("Select an Image File")),
QString::fromUtf8(QT_TR_NOOP("Select an image file")),
Preferences::defaultSymbolDir(),
QString::fromUtf8(QT_TR_NOOP("Image files (*.jpg *.jpeg *.png *.bmp);;All files (*)")));
if (fileName.isEmpty()) {
@@ -303,8 +303,8 @@ CmdTechDrawToggleFrame::CmdTechDrawToggleFrame()
{
sAppModule = "TechDraw";
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Turn View Frames On/Off");
sToolTipText = QT_TR_NOOP("Turn View Frames On/Off");
sMenuText = QT_TR_NOOP("Toggle View Frames");
sToolTipText = QT_TR_NOOP("Toggles the visibility of the view frames");
sWhatsThis = "TechDraw_Toggle";
sStatusTip = sToolTipText;
sPixmap = "actions/TechDraw_ToggleFrame";
@@ -331,8 +331,8 @@ void CmdTechDrawToggleFrame::activated(int iMsg)
ViewProviderPage* vpPage = freecad_cast<ViewProviderPage*>(vp);
if (!vpPage) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No TechDraw Page"),
QObject::tr("Need a TechDraw Page for this command"));
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No TechDraw page"),
QObject::tr("A TechDraw page is required for this command"));
return;
}
@@ -384,7 +384,7 @@ bool _checkSelectionHatch(Gui::Command* cmd) {
std::vector<Gui::SelectionObject> selection = cmd->getSelection().getSelectionEx();
if (selection.empty()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect selection"),
QObject::tr("Select a Face first"));
QObject::tr("Select a face first"));
return false;
}
@@ -398,20 +398,20 @@ bool _checkSelectionHatch(Gui::Command* cmd) {
std::vector<App::DocumentObject*> pages = cmd->getDocument()->getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
if (pages.empty()){
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect selection"),
QObject::tr("Create a page to insert."));
QObject::tr("Create a page to insert"));
return false;
}
const std::vector<std::string> &SubNames = selection[0].getSubNames();
if (SubNames.empty()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
QObject::tr("No Faces to hatch in this selection"));
QObject::tr("No faces to hatch in this selection"));
return false;
}
std::string gType = TechDraw::DrawUtil::getGeomTypeFromName(SubNames.at(0));
if (!(gType == "Face")) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
QObject::tr("No Faces to hatch in this selection"));
QObject::tr("No faces to hatch in this selection"));
return false;
}