Lupdate.
This commit is contained in:
parent
2bbd678c8d
commit
4b19565d4e
|
@ -23,7 +23,7 @@ Module {
|
||||||
property bool update: false
|
property bool update: false
|
||||||
|
|
||||||
// Build with legacy way though .pro file
|
// Build with legacy way though .pro file
|
||||||
property bool buildWithPro: true
|
property bool buildWithPro: false
|
||||||
|
|
||||||
property string lupdateName: "lupdate"
|
property string lupdateName: "lupdate"
|
||||||
|
|
||||||
|
@ -135,9 +135,13 @@ Module {
|
||||||
// It seems all we need are projectFile, sources and translations options.
|
// It seems all we need are projectFile, sources and translations options.
|
||||||
|
|
||||||
var sources = [];
|
var sources = [];
|
||||||
|
var includePaths = [];
|
||||||
if (inputs["i18n.hpp"] !== undefined)
|
if (inputs["i18n.hpp"] !== undefined)
|
||||||
for (var i = 0; i < inputs["i18n.hpp"].length; i++)
|
for (var i = 0; i < inputs["i18n.hpp"].length; i++) {
|
||||||
sources.push(inputs["i18n.hpp"][i].filePath);
|
sources.push(inputs["i18n.hpp"][i].filePath);
|
||||||
|
if (!includePaths.includes(FileInfo.path(inputs["i18n.hpp"][i].filePath)))
|
||||||
|
includePaths.push(FileInfo.path(inputs["i18n.hpp"][i].filePath));
|
||||||
|
}
|
||||||
|
|
||||||
if (inputs["i18n.src"] !== undefined)
|
if (inputs["i18n.src"] !== undefined)
|
||||||
for (var i = 0; i < inputs["i18n.src"].length; i++)
|
for (var i = 0; i < inputs["i18n.src"].length; i++)
|
||||||
|
@ -166,6 +170,7 @@ Module {
|
||||||
|
|
||||||
var project = {
|
var project = {
|
||||||
projectFile: "", // Looks like can be empty
|
projectFile: "", // Looks like can be empty
|
||||||
|
includePaths: includePaths.sort(),
|
||||||
sources: sources.sort(),
|
sources: sources.sort(),
|
||||||
translations: translations.sort()
|
translations: translations.sort()
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,10 +19,12 @@ wait
|
||||||
cp -r ./share/translations/* ../share/translations
|
cp -r ./share/translations/* ../share/translations
|
||||||
rm -r ./share
|
rm -r ./share
|
||||||
|
|
||||||
|
QMAKEPATH=$HOME/Qt6.6/6.6.0/gcc_64/bin/qmake
|
||||||
|
|
||||||
# Resolve any changes to config
|
# Resolve any changes to config
|
||||||
qbs resolve -d ../../build_translations modules.i18n.update:true moduleProviders.Qt.qmakeFilePaths:$HOME/Qt6.5/6.5.0/gcc_64/bin/qmake
|
qbs resolve -d ../../build_translations -f ../valentina.qbs modules.i18n.update:true moduleProviders.Qt.qmakeFilePaths:${QMAKEPATH}
|
||||||
# Update local strings
|
# Update local strings
|
||||||
qbs -d ../../build_translations -f ../valentina.qbs -p 'Translations' modules.i18n.update:true moduleProviders.Qt.qmakeFilePaths:$HOME/Qt6.6/6.6.0/gcc_64/bin/qmake
|
qbs -d ../../build_translations -f ../valentina.qbs -p 'Translations' modules.i18n.update:true moduleProviders.Qt.qmakeFilePaths:${QMAKEPATH}
|
||||||
|
|
||||||
end=$(date +%s)
|
end=$(date +%s)
|
||||||
runtime=$(python3 -c "print('Time passed %u:%02u seconds' % ((${end} - ${start})/60, (${end} - ${start})%60))")
|
runtime=$(python3 -c "print('Time passed %u:%02u seconds' % ((${end} - ${start})/60, (${end} - ${start})%60))")
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -163,15 +163,16 @@ QString DialogKnownMeasurementsCSVColumns::ColumnHeader(int column) const
|
||||||
switch (individualColumn)
|
switch (individualColumn)
|
||||||
{
|
{
|
||||||
case KnownMeasurementsColumns::Name:
|
case KnownMeasurementsColumns::Name:
|
||||||
return tr("Name", "measurement column");
|
return QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "Name", "measurement column");
|
||||||
case KnownMeasurementsColumns::Group:
|
case KnownMeasurementsColumns::Group:
|
||||||
return tr("Group", "measurement column");
|
return QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "Group", "measurement column");
|
||||||
case KnownMeasurementsColumns::FullName:
|
case KnownMeasurementsColumns::FullName:
|
||||||
return tr("Full name", "measurement column");
|
return QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "Full name", "measurement column");
|
||||||
case KnownMeasurementsColumns::Formula:
|
case KnownMeasurementsColumns::Formula:
|
||||||
return tr("Formula", "measurement column");
|
return QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "Formula", "measurement column");
|
||||||
case KnownMeasurementsColumns::Description:
|
case KnownMeasurementsColumns::Description:
|
||||||
return tr("Description", "measurement column");
|
return QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "Description",
|
||||||
|
"measurement column");
|
||||||
default:
|
default:
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
@ -284,7 +285,7 @@ void DialogKnownMeasurementsCSVColumns::InitColumnsControls()
|
||||||
|
|
||||||
if (not ColumnMandatory(column))
|
if (not ColumnMandatory(column))
|
||||||
{
|
{
|
||||||
control->addItem(tr("Skip"), -1);
|
control->addItem(QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "Skip"), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
control->setCurrentIndex(-1);
|
control->setCurrentIndex(-1);
|
||||||
|
@ -444,7 +445,7 @@ void DialogKnownMeasurementsCSVColumns::ShowImportPreview()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogKnownMeasurementsCSVColumns::RetranslateLabels()
|
void DialogKnownMeasurementsCSVColumns::RetranslateLabels()
|
||||||
{
|
{
|
||||||
ui->labelName->setText(tr("Name") + "*:"_L1);
|
ui->labelName->setText(QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "Name") + "*:"_L1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -482,7 +483,8 @@ void DialogKnownMeasurementsCSVColumns::CheckStatus()
|
||||||
if (m_fileName.isEmpty())
|
if (m_fileName.isEmpty())
|
||||||
{
|
{
|
||||||
SetStatus(false);
|
SetStatus(false);
|
||||||
ui->labelStatus->setText(tr("File path is empty"));
|
ui->labelStatus->setText(
|
||||||
|
QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "File path is empty"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,7 +494,8 @@ void DialogKnownMeasurementsCSVColumns::CheckStatus()
|
||||||
if (columns < MinimumColumns())
|
if (columns < MinimumColumns())
|
||||||
{
|
{
|
||||||
SetStatus(false);
|
SetStatus(false);
|
||||||
ui->labelStatus->setText(tr("Not enough columns"));
|
ui->labelStatus->setText(
|
||||||
|
QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "Not enough columns"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -500,19 +503,21 @@ void DialogKnownMeasurementsCSVColumns::CheckStatus()
|
||||||
if (rows < 1)
|
if (rows < 1)
|
||||||
{
|
{
|
||||||
SetStatus(false);
|
SetStatus(false);
|
||||||
ui->labelStatus->setText(tr("Not enough data to import"));
|
ui->labelStatus->setText(
|
||||||
|
QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "Not enough data to import"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (not ColumnsValid())
|
if (not ColumnsValid())
|
||||||
{
|
{
|
||||||
SetStatus(false);
|
SetStatus(false);
|
||||||
ui->labelStatus->setText(tr("Please, select unique number for each column"));
|
ui->labelStatus->setText(QCoreApplication::translate("DialogKnownMeasurementsCSVColumns",
|
||||||
|
"Please, select unique number for each column"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetStatus(true);
|
SetStatus(true);
|
||||||
ui->labelStatus->setText(tr("Ready"));
|
ui->labelStatus->setText(QCoreApplication::translate("DialogKnownMeasurementsCSVColumns", "Ready"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -240,13 +240,13 @@ auto DialogMeasurementsCSVColumns::ColumnHeader(int column) const -> QString
|
||||||
switch (individualColumn)
|
switch (individualColumn)
|
||||||
{
|
{
|
||||||
case IndividualMeasurementsColumns::Name:
|
case IndividualMeasurementsColumns::Name:
|
||||||
return tr("Name", "measurement column");
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Name", "measurement column");
|
||||||
case IndividualMeasurementsColumns::Value:
|
case IndividualMeasurementsColumns::Value:
|
||||||
return tr("Value", "measurement column");
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Value", "measurement column");
|
||||||
case IndividualMeasurementsColumns::FullName:
|
case IndividualMeasurementsColumns::FullName:
|
||||||
return tr("Full name", "measurement column");
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Full name", "measurement column");
|
||||||
case IndividualMeasurementsColumns::Description:
|
case IndividualMeasurementsColumns::Description:
|
||||||
return tr("Description", "measurement column");
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Description", "measurement column");
|
||||||
default:
|
default:
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
@ -258,14 +258,15 @@ auto DialogMeasurementsCSVColumns::ColumnHeader(int column) const -> QString
|
||||||
switch (multisizeColumn)
|
switch (multisizeColumn)
|
||||||
{
|
{
|
||||||
case MultisizeMeasurementsColumns::Name:
|
case MultisizeMeasurementsColumns::Name:
|
||||||
return tr("Name", "measurement column");
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Name", "measurement column");
|
||||||
case MultisizeMeasurementsColumns::BaseValue:
|
case MultisizeMeasurementsColumns::BaseValue:
|
||||||
return tr("Base value", "measurement column");
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Base value", "measurement column");
|
||||||
case MultisizeMeasurementsColumns::ShiftA:
|
case MultisizeMeasurementsColumns::ShiftA:
|
||||||
if (not m_dimensions.empty())
|
if (not m_dimensions.empty())
|
||||||
{
|
{
|
||||||
MeasurementDimension_p dimension = m_dimensions.at(0);
|
MeasurementDimension_p dimension = m_dimensions.at(0);
|
||||||
return tr("Shift", "measurement column") + suffix.arg(dimension->Name());
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Shift", "measurement column") +
|
||||||
|
suffix.arg(dimension->Name());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -275,7 +276,8 @@ auto DialogMeasurementsCSVColumns::ColumnHeader(int column) const -> QString
|
||||||
if (m_dimensions.size() > 1)
|
if (m_dimensions.size() > 1)
|
||||||
{
|
{
|
||||||
MeasurementDimension_p dimension = m_dimensions.at(1);
|
MeasurementDimension_p dimension = m_dimensions.at(1);
|
||||||
return tr("Shift", "measurement column") + suffix.arg(dimension->Name());
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Shift", "measurement column") +
|
||||||
|
suffix.arg(dimension->Name());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -285,16 +287,17 @@ auto DialogMeasurementsCSVColumns::ColumnHeader(int column) const -> QString
|
||||||
if (m_dimensions.size() > 2)
|
if (m_dimensions.size() > 2)
|
||||||
{
|
{
|
||||||
MeasurementDimension_p dimension = m_dimensions.at(2);
|
MeasurementDimension_p dimension = m_dimensions.at(2);
|
||||||
return tr("Shift", "measurement column") + suffix.arg(dimension->Name());
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Shift", "measurement column") +
|
||||||
|
suffix.arg(dimension->Name());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return QStringLiteral("Shift C");
|
return QStringLiteral("Shift C");
|
||||||
}
|
}
|
||||||
case MultisizeMeasurementsColumns::FullName:
|
case MultisizeMeasurementsColumns::FullName:
|
||||||
return tr("Full name", "measurement column");
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Full name", "measurement column");
|
||||||
case MultisizeMeasurementsColumns::Description:
|
case MultisizeMeasurementsColumns::Description:
|
||||||
return tr("Description", "measurement column");
|
return QCoreApplication::translate("DialogMeasurementsCSVColumns", "Description", "measurement column");
|
||||||
default:
|
default:
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
@ -504,7 +507,7 @@ void DialogMeasurementsCSVColumns::InitColumnsControls()
|
||||||
|
|
||||||
if (not ColumnMandatory(column))
|
if (not ColumnMandatory(column))
|
||||||
{
|
{
|
||||||
control->addItem(tr("Skip"), -1);
|
control->addItem(QCoreApplication::translate("DialogMeasurementsCSVColumns", "Skip"), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
control->setCurrentIndex(-1);
|
control->setCurrentIndex(-1);
|
||||||
|
@ -730,34 +733,43 @@ void DialogMeasurementsCSVColumns::HackColumnControls()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogMeasurementsCSVColumns::RetranslateLabels()
|
void DialogMeasurementsCSVColumns::RetranslateLabels()
|
||||||
{
|
{
|
||||||
ui->labelName->setText(tr("Name", "measurement column") + "*:"_L1);
|
ui->labelName->setText(QCoreApplication::translate("DialogMeasurementsCSVColumns", "Name", "measurement column") +
|
||||||
|
"*:"_L1);
|
||||||
|
|
||||||
if (m_type == MeasurementsType::Individual)
|
if (m_type == MeasurementsType::Individual)
|
||||||
{
|
{
|
||||||
ui->labelValue->setText(tr("Value", "measurement column") + "*:"_L1);
|
ui->labelValue->setText(
|
||||||
|
QCoreApplication::translate("DialogMeasurementsCSVColumns", "Value", "measurement column") + "*:"_L1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->labelValue->setText(tr("Base value", "measurement column") + "*:"_L1);
|
ui->labelValue->setText(
|
||||||
|
QCoreApplication::translate("DialogMeasurementsCSVColumns", "Base value", "measurement column") + "*:"_L1);
|
||||||
|
|
||||||
const QString suffix = QStringLiteral(" (%1)");
|
const QString suffix = QStringLiteral(" (%1)");
|
||||||
|
|
||||||
if (not m_dimensions.empty())
|
if (not m_dimensions.empty())
|
||||||
{
|
{
|
||||||
MeasurementDimension_p dimension = m_dimensions.at(0);
|
MeasurementDimension_p dimension = m_dimensions.at(0);
|
||||||
ui->labelShiftA->setText(tr("Shift", "measurement column") + suffix.arg(dimension->Name()));
|
ui->labelShiftA->setText(
|
||||||
|
QCoreApplication::translate("DialogMeasurementsCSVColumns", "Shift", "measurement column") +
|
||||||
|
suffix.arg(dimension->Name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_dimensions.size() > 1)
|
if (m_dimensions.size() > 1)
|
||||||
{
|
{
|
||||||
MeasurementDimension_p dimension = m_dimensions.at(1);
|
MeasurementDimension_p dimension = m_dimensions.at(1);
|
||||||
ui->labelShiftB->setText(tr("Shift", "measurement column") + suffix.arg(dimension->Name()));
|
ui->labelShiftB->setText(
|
||||||
|
QCoreApplication::translate("DialogMeasurementsCSVColumns", "Shift", "measurement column") +
|
||||||
|
suffix.arg(dimension->Name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_dimensions.size() > 2)
|
if (m_dimensions.size() > 2)
|
||||||
{
|
{
|
||||||
MeasurementDimension_p dimension = m_dimensions.at(2);
|
MeasurementDimension_p dimension = m_dimensions.at(2);
|
||||||
ui->labelShiftC->setText(tr("Shift", "measurement column") + suffix.arg(dimension->Name()));
|
ui->labelShiftC->setText(
|
||||||
|
QCoreApplication::translate("DialogMeasurementsCSVColumns", "Shift", "measurement column") +
|
||||||
|
suffix.arg(dimension->Name()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -822,7 +834,7 @@ void DialogMeasurementsCSVColumns::CheckStatus()
|
||||||
if (m_fileName.isEmpty())
|
if (m_fileName.isEmpty())
|
||||||
{
|
{
|
||||||
SetStatus(false);
|
SetStatus(false);
|
||||||
ui->labelStatus->setText(tr("File path is empty"));
|
ui->labelStatus->setText(QCoreApplication::translate("DialogMeasurementsCSVColumns", "File path is empty"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -832,7 +844,7 @@ void DialogMeasurementsCSVColumns::CheckStatus()
|
||||||
if (columns < MinimumColumns())
|
if (columns < MinimumColumns())
|
||||||
{
|
{
|
||||||
SetStatus(false);
|
SetStatus(false);
|
||||||
ui->labelStatus->setText(tr("Not enough columns"));
|
ui->labelStatus->setText(QCoreApplication::translate("DialogMeasurementsCSVColumns", "Not enough columns"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -840,19 +852,21 @@ void DialogMeasurementsCSVColumns::CheckStatus()
|
||||||
if (rows < 1)
|
if (rows < 1)
|
||||||
{
|
{
|
||||||
SetStatus(false);
|
SetStatus(false);
|
||||||
ui->labelStatus->setText(tr("Not enough data to import"));
|
ui->labelStatus->setText(
|
||||||
|
QCoreApplication::translate("DialogMeasurementsCSVColumns", "Not enough data to import"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (not ColumnsValid())
|
if (not ColumnsValid())
|
||||||
{
|
{
|
||||||
SetStatus(false);
|
SetStatus(false);
|
||||||
ui->labelStatus->setText(tr("Please, select unique number for each column"));
|
ui->labelStatus->setText(QCoreApplication::translate("DialogMeasurementsCSVColumns",
|
||||||
|
"Please, select unique number for each column"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetStatus(true);
|
SetStatus(true);
|
||||||
ui->labelStatus->setText(tr("Ready"));
|
ui->labelStatus->setText(QCoreApplication::translate("DialogMeasurementsCSVColumns", "Ready"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -127,7 +127,7 @@ TKMMainWindow::TKMMainWindow(QWidget *parent)
|
||||||
ReadSettings();
|
ReadSettings();
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
ui->pushButtonShowInExplorer->setText(tr("Show in Finder"));
|
ui->pushButtonShowInExplorer->setText(QCoreApplication::translate("TKMMainWindow", "Show in Finder"));
|
||||||
#endif // defined(Q_OS_MAC)
|
#endif // defined(Q_OS_MAC)
|
||||||
|
|
||||||
if (MApplication::VApp()->IsAppInGUIMode())
|
if (MApplication::VApp()->IsAppInGUIMode())
|
||||||
|
|
|
@ -857,7 +857,7 @@ auto VAbstractPattern::ParseSANode(const QDomElement &domElement) -> VPieceNode
|
||||||
tool = Tool::NodeElArc;
|
tool = Tool::NodeElArc;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw VException(tr("Wrong tag name '%1'.").arg(t));
|
throw VException(QCoreApplication::translate("VAbstractPattern", "Wrong tag name '%1'.").arg(t));
|
||||||
}
|
}
|
||||||
VPieceNode node(id, tool, reverse);
|
VPieceNode node(id, tool, reverse);
|
||||||
node.SetFormulaSABefore(saBefore);
|
node.SetFormulaSABefore(saBefore);
|
||||||
|
@ -1597,7 +1597,7 @@ void VAbstractPattern::ToolExists(const quint32 &id)
|
||||||
{
|
{
|
||||||
if (tools.contains(id) == false)
|
if (tools.contains(id) == false)
|
||||||
{
|
{
|
||||||
throw VExceptionBadId(tr("Can't find tool in table."), id);
|
throw VExceptionBadId(QCoreApplication::translate("VAbstractPattern", "Can't find tool in table."), id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2447,7 +2447,7 @@ auto VAbstractPattern::GroupLinkedToTool(vidtype toolId) const -> vidtype
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VAbstractPattern::GetGroupName(quint32 id) -> QString
|
auto VAbstractPattern::GetGroupName(quint32 id) -> QString
|
||||||
{
|
{
|
||||||
QString name = tr("New group");
|
QString name = QCoreApplication::translate("VAbstractPattern", "New group");
|
||||||
QDomElement group = elementById(id, TagGroup);
|
QDomElement group = elementById(id, TagGroup);
|
||||||
if (group.isElement())
|
if (group.isElement())
|
||||||
{
|
{
|
||||||
|
|
|
@ -305,17 +305,19 @@ void VBoundary::InsertPassmark(const VBoundarySequenceItemData &item, QList<VBou
|
||||||
QString pieceName;
|
QString pieceName;
|
||||||
if (!m_pieceName.isEmpty())
|
if (!m_pieceName.isEmpty())
|
||||||
{
|
{
|
||||||
pieceName = tr("Piece '%1'.").arg(m_pieceName) + ' '_L1;
|
pieceName = QCoreApplication::translate("VBoundary", "Piece '%1'.").arg(m_pieceName) + ' '_L1;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString errorMsg;
|
QString errorMsg;
|
||||||
if (!passmark.label.isEmpty())
|
if (!passmark.label.isEmpty())
|
||||||
{
|
{
|
||||||
errorMsg = pieceName + tr("Unable to insert notch for point '%1'.").arg(passmark.label);
|
errorMsg =
|
||||||
|
pieceName +
|
||||||
|
QCoreApplication::translate("VBoundary", "Unable to insert notch for point '%1'.").arg(passmark.label);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorMsg = pieceName + tr("Unable to insert notch.");
|
errorMsg = pieceName + QCoreApplication::translate("VBoundary", "Unable to insert notch.");
|
||||||
}
|
}
|
||||||
|
|
||||||
VAbstractApplication::VApp()->IsPedantic()
|
VAbstractApplication::VApp()->IsPedantic()
|
||||||
|
|
|
@ -750,17 +750,19 @@ auto VPassmark::PassmarkIntersection(const QVector<QPointF> &path, QLineF line,
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString errorMsg = QObject::tr("Cannot calculate a notch for point '%1' in piece '%2'. Notch "
|
const QString errorMsg =
|
||||||
"collapse.")
|
QCoreApplication::translate("VPassmark", "Cannot calculate a notch for point '%1' in piece '%2'. Notch "
|
||||||
.arg(m_data.nodeName, m_data.pieceName);
|
"collapse.")
|
||||||
|
.arg(m_data.nodeName, m_data.pieceName);
|
||||||
VAbstractApplication::VApp()->IsPedantic()
|
VAbstractApplication::VApp()->IsPedantic()
|
||||||
? throw VExceptionInvalidNotch(errorMsg)
|
? throw VExceptionInvalidNotch(errorMsg)
|
||||||
: qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
: qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const QString errorMsg = QObject::tr("Cannot calculate a notch for point '%1' in piece '%2'. Cannot find "
|
const QString errorMsg = QCoreApplication::translate(
|
||||||
"intersection.")
|
"VPassmark", "Cannot calculate a notch for point '%1' in piece '%2'. Cannot find "
|
||||||
|
"intersection.")
|
||||||
.arg(m_data.nodeName, m_data.pieceName);
|
.arg(m_data.nodeName, m_data.pieceName);
|
||||||
VAbstractApplication::VApp()->IsPedantic()
|
VAbstractApplication::VApp()->IsPedantic()
|
||||||
? throw VExceptionInvalidNotch(errorMsg)
|
? throw VExceptionInvalidNotch(errorMsg)
|
||||||
|
@ -937,9 +939,11 @@ auto VPassmark::BuiltInSAPassmarkBaseLine(const VPiece &piece) const -> QVector<
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const QString errorMsg = QObject::tr("Cannot calculate a notch for point '%1' in piece '%2' with built "
|
const QString errorMsg =
|
||||||
"in seam allowance. User must manually provide length.")
|
QCoreApplication::translate("VPassmark",
|
||||||
.arg(m_data.nodeName, m_data.pieceName);
|
"Cannot calculate a notch for point '%1' in piece '%2' with built "
|
||||||
|
"in seam allowance. User must manually provide length.")
|
||||||
|
.arg(m_data.nodeName, m_data.pieceName);
|
||||||
VAbstractApplication::VApp()->IsPedantic()
|
VAbstractApplication::VApp()->IsPedantic()
|
||||||
? throw VExceptionInvalidNotch(errorMsg)
|
? throw VExceptionInvalidNotch(errorMsg)
|
||||||
: qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
: qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
||||||
|
@ -992,9 +996,11 @@ auto VPassmark::SAPassmarkBaseLine(const QVector<QPointF> &seamAllowance, const
|
||||||
|
|
||||||
if (rotatedSeamAllowance.size() < 2)
|
if (rotatedSeamAllowance.size() < 2)
|
||||||
{
|
{
|
||||||
const QString errorMsg = QObject::tr("Cannot calculate a notch for point '%1' in piece '%2'. Seam allowance is "
|
const QString errorMsg =
|
||||||
"empty.")
|
QCoreApplication::translate("VPassmark",
|
||||||
.arg(m_data.nodeName, m_data.pieceName);
|
"Cannot calculate a notch for point '%1' in piece '%2'. Seam allowance is "
|
||||||
|
"empty.")
|
||||||
|
.arg(m_data.nodeName, m_data.pieceName);
|
||||||
VAbstractApplication::VApp()->IsPedantic()
|
VAbstractApplication::VApp()->IsPedantic()
|
||||||
? throw VExceptionInvalidNotch(errorMsg)
|
? throw VExceptionInvalidNotch(errorMsg)
|
||||||
: qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
: qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
||||||
|
@ -1005,8 +1011,9 @@ auto VPassmark::SAPassmarkBaseLine(const QVector<QPointF> &seamAllowance, const
|
||||||
const PassmarkStatus seamPassmarkType = GetSeamPassmarkSAPoint(m_data, rotatedSeamAllowance, seamPassmarkSAPoint);
|
const PassmarkStatus seamPassmarkType = GetSeamPassmarkSAPoint(m_data, rotatedSeamAllowance, seamPassmarkSAPoint);
|
||||||
if (seamPassmarkType == PassmarkStatus::Error)
|
if (seamPassmarkType == PassmarkStatus::Error)
|
||||||
{
|
{
|
||||||
const QString errorMsg = QObject::tr("Cannot calculate a notch for point '%1' in piece '%2'. Cannot find "
|
const QString errorMsg = QCoreApplication::translate(
|
||||||
"position for a notch.")
|
"VPassmark", "Cannot calculate a notch for point '%1' in piece '%2'. Cannot find "
|
||||||
|
"position for a notch.")
|
||||||
.arg(m_data.nodeName, m_data.pieceName);
|
.arg(m_data.nodeName, m_data.pieceName);
|
||||||
VAbstractApplication::VApp()->IsPedantic()
|
VAbstractApplication::VApp()->IsPedantic()
|
||||||
? throw VExceptionInvalidNotch(errorMsg)
|
? throw VExceptionInvalidNotch(errorMsg)
|
||||||
|
@ -1021,9 +1028,11 @@ auto VPassmark::SAPassmarkBaseLine(const QVector<QPointF> &seamAllowance, const
|
||||||
|
|
||||||
if (not FixNotchPoint(path, m_data, &seamPassmarkSAPoint))
|
if (not FixNotchPoint(path, m_data, &seamPassmarkSAPoint))
|
||||||
{
|
{
|
||||||
const QString errorMsg = QObject::tr("Cannot calculate a notch for point '%1' in piece '%2'. Unable to fix a "
|
const QString errorMsg =
|
||||||
"notch position.")
|
QCoreApplication::translate("VPassmark",
|
||||||
.arg(m_data.nodeName, m_data.pieceName);
|
"Cannot calculate a notch for point '%1' in piece '%2'. Unable to fix a "
|
||||||
|
"notch position.")
|
||||||
|
.arg(m_data.nodeName, m_data.pieceName);
|
||||||
VAbstractApplication::VApp()->IsPedantic()
|
VAbstractApplication::VApp()->IsPedantic()
|
||||||
? throw VExceptionInvalidNotch(errorMsg)
|
? throw VExceptionInvalidNotch(errorMsg)
|
||||||
: qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
: qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
||||||
|
|
|
@ -186,8 +186,9 @@ void DialogPiecePath::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
|
|
||||||
if (p.CountNodes() == 1)
|
if (p.CountNodes() == 1)
|
||||||
{
|
{
|
||||||
emit ToolTip(tr("Select main path objects, <b>%1</b> - reverse direction curve, "
|
emit ToolTip(QCoreApplication::translate(
|
||||||
"<b>%2</b> - finish creation")
|
"DialogPiecePath", "Select main path objects, <b>%1</b> - reverse direction curve, "
|
||||||
|
"<b>%2</b> - finish creation")
|
||||||
.arg(VModifierKey::Shift(), VModifierKey::EnterKey()));
|
.arg(VModifierKey::Shift(), VModifierKey::EnterKey()));
|
||||||
|
|
||||||
if (not VAbstractValApplication::VApp()->getCurrentScene()->items().contains(visPath))
|
if (not VAbstractValApplication::VApp()->getCurrentScene()->items().contains(visPath))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user