Material: Update UI strings for consistency

Closes: #22130
This commit is contained in:
Max Wilfinger
2025-06-22 15:39:21 +02:00
committed by Kacper Donat
parent 0be9b79093
commit 996bb28199
28 changed files with 121 additions and 123 deletions

View File

@@ -85,7 +85,7 @@ PyMOD_INIT_FUNC(Materials)
#endif
PyObject* module = Materials::initModule();
Base::Console().log("Loading Material module... done\n");
Base::Console().log("Loading Material module done\n");
Base::Interpreter().addType(&Materials::Array2DPy::Type, module, "Array2D");
Base::Interpreter().addType(&Materials::Array3DPy::Type, module, "Array3D");

View File

@@ -100,7 +100,7 @@ void ExternalManager::getConfiguration()
void ExternalManager::instantiate()
{
_instantiated = false;
Base::Console().log("Loading external manager...\n");
Base::Console().log("Loading external manager\n");
if (_moduleName.empty() || _className.empty()) {
Base::Console().log("External module not defined\n");

View File

@@ -94,7 +94,7 @@ PyMOD_INIT_FUNC(MatGui)
PyObject* matGuiModule = MatGui::initModule();
Base::Console().log("Loading GUI of Material module... done\n");
Base::Console().log("Loading GUI of Material module done\n");
MatGui::Workbench ::init();
auto manip = std::make_shared<MatGui::WorkbenchManipulator>();
@@ -107,7 +107,7 @@ PyMOD_INIT_FUNC(MatGui)
// widget
Gui::Dialog::DlgPreferencesImp::setGroupData("Material",
"Material",
QObject::tr("Material workbench"));
QObject::tr("Material Workbench"));
new Gui::PrefPageProducer<MatGui::DlgSettingsMaterial>(
QT_TRANSLATE_NOOP("QObject", "Material"));
new Gui::PrefPageProducer<MatGui::DlgSettingsDefaultMaterial>(

View File

@@ -76,7 +76,7 @@ Array2D::Array2D(const QString& propertyName,
ui->tableView->setContextMenuPolicy(Qt::CustomContextMenu);
connect(ui->tableView, &QWidget::customContextMenuRequested, this, &Array2D::onContextMenu);
_deleteAction.setText(tr("Delete row"));
_deleteAction.setText(tr("Delete Row"));
_deleteAction.setShortcut(Gui::QtTools::deleteKeySequence());
connect(&_deleteAction, &QAction::triggered, this, &Array2D::onDelete);
@@ -135,7 +135,7 @@ void Array2D::onDataChanged(const QModelIndex& topLeft,
void Array2D::onContextMenu(const QPoint& pos)
{
QMenu contextMenu(tr("Context menu"), this);
QMenu contextMenu(tr("Context Menu"), this);
contextMenu.addAction(&_deleteAction);
@@ -169,7 +169,7 @@ int Array2D::confirmDelete()
box.setIcon(QMessageBox::Question);
box.setWindowTitle(QObject::tr("Confirm Delete"));
QString prompt = QObject::tr("Are you sure you want to delete the row?");
QString prompt = QObject::tr("Delete the row?");
box.setText(prompt);
box.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);

View File

@@ -74,11 +74,11 @@ Array3D::Array3D(const QString& propertyName,
ui->table2D->setContextMenuPolicy(Qt::CustomContextMenu);
connect(ui->table2D, &QWidget::customContextMenuRequested, this, &Array3D::on2DContextMenu);
_deleteDepthAction.setText(tr("Delete row"));
_deleteDepthAction.setText(tr("Delete Row"));
connect(&_deleteDepthAction, &QAction::triggered, this, &Array3D::onDepthDelete);
ui->table3D->addAction(&_deleteDepthAction);
_delete2DAction.setText(tr("Delete row"));
_delete2DAction.setText(tr("Delete Row"));
connect(&_delete2DAction, &QAction::triggered, this, &Array3D::on2DDelete);
ui->table2D->addAction(&_delete2DAction);
@@ -228,7 +228,7 @@ void Array3D::update2DArray()
void Array3D::onDepthContextMenu(const QPoint& pos)
{
QMenu contextMenu(tr("Context menu"), this);
QMenu contextMenu(tr("Context Menu"), this);
contextMenu.addAction(&_deleteDepthAction);
@@ -262,7 +262,7 @@ int Array3D::confirmDepthDelete()
box.setIcon(QMessageBox::Question);
box.setWindowTitle(tr("Confirm Delete"));
QString prompt = tr("Are you sure you want to delete the row?");
QString prompt = tr("Delete the row?");
box.setText(prompt);
box.setInformativeText(tr("Removing this will also remove all 2D contents."));
@@ -299,7 +299,7 @@ void Array3D::deleteDepthSelected()
void Array3D::on2DContextMenu(const QPoint& pos)
{
QMenu contextMenu(tr("Context menu"), this);
QMenu contextMenu(tr("Context Menu"), this);
contextMenu.addAction(&_delete2DAction);
@@ -334,7 +334,7 @@ int Array3D::confirm2dDelete()
box.setIcon(QMessageBox::Question);
box.setWindowTitle(tr("Confirm Delete"));
QString prompt = tr("Are you sure you want to delete the row?");
QString prompt = tr("Delete the row?");
box.setText(prompt);
box.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);

View File

@@ -51,8 +51,8 @@ CmdMaterialEdit::CmdMaterialEdit()
{
sAppModule = "Material";
sGroup = QT_TR_NOOP("Material");
sMenuText = QT_TR_NOOP("Edit...");
sToolTipText = QT_TR_NOOP("Edit material properties");
sMenuText = QT_TR_NOOP("Edit");
sToolTipText = QT_TR_NOOP("Edits material properties");
sWhatsThis = "Material_Edit";
sStatusTip = sToolTipText;
sPixmap = "Material_Edit";
@@ -85,7 +85,7 @@ StdCmdSetAppearance::StdCmdSetAppearance()
: Command("Std_SetAppearance")
{
sGroup = "Standard-View";
sMenuText = QT_TR_NOOP("&Appearance...");
sMenuText = QT_TR_NOOP("&Appearance");
sToolTipText = QT_TR_NOOP("Sets the display properties of the selected object");
sWhatsThis = "Std_SetAppearance";
sStatusTip = QT_TR_NOOP("Sets the display properties of the selected object");
@@ -114,7 +114,7 @@ StdCmdSetMaterial::StdCmdSetMaterial()
: Command("Std_SetMaterial")
{
sGroup = "Standard-View";
sMenuText = QT_TR_NOOP("&Material...");
sMenuText = QT_TR_NOOP("&Material");
sToolTipText = QT_TR_NOOP("Sets the material of the selected object");
sWhatsThis = "Std_SetMaterial";
sStatusTip = QT_TR_NOOP("Sets the material of the selected object");
@@ -143,8 +143,8 @@ CmdInspectAppearance::CmdInspectAppearance()
: Command("Materials_InspectAppearance")
{
sGroup = "Standard-View";
sMenuText = QT_TR_NOOP("Inspect Appearance...");
sToolTipText = QT_TR_NOOP("Inspect the appearance properties of the selected object");
sMenuText = QT_TR_NOOP("Inspect Appearance");
sToolTipText = QT_TR_NOOP("Inspects the appearance properties of the selected object");
sWhatsThis = "Materials_InspectAppearance";
sStatusTip = QT_TR_NOOP("Inspect the appearance properties of the selected object");
// sPixmap = "Material_Edit";
@@ -170,8 +170,8 @@ CmdInspectMaterial::CmdInspectMaterial()
: Command("Materials_InspectMaterial")
{
sGroup = "Standard-View";
sMenuText = QT_TR_NOOP("Inspect Material...");
sToolTipText = QT_TR_NOOP("Inspect the material properties of the selected object");
sMenuText = QT_TR_NOOP("Inspect Material");
sToolTipText = QT_TR_NOOP("Inspects the material properties of the selected object");
sWhatsThis = "Materials_InspectMaterial";
sStatusTip = QT_TR_NOOP("Inspect the material properties of the selected object");
// sPixmap = "Material_Edit";
@@ -199,8 +199,8 @@ CmdMigrateToExternal::CmdMigrateToExternal()
: Command("Materials_MigrateToExternal")
{
sGroup = "Standard-View";
sMenuText = QT_TR_NOOP("Migrate...");
sToolTipText = QT_TR_NOOP("Migrate the materials to the external materials manager");
sMenuText = QT_TR_NOOP("Migrate");
sToolTipText = QT_TR_NOOP("Migrates the materials to the external materials manager");
sWhatsThis = "Materials_MigrateToDatabase";
sStatusTip = QT_TR_NOOP("Migrate existing materials to the external materials manager");
// sPixmap = "Materials_Edit";

View File

@@ -11,13 +11,13 @@
</rect>
</property>
<property name="windowTitle">
<string>Display properties</string>
<string>Display Properties</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox1">
<property name="title">
<string>Viewing mode</string>
<string>Viewing Mode</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
@@ -52,7 +52,7 @@
<item>
<widget class="QLabel" name="textLabel1">
<property name="text">
<string>Document window:</string>
<string>Document window</string>
</property>
</widget>
</item>
@@ -84,7 +84,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>Plot mode:</string>
<string>Plot mode</string>
</property>
</widget>
</item>
@@ -141,7 +141,7 @@
<item>
<widget class="QLabel" name="textLabel2">
<property name="text">
<string>Point size:</string>
<string>Point size</string>
</property>
</widget>
</item>
@@ -196,7 +196,7 @@
<item>
<widget class="QLabel" name="textLabel3">
<property name="text">
<string>Line width:</string>
<string>Line width</string>
</property>
</widget>
</item>
@@ -234,7 +234,7 @@
<item row="2" column="0">
<widget class="QLabel" name="textLabel1_2">
<property name="text">
<string>Transparency:</string>
<string>Transparency</string>
</property>
</widget>
</item>
@@ -286,7 +286,7 @@
<item row="4" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Line transparency:</string>
<string>Line transparency</string>
</property>
</widget>
</item>
@@ -362,14 +362,14 @@
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Color plot:</string>
<string>Color plot</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Custom appearance:</string>
<string>Custom appearance</string>
</property>
</widget>
</item>
@@ -379,21 +379,21 @@
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Point color:</string>
<string>Point color</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Line color:</string>
<string>Line color</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="buttonColorPlot">
<property name="text">
<string notr="true">...</string>
<string notr="true">Color Plot</string>
</property>
</widget>
</item>
@@ -403,7 +403,7 @@
<item row="0" column="1">
<widget class="QPushButton" name="buttonCustomAppearance">
<property name="text">
<string notr="true">...</string>
<string notr="true">Appearance</string>
</property>
</widget>
</item>

View File

@@ -178,17 +178,17 @@ void DlgDisplayPropertiesImp::setupFilters()
auto filterList = std::make_shared<std::list<std::shared_ptr<Materials::MaterialFilter>>>();
auto filter = std::make_shared<Materials::MaterialFilter>();
filter->setName(tr("Basic Appearance"));
filter->setName(tr("Basic appearance"));
filter->addRequiredComplete(Materials::ModelUUIDs::ModelUUID_Rendering_Basic);
filterList->push_back(filter);
filter = std::make_shared<Materials::MaterialFilter>();
filter->setName(tr("Texture Appearance"));
filter->setName(tr("Texture appearance"));
filter->addRequiredComplete(Materials::ModelUUIDs::ModelUUID_Rendering_Texture);
filterList->push_back(filter);
filter = std::make_shared<Materials::MaterialFilter>();
filter->setName(tr("All Materials"));
filter->setName(tr("All materials"));
filterList->push_back(filter);
d->ui.widgetMaterial->setIncludeEmptyFolders(false);

View File

@@ -199,7 +199,7 @@ QWidget* DlgInspectAppearance::makeAppearanceTab(const App::Material& material)
int row = 0;
auto* labelDiffuse = new QLabel();
labelDiffuse->setText(tr("Diffuse Color"));
labelDiffuse->setText(tr("Diffuse color"));
auto* colorDiffuse = new ColorWidget(material.diffuseColor);
colorDiffuse->setMaximumHeight(23);
@@ -208,7 +208,7 @@ QWidget* DlgInspectAppearance::makeAppearanceTab(const App::Material& material)
row += 1;
auto* labelAmbient = new QLabel();
labelAmbient->setText(tr("Ambient Color"));
labelAmbient->setText(tr("Ambient color"));
auto* colorAmbient = new ColorWidget(material.ambientColor);
colorAmbient->setMaximumHeight(23);
@@ -217,7 +217,7 @@ QWidget* DlgInspectAppearance::makeAppearanceTab(const App::Material& material)
row += 1;
auto* labelEmissive = new QLabel();
labelEmissive->setText(tr("Emissive Color"));
labelEmissive->setText(tr("Emissive color"));
auto* colorEmissive = new ColorWidget(material.emissiveColor);
colorEmissive->setMaximumHeight(23);
@@ -226,7 +226,7 @@ QWidget* DlgInspectAppearance::makeAppearanceTab(const App::Material& material)
row += 1;
auto* labelSpecular = new QLabel();
labelSpecular->setText(tr("Specular Color"));
labelSpecular->setText(tr("Specular color"));
auto* colorSpecular = new ColorWidget(material.specularColor);
colorSpecular->setMaximumHeight(23);

View File

@@ -47,7 +47,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Document Name</string>
<string>Document name</string>
</property>
</widget>
</item>
@@ -61,7 +61,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Label / Internal Name</string>
<string>Label / internal name</string>
</property>
</widget>
</item>

View File

@@ -169,7 +169,7 @@ void DlgInspectMaterial::update(std::vector<Gui::ViewProvider*>& views)
ui->editObjectLabel->setText(QStringLiteral(""));
}
ui->editObjectName->setText(QLatin1String(obj->getNameInDocument()));
appendClip(tr("Internal Name: ") + QString::fromUtf8(obj->getNameInDocument()));
appendClip(tr("Internal name: ") + QString::fromUtf8(obj->getNameInDocument()));
auto subElement = Gui::Selection().getSelectionEx();
if (subElement.size() > 0) {
@@ -270,10 +270,10 @@ void DlgInspectMaterial::addModelDetails(QTreeView* tree,
addExpanded(tree, parent, library);
auto libraryPath =
clipItem(tr("Library Directory: ") + model->getLibrary()->getDirectoryPath());
clipItem(tr("Library directory: ") + model->getLibrary()->getDirectoryPath());
addExpanded(tree, parent, libraryPath);
auto directory = clipItem(tr("Sub Directory: ") + model->getDirectory());
auto directory = clipItem(tr("Subdirectory: ") + model->getDirectory());
addExpanded(tree, parent, directory);
auto inherits = clipItem(tr("Inherits:"));
@@ -343,9 +343,9 @@ void DlgInspectMaterial::addMaterialDetails(QTreeView* tree,
auto library =
clipItem(tr("Library: ") + material.getLibrary()->getName());
addExpanded(tree, parent, library);
auto libraryPath = clipItem(tr("Library Directory: ") + material.getLibrary()->getDirectoryPath());
auto libraryPath = clipItem(tr("Library directory: ") + material.getLibrary()->getDirectoryPath());
addExpanded(tree, parent, libraryPath);
auto directory = clipItem(tr("Sub Directory: ") + material.getDirectory());
auto directory = clipItem(tr("Sub directory: ") + material.getDirectory());
addExpanded(tree, parent, directory);
auto inherits = clipItem(tr("Inherits:"));
addExpanded(tree, parent, inherits);
@@ -362,25 +362,25 @@ void DlgInspectMaterial::addMaterialDetails(QTreeView* tree,
}
unindent();
auto appearance = clipItem(tr("Appearance Models:"));
auto appearance = clipItem(tr("Appearance models:"));
addExpanded(tree, parent, appearance);
indent();
addModels(tree, appearance, material.getAppearanceModels());
unindent();
auto physical = clipItem(tr("Physical Models:"));
auto physical = clipItem(tr("Physical models:"));
addExpanded(tree, parent, physical);
indent();
addModels(tree, physical, material.getPhysicalModels());
unindent();
auto appearanceProperties = clipItem(tr("Appearance Properties:"));
auto appearanceProperties = clipItem(tr("Appearance properties:"));
addExpanded(tree, parent, appearanceProperties);
indent();
addProperties(tree, appearanceProperties, material.getAppearanceProperties());
unindent();
auto physicalProperties = clipItem(tr("Physical Properties:"));
auto physicalProperties = clipItem(tr("Physical properties:"));
addExpanded(tree, parent, physicalProperties);
indent();
addProperties(tree, physicalProperties, material.getPhysicalProperties());

View File

@@ -47,7 +47,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Document Name</string>
<string>Document name</string>
</property>
</widget>
</item>
@@ -61,7 +61,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Label / Internal Name</string>
<string>Label / internal name</string>
</property>
</widget>
</item>
@@ -125,7 +125,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Copy to clipboard</string>
<string>Copy to Clipboard</string>
</property>
</widget>
</item>

View File

@@ -96,7 +96,7 @@ DlgMaterialImp::DlgMaterialImp(bool floating, QWidget* parent, Qt::WindowFlags f
if (floating) {
Gui::DockWindowManager* pDockMgr = Gui::DockWindowManager::instance();
QDockWidget* dw =
pDockMgr->addDockWindow("Display properties", this, Qt::AllDockWidgetAreas);
pDockMgr->addDockWindow("Display Properties", this, Qt::AllDockWidgetAreas);
dw->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
dw->setFloating(true);
dw->show();

View File

@@ -26,7 +26,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>External Interface</string>
<string>External interface</string>
</property>
</widget>
</item>
@@ -88,14 +88,14 @@
<item row="0" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Model Cache Size</string>
<string>Model cache size</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Hit Rate</string>
<string>Hit rate</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -121,7 +121,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Hit Rate</string>
<string>Hit rate</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -131,7 +131,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Material Cache Size</string>
<string>Material cache size</string>
</property>
</widget>
</item>

View File

@@ -20,7 +20,7 @@
<item>
<widget class="QGroupBox" name="gb_4_materials">
<property name="title">
<string>Card resources</string>
<string>Card Resources</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
@@ -28,7 +28,7 @@
<item>
<widget class="Gui::PrefCheckBox" name="cb_use_built_in_materials">
<property name="toolTip">
<string>The cards built-in to FreeCAD will be listed as available.</string>
<string>The cards built-in to FreeCAD will be listed as available</string>
</property>
<property name="text">
<string>Use built-in materials</string>
@@ -47,7 +47,7 @@
<item>
<widget class="Gui::PrefCheckBox" name="cb_use_mat_from_workbenches">
<property name="toolTip">
<string>Use materials added by external workbenches.</string>
<string>Use materials added by external workbenches</string>
</property>
<property name="text">
<string>Use materials from external workbenches</string>
@@ -66,10 +66,10 @@
<item>
<widget class="Gui::PrefCheckBox" name="cb_use_mat_from_config_dir">
<property name="toolTip">
<string>Also cards from FreeCAD's preferences directory will be listed as available.</string>
<string>Cards from FreeCADs preferences directory are also listed as available</string>
</property>
<property name="text">
<string>Use materials from Materials directory in user's FreeCAD preference directory</string>
<string>Use materials from the Materials preference directory</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -85,11 +85,10 @@
<item>
<widget class="Gui::PrefCheckBox" name="cb_use_mat_from_custom_dir">
<property name="toolTip">
<string>Also material cards also from the specified directory
will be listed as available.</string>
<string>Material cards from the specified directory will also be listed as available</string>
</property>
<property name="text">
<string>Use materials from user defined directory</string>
<string>Use materials from user-defined directory</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -152,13 +151,13 @@ will be listed as available.</string>
<item>
<widget class="QGroupBox" name="gb_4_materials_2">
<property name="title">
<string>Card sorting and duplicates</string>
<string>Card Sorting and Duplicates</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="Gui::PrefCheckBox" name="cb_delete_duplicates">
<property name="toolTip">
<string>Duplicate cards will be deleted from the displayed material card list.</string>
<string>Duplicate cards will be deleted from the displayed material card list</string>
</property>
<property name="text">
<string>Delete card duplicates</string>

View File

@@ -92,7 +92,7 @@
</sizepolicy>
</property>
<property name="text">
<string>File...</string>
<string>File</string>
</property>
</widget>
</item>

View File

@@ -141,7 +141,7 @@ int ListEdit::confirmDelete()
box.setIcon(QMessageBox::Question);
box.setWindowTitle(QObject::tr("Confirm Delete"));
QString prompt = QObject::tr("Are you sure you want to delete the row?");
QString prompt = QObject::tr("Delete the row?");
box.setText(prompt);
box.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);

View File

@@ -158,7 +158,7 @@ void MaterialDelegate::setValue(QAbstractItemModel* model,
property->getUnits().toStdString().c_str());
QMessageBox msgBox;
msgBox.setWindowTitle(QStringLiteral("Property units mismatch"));
msgBox.setWindowTitle(QStringLiteral("Property Units Mismatch"));
msgBox.setText(QStringLiteral("Units mismatch '%1' = '%2', "
"setting to default property units '%3'\n")
.arg(propertyName)

View File

@@ -190,7 +190,7 @@ int MaterialSave::confirmOverwrite(const QString& filename)
box.setWindowTitle(QObject::tr("Confirm Overwrite"));
QFileInfo info(_selectedFull);
QString prompt = tr("Are you sure you want to save over '%1'?").arg(filename);
QString prompt = tr("Save over '%1'?").arg(filename);
box.setText(prompt);
box.setInformativeText(tr("Saving over the original file may cause other documents to break. "
@@ -215,13 +215,13 @@ int MaterialSave::confirmNewMaterial()
{
QMessageBox box(this);
box.setIcon(QMessageBox::Question);
box.setWindowTitle(tr("Confirm Save As New Material"));
box.setWindowTitle(tr("Confirm Save as New Material"));
QString prompt = tr("Save as new material");
box.setText(prompt);
box.setInformativeText(tr(
"This material already exists in this library. Would you like to save as a new material?"));
"This material already exists in this library. Save as a new material?"));
box.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
box.setDefaultButton(QMessageBox::Cancel);
@@ -242,13 +242,13 @@ int MaterialSave::confirmCopy()
{
QMessageBox box(this);
box.setIcon(QMessageBox::Question);
box.setWindowTitle(tr("Confirm Save As Copy"));
box.setWindowTitle(tr("Confirm Save as Copy"));
QString prompt = tr("Save as Copy");
QString prompt = tr("Save as copy");
box.setText(prompt);
box.setInformativeText(tr("Saving a copy is not recommended as it can break other documents. "
"We recommend you save as a new material."));
"It is recommended to save as a new material."));
QPushButton* duplicateButton = box.addButton(tr("Save Copy"), QMessageBox::AcceptRole);
QPushButton* newButton = box.addButton(tr("Save As New"), QMessageBox::ActionRole);
@@ -483,7 +483,7 @@ void MaterialSave::onNewFolder(bool checked)
if (item->hasChildren()) {
for (auto i = 0; i < item->rowCount(); i++) {
auto child = item->child(i);
if (child->text().startsWith(tr("New Folder"))) {
if (child->text().startsWith(tr("New folder"))) {
newCount++;
}
}
@@ -493,7 +493,7 @@ void MaterialSave::onNewFolder(bool checked)
if (item->data(Qt::UserRole).isNull()) {
QIcon folderIcon(QStringLiteral(":/icons/folder.svg"));
QString folderName = tr("New Folder");
QString folderName = tr("New folder");
if (newCount > 0) {
folderName += QString::number(newCount);
}
@@ -533,7 +533,7 @@ QString MaterialSave::pathFromIndex(const QModelIndex& index) const
void MaterialSave::onContextMenu(const QPoint& pos)
{
QMenu contextMenu(tr("Context menu"), this);
QMenu contextMenu(tr("Context Menu"), this);
contextMenu.addAction(&_deleteAction);
@@ -565,7 +565,7 @@ int MaterialSave::confirmDelete(QWidget* parent)
box.setWindowTitle(QObject::tr("Confirm Delete"));
QFileInfo info(_selectedFull);
QString prompt = QObject::tr("Are you sure you want to delete '%1'?").arg(info.fileName());
QString prompt = QObject::tr("Delete '%1'?").arg(info.fileName());
box.setText(prompt);
if (selectedHasChildren()) {

View File

@@ -19,7 +19,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Library:</string>
<string>Library</string>
</property>
</widget>
</item>
@@ -67,7 +67,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Filename:</string>
<string>Filename</string>
</property>
</widget>
</item>
@@ -101,7 +101,7 @@
<item>
<widget class="QCheckBox" name="checkDerived">
<property name="text">
<string>Save as Inherited</string>
<string>Save as inherited</string>
</property>
</widget>
</item>

View File

@@ -137,7 +137,7 @@ void MaterialTreeWidget::createLayout()
m_expand->setIcon(style()->standardIcon(QStyle::SP_TitleBarUnshadeButton));
m_materialTree = new QTreeView(this);
m_filterCombo = new QComboBox(this);
m_editor = new QPushButton(tr("Launch editor"), this);
m_editor = new QPushButton(tr("Launch Editor"), this);
m_materialTree->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
m_materialTree->setMinimumSize(m_treeSizeHint);

View File

@@ -589,7 +589,7 @@ void MaterialsEditor::saveMaterial()
void MaterialsEditor::accept()
{
if (_material->isOldFormat()) {
Base::Console().log("*** Old Format File ***\n");
Base::Console().log("*** Old format file ***\n");
oldFormatError();
return;
@@ -606,7 +606,7 @@ void MaterialsEditor::oldFormatError()
box.setWindowTitle(tr("Old Format Material"));
box.setText(tr("This file is in the old material card format."));
box.setInformativeText(QObject::tr("You must save the material before using it."));
box.setInformativeText(QObject::tr("Save the material before using it."));
box.adjustSize(); // Silence warnings from Qt on Windows
box.exec();
}
@@ -1317,13 +1317,13 @@ void MaterialsEditor::onDoubleClick(const QModelIndex& index)
void MaterialsEditor::onContextMenu(const QPoint& pos)
{
QMenu contextMenu(tr("Context menu"), this);
QMenu contextMenu(tr("Context Menu"), this);
QAction action1(tr("Inherit from"), this);
QAction action1(tr("Inherit From"), this);
connect(&action1, &QAction::triggered, this, &MaterialsEditor::onInherit);
contextMenu.addAction(&action1);
QAction action2(tr("Inherit new material"), this);
QAction action2(tr("Inherit New Material"), this);
connect(&action2, &QAction::triggered, this, &MaterialsEditor::onInheritNew);
contextMenu.addAction(&action2);
@@ -1345,9 +1345,8 @@ int MaterialsEditor::confirmSave(QWidget* parent)
QMessageBox box(parent ? parent : this);
box.setIcon(QMessageBox::Question);
box.setWindowTitle(QObject::tr("Unsaved Material"));
box.setText(QObject::tr("Do you want to save your changes to the material before closing?"));
box.setInformativeText(QObject::tr("If you don't save, your changes will be lost."));
box.setText(QObject::tr("Save changes to the material before closing?"));
box.setInformativeText(QObject::tr("Otherwise, all changes will be lost."));
box.setStandardButtons(QMessageBox::Discard | QMessageBox::Cancel | QMessageBox::Save);
box.setDefaultButton(QMessageBox::Save);
box.setEscapeButton(QMessageBox::Cancel);

View File

@@ -148,7 +148,7 @@
<item row="5" column="0">
<widget class="QLabel" name="labelSourceReference">
<property name="text">
<string>Source Reference</string>
<string>Source reference</string>
</property>
</widget>
</item>
@@ -199,10 +199,10 @@
<item>
<widget class="QPushButton" name="buttonFavorite">
<property name="toolTip">
<string>Add to favorites</string>
<string>Adds or removes to/from favorites</string>
</property>
<property name="text">
<string notr="true">*</string>
<string>Toggle Favorite</string>
</property>
</widget>
</item>

View File

@@ -156,10 +156,10 @@
<item>
<widget class="QPushButton" name="buttonFavorite">
<property name="toolTip">
<string>Add to favorites</string>
<string>Adds or removes to/from favorites</string>
</property>
<property name="text">
<string notr="true">*</string>
<string>Toggle Favorites</string>
</property>
</widget>
</item>

View File

@@ -19,7 +19,7 @@
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Material card</string>
<string>Material Card</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
@@ -67,7 +67,7 @@
<string>Opens an existing material card</string>
</property>
<property name="text">
<string>Open...</string>
<string>Open</string>
</property>
</widget>
</item>
@@ -77,7 +77,7 @@
<string>Saves this material as a card</string>
</property>
<property name="text">
<string>Save as...</string>
<string>Save As…</string>
</property>
</widget>
</item>
@@ -93,7 +93,7 @@
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Material parameter</string>
<string>Material Parameter</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
@@ -112,7 +112,7 @@
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Add / remove parameter</string>
<string>Add/Remove Parameter</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
@@ -123,14 +123,14 @@
<item>
<widget class="QPushButton" name="ButtonAddProperty">
<property name="text">
<string>Add property</string>
<string>Add Property</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="ButtonDeleteProperty">
<property name="text">
<string>Delete property</string>
<string>Delete Property</string>
</property>
</widget>
</item>

View File

@@ -74,7 +74,7 @@ void DlgMigrateExternal::showLibraries()
void DlgMigrateExternal::migrate()
{
try {
statusUpdate(tr("Migrating Models..."));
statusUpdate(tr("Migrating models"));
for (int row = 0; row < ui->listModelLibraries->count(); row++) {
auto item = ui->listModelLibraries->item(row);
if (item->checkState() == Qt::Checked) {
@@ -86,7 +86,7 @@ void DlgMigrateExternal::migrate()
}
statusUpdate(tr("done"));
statusUpdate(tr("Validating Models..."));
statusUpdate(tr("Validating models"));
for (int row = 0; row < ui->listModelLibraries->count(); row++) {
auto item = ui->listModelLibraries->item(row);
if (item->checkState() == Qt::Checked) {
@@ -98,7 +98,7 @@ void DlgMigrateExternal::migrate()
}
statusUpdate(tr("done"));
statusUpdate(tr("Migrating Materials..."));
statusUpdate(tr("Migrating materials"));
for (int row = 0; row < ui->listMaterialLibraries->count(); row++) {
auto item = ui->listMaterialLibraries->item(row);
if (item->checkState() == Qt::Checked) {
@@ -110,7 +110,7 @@ void DlgMigrateExternal::migrate()
}
statusUpdate(tr("done"));
statusUpdate(tr("Validating Materials..."));
statusUpdate(tr("Validating materials"));
for (int row = 0; row < ui->listMaterialLibraries->count(); row++) {
auto item = ui->listMaterialLibraries->item(row);
if (item->checkState() == Qt::Checked) {
@@ -144,10 +144,10 @@ void DlgMigrateExternal::migrate()
}
catch (const Base::Exception& e) {
statusUpdate(QString::fromStdString(e.what()));
statusUpdate(tr("Unknown exception - Aborted"));
statusUpdate(tr("Unknown exception - aborted"));
}
catch (...) {
statusUpdate(tr("Unknown exception - Aborted"));
statusUpdate(tr("Unknown exception - aborted"));
}
}

View File

@@ -17,7 +17,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Select Material Libraries</string>
<string>Select material libraries</string>
</property>
</widget>
</item>
@@ -31,7 +31,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Select Model Libraries</string>
<string>Select model libraries</string>
</property>
</widget>
</item>

View File

@@ -262,7 +262,7 @@ class MaterialEditor:
if self.edited:
reply = QtGui.QMessageBox.question(self.widget, #FreeCADGui.getMainWindow(),
translate("Material","The document has been modified."),
translate("Material","Do you want to save your changes?"),
translate("Material","Save changes?"),
QtGui.QMessageBox.Save | QtGui.QMessageBox.Discard | QtGui.QMessageBox.Cancel,
QtGui.QMessageBox.Save)
@@ -330,7 +330,7 @@ class MaterialEditor:
if self.edited:
reply = QtGui.QMessageBox.question(self.widget, #FreeCADGui.getMainWindow(),
translate("Material","The document has been modified."),
translate("Material","Do you want to save your changes?"),
translate("Material","Save changes?"),
QtGui.QMessageBox.Save | QtGui.QMessageBox.Discard | QtGui.QMessageBox.Cancel,
QtGui.QMessageBox.Save)
@@ -586,7 +586,7 @@ class MaterialEditor:
self.card_path = directory
filetuple = QtGui.QFileDialog.getOpenFileName(
QtGui.QApplication.activeWindow(),
"Open FreeCAD Material file",
"Open FreeCAD material file",
self.card_path,
"*.FCMat"
)
@@ -664,7 +664,7 @@ class MaterialEditor:
name = "Material"
filetuple = QtGui.QFileDialog.getSaveFileName(
QtGui.QApplication.activeWindow(),
"Save FreeCAD Material file",
"Save FreeCAD material file",
self.save_directory + "/" + name + ".FCMat",
"*.FCMat"
)