From 688859b12099aaaf466b1ca765f5c7448ca2456d Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Fri, 23 Oct 2026 14:17:52 -0700 Subject: [PATCH] Localize numeric displays and HTML export labels Format UI measurements, snap angles, ladder increments, edge-color values, Preferences labels, counts, and step/page labels using the widget locale without grouping. Preserve numeric table sorting with stored count values and trim localized zero digits correctly. Give float/double formatting and float parsing explicit helper names. Mark HTML export titles, navigation, alternate text, and credits for translation, escape translated text, and declare UTF-8 output. Keep numbers in HTML, piece-list images, and print/PDF output in ASCII. Include the pending command-status translation drafts in all eight language catalogs, preserving their unfinished review status. Validation: macOS Qt debug build, display and count-sorting checks across ten locales, all three HTML layouts with test translations under an Arabic numeric locale, and ASCII print/image checks. All eight catalogs pass XML, changed-placeholder, and lrelease validation. --- common/lc_arraydialog.cpp | 38 +++++++++--------- common/lc_doublespinbox.cpp | 2 +- common/lc_edgecolordialog.cpp | 4 +- common/lc_instructionsdialog.cpp | 7 ++-- common/lc_ladderwidget.cpp | 3 +- common/lc_mainwindow.cpp | 9 ++++- common/lc_mainwindow.h | 5 +-- common/lc_setsdatabasedialog.cpp | 2 +- common/project.cpp | 52 ++++++++++++++---------- qt/lc_qpreferencesdialog.cpp | 4 +- qt/lc_qpropertiesdialog.cpp | 24 ++++++----- qt/lc_qutils.cpp | 15 ++++--- qt/lc_qutils.h | 5 ++- resources/leocad_cs.ts | 61 ++++++++++++++++++++++------ resources/leocad_de.ts | 69 ++++++++++++++++++++++++-------- resources/leocad_es.ts | 69 ++++++++++++++++++++++++-------- resources/leocad_fr.ts | 69 ++++++++++++++++++++++++-------- resources/leocad_pt.ts | 69 ++++++++++++++++++++++++-------- resources/leocad_ru.ts | 61 ++++++++++++++++++++++------ resources/leocad_uk.ts | 65 +++++++++++++++++++++++------- resources/leocad_zh_CN.ts | 69 ++++++++++++++++++++++++-------- 21 files changed, 503 insertions(+), 199 deletions(-) diff --git a/common/lc_arraydialog.cpp b/common/lc_arraydialog.cpp index 0b6ba199..e0218a8d 100644 --- a/common/lc_arraydialog.cpp +++ b/common/lc_arraydialog.cpp @@ -37,24 +37,24 @@ lcArrayDialog::lcArrayDialog(QWidget* Parent) ui->count1->setValue(mCounts[0]); ui->count2->setValue(mCounts[1]); ui->count3->setValue(mCounts[2]); - ui->offset1x->setText(lcFormatValueLocalized(mOffsets[0].x)); - ui->offset1y->setText(lcFormatValueLocalized(mOffsets[0].y)); - ui->offset1z->setText(lcFormatValueLocalized(mOffsets[0].z)); - ui->offset2x->setText(lcFormatValueLocalized(mOffsets[1].x)); - ui->offset2y->setText(lcFormatValueLocalized(mOffsets[1].y)); - ui->offset2z->setText(lcFormatValueLocalized(mOffsets[1].z)); - ui->offset3x->setText(lcFormatValueLocalized(mOffsets[2].x)); - ui->offset3y->setText(lcFormatValueLocalized(mOffsets[2].y)); - ui->offset3z->setText(lcFormatValueLocalized(mOffsets[2].z)); - ui->rotation1x->setText(lcFormatValueLocalized(mRotations[0].x)); - ui->rotation1y->setText(lcFormatValueLocalized(mRotations[0].y)); - ui->rotation1z->setText(lcFormatValueLocalized(mRotations[0].z)); - ui->rotation2x->setText(lcFormatValueLocalized(mRotations[1].x)); - ui->rotation2y->setText(lcFormatValueLocalized(mRotations[1].y)); - ui->rotation2z->setText(lcFormatValueLocalized(mRotations[1].z)); - ui->rotation3x->setText(lcFormatValueLocalized(mRotations[2].x)); - ui->rotation3y->setText(lcFormatValueLocalized(mRotations[2].y)); - ui->rotation3z->setText(lcFormatValueLocalized(mRotations[2].z)); + ui->offset1x->setText(lcFormatFloatLocalized(mOffsets[0].x, locale())); + ui->offset1y->setText(lcFormatFloatLocalized(mOffsets[0].y, locale())); + ui->offset1z->setText(lcFormatFloatLocalized(mOffsets[0].z, locale())); + ui->offset2x->setText(lcFormatFloatLocalized(mOffsets[1].x, locale())); + ui->offset2y->setText(lcFormatFloatLocalized(mOffsets[1].y, locale())); + ui->offset2z->setText(lcFormatFloatLocalized(mOffsets[1].z, locale())); + ui->offset3x->setText(lcFormatFloatLocalized(mOffsets[2].x, locale())); + ui->offset3y->setText(lcFormatFloatLocalized(mOffsets[2].y, locale())); + ui->offset3z->setText(lcFormatFloatLocalized(mOffsets[2].z, locale())); + ui->rotation1x->setText(lcFormatFloatLocalized(mRotations[0].x, locale())); + ui->rotation1y->setText(lcFormatFloatLocalized(mRotations[0].y, locale())); + ui->rotation1z->setText(lcFormatFloatLocalized(mRotations[0].z, locale())); + ui->rotation2x->setText(lcFormatFloatLocalized(mRotations[1].x, locale())); + ui->rotation2y->setText(lcFormatFloatLocalized(mRotations[1].y, locale())); + ui->rotation2z->setText(lcFormatFloatLocalized(mRotations[1].z, locale())); + ui->rotation3x->setText(lcFormatFloatLocalized(mRotations[2].x, locale())); + ui->rotation3y->setText(lcFormatFloatLocalized(mRotations[2].y, locale())); + ui->rotation3z->setText(lcFormatFloatLocalized(mRotations[2].z, locale())); } lcArrayDialog::~lcArrayDialog() @@ -96,7 +96,7 @@ void lcArrayDialog::accept() for (int Axis = 0; Axis < 3; Axis++) { QLineEdit* Edit = Edits[Type][Dimension][Axis]; - const std::optional Value = lcParseFloatValueLocalized(Edit->text(), Edit->validator()->locale()); + const std::optional Value = lcParseFloatLocalized(Edit->text(), Edit->validator()->locale()); if (!Value || !Edit->hasAcceptableInput()) { diff --git a/common/lc_doublespinbox.cpp b/common/lc_doublespinbox.cpp index 391d16c6..17562c2a 100644 --- a/common/lc_doublespinbox.cpp +++ b/common/lc_doublespinbox.cpp @@ -66,7 +66,7 @@ void lcDoubleSpinBox::LadderWidgetCanceled() QString lcDoubleSpinBox::textFromValue(double Value) const { - return lcFormatValueLocalized(Value); + return lcFormatFloatLocalized(Value, locale()); } void lcDoubleSpinBox::ValueChanged() diff --git a/common/lc_edgecolordialog.cpp b/common/lc_edgecolordialog.cpp index 03f1560d..66e4d6ca 100644 --- a/common/lc_edgecolordialog.cpp +++ b/common/lc_edgecolordialog.cpp @@ -239,12 +239,12 @@ void lcAutomateEdgeColorDialog::SliderValueChanged(int Value) if (sender() == PartEdgeContrastSlider) { mPartEdgeContrast = Value * 0.01f; - PartEdgeContrast->setText(QString::number(mPartEdgeContrast, 'f', 2)); + PartEdgeContrast->setText(lcFormatDoubleLocalized(mPartEdgeContrast, locale(), 'f', 2)); } else if (sender() == PartColorValueLDIndexSlider) { mPartColorValueLDIndex = Value * 0.01f; - PartColorValueLDIndex->setText(QString::number(mPartColorValueLDIndex, 'f', 2)); + PartColorValueLDIndex->setText(lcFormatDoubleLocalized(mPartColorValueLDIndex, locale(), 'f', 2)); } } diff --git a/common/lc_instructionsdialog.cpp b/common/lc_instructionsdialog.cpp index de9cb9ef..9f028c63 100644 --- a/common/lc_instructionsdialog.cpp +++ b/common/lc_instructionsdialog.cpp @@ -5,6 +5,7 @@ #include "lc_model.h" #include "lc_view.h" #include "lc_collapsiblewidget.h" +#include "lc_qutils.h" lcInstructionsStepImageItem::lcInstructionsStepImageItem(QGraphicsItem* Parent, lcInstructions* Instructions, lcModel* Model, lcStep Step) : QGraphicsPixmapItem(Parent), mInstructions(Instructions), mModel(Model), mStep(Step) @@ -419,7 +420,7 @@ void lcInstructionsPropertiesWidget::AddFontProperty(lcInstructionsPropertyType auto UpdateButton = [this, Type, FontButton]() { QFont Font = mInstructions->GetFontProperty(Type, mModel, mStep); - QString FontName = QString("%1 %2").arg(Font.family(), QString::number(Font.pointSize())); + QString FontName = QString("%1 %2").arg(Font.family(), lcFormatIntegerLocalized(Font.pointSize(), locale())); FontButton->setText(FontName); }; @@ -581,7 +582,7 @@ lcInstructionsDialog::lcInstructionsDialog(QWidget* Parent, Project* Project) PageDirectionGroup->addAction(mHorizontalPageAction); for (size_t PageNumber = 0; PageNumber < mInstructions->mPages.size(); PageNumber++) - mPageListWidget->mThumbnailsWidget->addItem(QString(tr("Page %1")).arg(PageNumber + 1)); + mPageListWidget->mThumbnailsWidget->addItem(QString(tr("Page %1")).arg(lcFormatIntegerLocalized(PageNumber + 1, locale()))); connect(mPageListWidget->mThumbnailsWidget, &QListWidget::currentRowChanged, this, &lcInstructionsDialog::CurrentThumbnailChanged); mPageListWidget->mThumbnailsWidget->setCurrentRow(0); @@ -710,7 +711,7 @@ void lcInstructionsDialog::UpdatePageSettings() mPageListWidget->mThumbnailsWidget->clear(); for (size_t PageNumber = 0; PageNumber < mInstructions->mPages.size(); PageNumber++) - mPageListWidget->mThumbnailsWidget->addItem(tr("Page %1").arg(PageNumber + 1)); + mPageListWidget->mThumbnailsWidget->addItem(tr("Page %1").arg(lcFormatIntegerLocalized(PageNumber + 1, locale()))); // mThumbnailsWidget->setCurrentRow(0); diff --git a/common/lc_ladderwidget.cpp b/common/lc_ladderwidget.cpp index 9537e891..db594a30 100644 --- a/common/lc_ladderwidget.cpp +++ b/common/lc_ladderwidget.cpp @@ -1,6 +1,7 @@ #include "lc_global.h" #include "lc_ladderwidget.h" #include "lc_objectproperty.h" +#include "lc_qutils.h" lcLadderWidget::lcLadderWidget(QAbstractSpinBox* SpinBox, lcFloatPropertySnap Snap) : QWidget(SpinBox, Qt::Popup | Qt::Sheet), mSpinBox(SpinBox) @@ -168,7 +169,7 @@ void lcLadderWidget::paintEvent(QPaintEvent* Event) { QRect Rect(0, Step * CellHeight, CellWidth, CellHeight); QTextOption TextOption(Qt::AlignCenter); - QString Text = QString::number(mSteps[Step]); + QString Text = lcFormatDoubleLocalized(mSteps[Step], mSpinBox->locale(), 'g', 6); if (Step == mCurrentStep && mSpinBox) Text = QString("%1\n\n(%2)").arg(Text, mSpinBox->text()); diff --git a/common/lc_mainwindow.cpp b/common/lc_mainwindow.cpp index 0916a41c..bea8b6a4 100644 --- a/common/lc_mainwindow.cpp +++ b/common/lc_mainwindow.cpp @@ -2010,6 +2010,11 @@ void lcMainWindow::SetAngleSnapEnabled(bool Enabled) UpdateSnap(); } +QString lcMainWindow::GetAngleSnapText() const +{ + return mAngleSnapEnabled ? lcFormatDoubleLocalized(GetAngleSnap(), locale(), 'g', 6) : tr("None"); +} + void lcMainWindow::SetMoveXYSnapIndex(int Index) { mMoveXYSnapIndex = Index; @@ -2089,7 +2094,7 @@ std::optional lcMainWindow::GetTransformAmount() continue; } - const std::optional Value = lcParseFloatValueLocalized(Text, Edit->locale()); + const std::optional Value = lcParseFloatLocalized(Text, Edit->locale()); if (!Value) { @@ -2414,7 +2419,7 @@ void lcMainWindow::UpdateCurrentStep() mActions[LC_VIEW_TIME_NEXT]->setEnabled(CurrentStep < LC_STEP_MAX); mActions[LC_VIEW_TIME_LAST]->setEnabled(CurrentStep != LastStep); - mStatusTimeLabel->setText(QString(tr("Step %1")).arg(QString::number(CurrentStep))); + mStatusTimeLabel->setText(QString(tr("Step %1")).arg(lcFormatIntegerLocalized(CurrentStep, locale()))); } void lcMainWindow::SetAddKeys(bool AddKeys) diff --git a/common/lc_mainwindow.h b/common/lc_mainwindow.h index b3bca34b..10f90126 100644 --- a/common/lc_mainwindow.h +++ b/common/lc_mainwindow.h @@ -121,10 +121,7 @@ public: return mMoveSnapEnabled ? SnapZText[mMoveZSnapIndex] : tr("None"); } - QString GetAngleSnapText() const - { - return mAngleSnapEnabled ? QString::number(GetAngleSnap()) : tr("None"); - } + QString GetAngleSnapText() const; bool GetRelativeTransform() const { diff --git a/common/lc_setsdatabasedialog.cpp b/common/lc_setsdatabasedialog.cpp index f08662e0..9775b23e 100644 --- a/common/lc_setsdatabasedialog.cpp +++ b/common/lc_setsdatabasedialog.cpp @@ -238,7 +238,7 @@ void lcSetsDatabaseDialog::DownloadFinished(lcHttpReply* Reply) SetInfo << SetObject["set_num"].toString(); SetInfo << SetObject["name"].toString(); SetInfo << QString::number(SetObject["year"].toInt()); - SetInfo << QString::number(SetObject["num_parts"].toInt()); + SetInfo << lcFormatIntegerLocalized(SetObject["num_parts"].toInt(), locale()); new QTreeWidgetItem(ui->SetsTree, SetInfo); } diff --git a/common/project.cpp b/common/project.cpp index 37ad93fc..02d31d89 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -3087,6 +3087,16 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) return lcResult(); }; + auto WriteHeader = [](QTextStream& Stream, const QString& Title) + { +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) + Stream.setCodec("UTF-8"); +#endif + Stream << QString::fromLatin1("\r\n\r\n\r\n%1\r\n\r\n
\r\n
\r\n").arg(Title.toHtmlEscaped()); + }; + + const QString CreatedBy = tr("Created by %1").toHtmlEscaped().arg(QLatin1String("LeoCAD")); + for (lcModel* Model : Models) { const QString& BaseName = ModelBaseNames.at(Model); @@ -3098,8 +3108,6 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) else PageTitle = ProjectTitle; - const QString EscapedPageTitle = PageTitle.toHtmlEscaped(); - if (Options.SinglePage) { QString FileName = QFileInfo(Dir, BaseName + QLatin1String(".html")).absoluteFilePath(); @@ -3110,12 +3118,12 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) QTextStream Stream(&File); - Stream << QString::fromLatin1("\r\n\r\nInstructions for %1\r\n\r\n
\r\n
\r\n").arg(EscapedPageTitle); + WriteHeader(Stream, tr("Instructions for %1").arg(PageTitle)); for (lcStep Step = 1; Step <= LastStep; Step++) { QString StepString = QString::fromLatin1("%1").arg(Step, 2, 10, QLatin1Char('0')); - Stream << QString::fromLatin1("

\"Step



\r\n").arg(BaseName.toHtmlEscaped(), StepString, StepString, QString::number(Options.StepImagesWidth), QString::number(Options.StepImagesHeight)); + Stream << QString::fromLatin1("

\"%3\"



\r\n").arg(BaseName.toHtmlEscaped(), StepString, tr("Step %1").arg(StepString).toHtmlEscaped(), QString::number(Options.StepImagesWidth), QString::number(Options.StepImagesHeight)); if (Options.PartsListStep) { @@ -3134,7 +3142,7 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) return PartsImageSaved; } - Stream << QLatin1String("
\r\n


Created by LeoCAD
\r\n"); + Stream << QString::fromLatin1("
\r\n


%1
\r\n").arg(CreatedBy); } else { @@ -3148,15 +3156,15 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) QTextStream Stream(&File); - Stream << QString::fromLatin1("\r\n\r\nInstructions for %1\r\n\r\n
\r\n
\r\n").arg(EscapedPageTitle); + WriteHeader(Stream, tr("Instructions for %1").arg(PageTitle)); for (lcStep Step = 1; Step <= LastStep; Step++) - Stream << QString::fromLatin1("Step %3
\r\n
").arg(BaseName, QString("%1").arg(Step, 2, 10, QLatin1Char('0')), QString::number(Step)); + Stream << QString::fromLatin1("%3
\r\n
").arg(BaseName, QString("%1").arg(Step, 2, 10, QLatin1Char('0')), tr("Step %1").arg(QString::number(Step)).toHtmlEscaped()); if (Options.PartsListEnd) - Stream << QString::fromLatin1("Pieces Used
\r\n").arg(BaseName); + Stream << QString::fromLatin1("%2
\r\n").arg(BaseName, tr("Pieces Used").toHtmlEscaped()); - Stream << QLatin1String("
\r\n


Created by LeoCAD
\r\n"); + Stream << QString::fromLatin1("\r\n


%1
\r\n").arg(CreatedBy); } for (lcStep Step = 1; Step <= LastStep; Step++) @@ -3170,8 +3178,8 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) QTextStream Stream(&File); - Stream << QString::fromLatin1("\r\n\r\n%1 - Step %2\r\n\r\n
\r\n
\r\n").arg(EscapedPageTitle, QString::number(Step)); - Stream << QString::fromLatin1("\"Step

\r\n").arg(BaseName.toHtmlEscaped(), StepString, StepString, QString::number(Options.StepImagesWidth), QString::number(Options.StepImagesHeight)); + WriteHeader(Stream, tr("%1 - Step %2").arg(PageTitle, QString::number(Step))); + Stream << QString::fromLatin1("\"%3\"

\r\n").arg(BaseName.toHtmlEscaped(), StepString, tr("Step %1").arg(StepString).toHtmlEscaped(), QString::number(Options.StepImagesWidth), QString::number(Options.StepImagesHeight)); if (Options.PartsListStep) { @@ -3183,15 +3191,15 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) Stream << QLatin1String("
\r\n


"); if (Step != 1) - Stream << QString::fromLatin1("Previous ").arg(BaseName, QString("%1").arg(Step - 1, 2, 10, QLatin1Char('0'))); + Stream << QString::fromLatin1("%3 ").arg(BaseName, QString("%1").arg(Step - 1, 2, 10, QLatin1Char('0')), tr("Previous").toHtmlEscaped()); if (Options.IndexPage) - Stream << QString::fromLatin1("Index ").arg(BaseName); + Stream << QString::fromLatin1("%2 ").arg(BaseName, tr("Index").toHtmlEscaped()); if (Step != LastStep) - Stream << QString::fromLatin1("Next").arg(BaseName, QString("%1").arg(Step + 1, 2, 10, QLatin1Char('0'))); + Stream << QString::fromLatin1("%3").arg(BaseName, QString("%1").arg(Step + 1, 2, 10, QLatin1Char('0')), tr("Next").toHtmlEscaped()); else if (Options.PartsListEnd) - Stream << QString::fromLatin1("Pieces Used").arg(BaseName); + Stream << QString::fromLatin1("%2").arg(BaseName, tr("Pieces Used").toHtmlEscaped()); Stream << QLatin1String("
\r\n"); } @@ -3206,7 +3214,7 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) QTextStream Stream(&File); - Stream << QString::fromLatin1("\r\n\r\nPieces used by %1\r\n\r\n
\r\n
\n").arg(EscapedPageTitle); + WriteHeader(Stream, tr("Pieces used by %1").arg(PageTitle)); const lcResult PartsImageSaved = AddPartsListImage(Stream, Model, 0, BaseName); @@ -3214,10 +3222,10 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) return PartsImageSaved; Stream << QLatin1String("
\r\n


"); - Stream << QString::fromLatin1("Previous ").arg(BaseName, QString("%1").arg(LastStep, 2, 10, QLatin1Char('0'))); + Stream << QString::fromLatin1("%3 ").arg(BaseName, QString("%1").arg(LastStep, 2, 10, QLatin1Char('0')), tr("Previous").toHtmlEscaped()); if (Options.IndexPage) - Stream << QString::fromLatin1("Index ").arg(BaseName); + Stream << QString::fromLatin1("%2 ").arg(BaseName, tr("Index").toHtmlEscaped()); Stream << QLatin1String("
\r\n"); } @@ -3240,7 +3248,7 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) QTextStream Stream(&File); - Stream << QString::fromLatin1("\r\n\r\nInstructions for %1\r\n\r\n
\r\n
\r\n").arg(ProjectTitle.toHtmlEscaped()); + WriteHeader(Stream, tr("Instructions for %1").arg(ProjectTitle)); for (const lcModel* Model : Models) { @@ -3263,14 +3271,14 @@ lcResult Project::ExportHTML(const lcHTMLExportOptions& Options) Stream << QString::fromLatin1("

%1

").arg(Model->GetProperties().mFileName.toHtmlEscaped()); for (lcStep Step = 1; Step <= LastStep; Step++) - Stream << QString::fromLatin1("Step %3
\r\n
").arg(BaseName, QString("%1").arg(Step, 2, 10, QLatin1Char('0')), QString::number(Step)); + Stream << QString::fromLatin1("%3
\r\n
").arg(BaseName, QString("%1").arg(Step, 2, 10, QLatin1Char('0')), tr("Step %1").arg(QString::number(Step)).toHtmlEscaped()); if (Options.PartsListEnd) - Stream << QString::fromLatin1("Pieces Used
\r\n").arg(BaseName); + Stream << QString::fromLatin1("%2
\r\n").arg(BaseName, tr("Pieces Used").toHtmlEscaped()); } } - Stream << QLatin1String("
\r\n


Created by LeoCAD
\r\n"); + Stream << QString::fromLatin1("\r\n


%1
\r\n").arg(CreatedBy); } return lcResult(); diff --git a/qt/lc_qpreferencesdialog.cpp b/qt/lc_qpreferencesdialog.cpp index 18300256..864df9a2 100644 --- a/qt/lc_qpreferencesdialog.cpp +++ b/qt/lc_qpreferencesdialog.cpp @@ -702,13 +702,13 @@ void lcPreferencesDialog::ConditionalLinesCheckBoxToggled() void lcPreferencesDialog::LineWidthSliderValueChanged() { float Value = mLineWidthRange[0] + static_cast(ui->LineWidthSlider->value()) * mLineWidthGranularity; - ui->LineWidthLabel->setText(QString::number(Value)); + ui->LineWidthLabel->setText(lcFormatDoubleLocalized(Value, locale(), 'g', 6)); } void lcPreferencesDialog::MeshLODSliderValueChanged() { float Value = ui->MeshLODSlider->value() * mMeshLODMultiplier; - ui->MeshLODLabel->setText(QString::number(static_cast(Value))); + ui->MeshLODLabel->setText(lcFormatIntegerLocalized(static_cast(Value), locale())); } void lcPreferencesDialog::FadeStepsToggled() diff --git a/qt/lc_qpropertiesdialog.cpp b/qt/lc_qpropertiesdialog.cpp index b7986b93..8f64e7a5 100644 --- a/qt/lc_qpropertiesdialog.cpp +++ b/qt/lc_qpropertiesdialog.cpp @@ -211,6 +211,12 @@ public: mLast = false; } + lcPartsTableWidgetItem(int Count, QLocale Locale) + : QTableWidgetItem(lcFormatIntegerLocalized(Count, Locale)), mLast(false) + { + setData(Qt::UserRole, Count); + } + bool operator<(const QTableWidgetItem& Other) const override { if (mLast) @@ -221,8 +227,8 @@ public: if (column() > 0) { - int Count = text().toInt(); - int OtherCount = Other.text().toInt(); + int Count = data(Qt::UserRole).toInt(); + int OtherCount = Other.data(Qt::UserRole).toInt(); return Count < OtherCount; } @@ -246,9 +252,9 @@ lcPropertiesDialog::lcPropertiesDialog(QWidget* Parent, lcPropertiesDialogOption const lcVector3 Dimensions = Options->BoundingBox.Max - Options->BoundingBox.Min; QString Format = tr("%1 x %2 x %3 cm\n%4 x %5 x %6 inches\n%7 x %8 x %9 LDU"); - QString Measurements = Format.arg(QString::number(Dimensions.x * 0.04, 'f', 2), QString::number(Dimensions.y * 0.04, 'f', 2), QString::number(Dimensions.z * 0.04, 'f', 2), - QString::number(Dimensions.x / 64.0, 'f', 2), QString::number(Dimensions.y / 64.0, 'f', 2), QString::number(Dimensions.z / 64.0, 'f', 2), - QString::number(Dimensions.x, 'f', 2), QString::number(Dimensions.y, 'f', 2), QString::number(Dimensions.z, 'f', 2)); + QString Measurements = Format.arg(lcFormatDoubleLocalized(Dimensions.x * 0.04, locale(), 'f', 2), lcFormatDoubleLocalized(Dimensions.y * 0.04, locale(), 'f', 2), lcFormatDoubleLocalized(Dimensions.z * 0.04, locale(), 'f', 2), + lcFormatDoubleLocalized(Dimensions.x / 64.0, locale(), 'f', 2), lcFormatDoubleLocalized(Dimensions.y / 64.0, locale(), 'f', 2), lcFormatDoubleLocalized(Dimensions.z / 64.0, locale(), 'f', 2), + lcFormatDoubleLocalized(Dimensions.x, locale(), 'f', 2), lcFormatDoubleLocalized(Dimensions.y, locale(), 'f', 2), lcFormatDoubleLocalized(Dimensions.z, locale(), 'f', 2)); ui->MeasurementsLabel->setText(Measurements); @@ -296,7 +302,7 @@ lcPropertiesDialog::lcPropertiesDialog(QWidget* Parent, lcPropertiesDialogOption int ColorIndex = ColorIt.first; int Count = ColorIt.second; - lcPartsTableWidgetItem* Item = new lcPartsTableWidgetItem(QString::number(Count)); + lcPartsTableWidgetItem* Item = new lcPartsTableWidgetItem(Count, locale()); Item->setTextAlignment(Qt::AlignCenter); PartsTable->setItem(Row, ColorColumns[ColorIndex] + 1, Item); @@ -318,20 +324,20 @@ lcPropertiesDialog::lcPropertiesDialog(QWidget* Parent, lcPropertiesDialogOption for (Row = 0; Row < (int)InfoTotals.size(); Row++) { - Item = new lcPartsTableWidgetItem(QString::number(InfoTotals[Row])); + Item = new lcPartsTableWidgetItem(InfoTotals[Row], locale()); Item->setTextAlignment(Qt::AlignCenter); PartsTable->setItem(Row, ColorCount + 1, Item); } for (int ColorIndex = 0; ColorIndex < ColorCount; ColorIndex++) { - Item = new lcPartsTableWidgetItem(QString::number(ColorTotals[ColorIndex])); + Item = new lcPartsTableWidgetItem(ColorTotals[ColorIndex], locale()); Item->mLast = true; Item->setTextAlignment(Qt::AlignCenter); PartsTable->setItem((int)InfoTotals.size(), ColorIndex + 1, Item); } - Item = new lcPartsTableWidgetItem(QString::number(Total)); + Item = new lcPartsTableWidgetItem(Total, locale()); Item->mLast = true; Item->setTextAlignment(Qt::AlignCenter); PartsTable->setItem((int)InfoTotals.size(), ColorCount + 1, Item); diff --git a/qt/lc_qutils.cpp b/qt/lc_qutils.cpp index 9c9b0b53..74eb242d 100644 --- a/qt/lc_qutils.cpp +++ b/qt/lc_qutils.cpp @@ -65,16 +65,15 @@ QString lcFormatValue(float Value, int Precision) return String; } -QString lcFormatValueLocalized(float Value) +QString lcFormatFloatLocalized(float Value, QLocale Locale) { - QLocale Locale = QLocale::system(); - Locale.setNumberOptions(QLocale::OmitGroupSeparator); + Locale.setNumberOptions(Locale.numberOptions() | QLocale::OmitGroupSeparator); QString DecimalPoint = Locale.decimalPoint(); QString String = Locale.toString(Value, 'f', 4); if (String.indexOf(DecimalPoint) != -1) { - while (String.endsWith('0')) + while (String.endsWith(Locale.zeroDigit())) String.chop(1); if (String.endsWith(DecimalPoint)) @@ -84,13 +83,19 @@ QString lcFormatValueLocalized(float Value) return String; } +QString lcFormatDoubleLocalized(double Value, QLocale Locale, char Format, int Precision) +{ + Locale.setNumberOptions(Locale.numberOptions() | QLocale::OmitGroupSeparator); + return Locale.toString(Value, Format, Precision); +} + QString lcFormatIntegerLocalized(qlonglong Value, QLocale Locale) { Locale.setNumberOptions(Locale.numberOptions() | QLocale::OmitGroupSeparator); return Locale.toString(Value); } -std::optional lcParseFloatValueLocalized(const QString& Value, QLocale Locale) +std::optional lcParseFloatLocalized(const QString& Value, QLocale Locale) { bool Ok; const float Number = Locale.toFloat(Value, &Ok); diff --git a/qt/lc_qutils.h b/qt/lc_qutils.h index 1ae9d65c..b98e6669 100644 --- a/qt/lc_qutils.h +++ b/qt/lc_qutils.h @@ -12,9 +12,10 @@ constexpr int LC_MAX_GRID_LINE_SPACING = 10000; constexpr int LC_MAX_AREA_LIGHT_GRID = 64; QString lcFormatValue(float Value, int Precision); -QString lcFormatValueLocalized(float Value); +QString lcFormatFloatLocalized(float Value, QLocale Locale); +QString lcFormatDoubleLocalized(double Value, QLocale Locale, char Format, int Precision); QString lcFormatIntegerLocalized(qlonglong Value, QLocale Locale); -std::optional lcParseFloatValueLocalized(const QString& Value, QLocale Locale); +std::optional lcParseFloatLocalized(const QString& Value, QLocale Locale); void lcSetupDialogHelp(QDialog* Dialog, QDialogButtonBox* ButtonBox); void lcSetupWidgetHelp(QWidget* Root, QDialogButtonBox* ButtonBox); diff --git a/resources/leocad_cs.ts b/resources/leocad_cs.ts index e3dceaab..053cf286 100644 --- a/resources/leocad_cs.ts +++ b/resources/leocad_cs.ts @@ -4970,9 +4970,8 @@ Formát souboru není rozpoznán. Vybrat všechny části modelu - De-select everything - Zrušte všechny výběry + Zrušte všechny výběry @@ -5071,6 +5070,12 @@ Formát souboru není rozpoznán. Machine-translated draft (Google Translate); requires human review. Vyměňte všechny dílky, které odpovídají kritériím vyhledávání + + + Deselect everything + AI-generated translation draft; requires human review. + Zrušit celý výběr + Move and rotate objects in absolute coordinates @@ -5102,9 +5107,8 @@ Formát souboru není rozpoznán. Samostatně přepínat otáčení vybraných dílků - Toggle snap axes - Přepnout osy přichycení + Přepnout osy přichycení @@ -5380,9 +5384,8 @@ Formát souboru není rozpoznán. Oddálit - Fit all pieces in the current view (hold the CTRL key down to zoom all views) - Přizpůsobit všechny dílky v aktuálním pohledu (stisknutím klávesy CTRL zvětšíte všechna zobrazení) + Přizpůsobit všechny dílky v aktuálním pohledu (stisknutím klávesy CTRL zvětšíte všechna zobrazení) @@ -5532,10 +5535,21 @@ Formát souboru není rozpoznán. Přidejte do modelu nová bodová světla - Add new omnidirectional light sources to the model Machine-translated draft (Google Translate); requires human review. - Přidejte do modelu nové všesměrové světelné zdroje + Přidejte do modelu nové všesměrové světelné zdroje + + + + Toggle movement snapping + AI-generated translation draft; requires human review. + Zapnout nebo vypnout přichytávání pohybu + + + + Add new directional light sources to the model + AI-generated translation draft; requires human review. + Přidat do modelu nové směrové světelné zdroje @@ -5543,6 +5557,12 @@ Formát souboru není rozpoznán. Machine-translated draft (Google Translate); requires human review. Přidejte do modelu nové plošné zdroje světla + + + Fit all pieces in the current view + AI-generated translation draft; requires human review. + Zobrazit všechny díly v aktuálním pohledu + @@ -5754,20 +5774,35 @@ Formát souboru není rozpoznán. - Rotate selected objects along the X axis - Otočit vybrané objekty podél osy X + Rotate selected objects around the X axis + AI-generated translation draft; requires human review. + Otočit vybrané objekty kolem osy X - Rotate selected objects along the Y axis - Otočit vybrané objekty podél osy Y + Rotate selected objects around the Y axis + AI-generated translation draft; requires human review. + Otočit vybrané objekty kolem osy Y + Rotate selected objects around the Z axis + AI-generated translation draft; requires human review. + Otočit vybrané objekty kolem osy Z + + + Rotate selected objects along the X axis + Otočit vybrané objekty podél osy X + + + Rotate selected objects along the Y axis + Otočit vybrané objekty podél osy Y + + Rotate selected objects along the Z axis - Otočit vybrané objekty podél osy Z + Otočit vybrané objekty podél osy Z diff --git a/resources/leocad_de.ts b/resources/leocad_de.ts index 44aa7c1b..61864c90 100644 --- a/resources/leocad_de.ts +++ b/resources/leocad_de.ts @@ -5103,9 +5103,8 @@ Dateiformat wird nicht erkannt. Nächstes Objekt finden - De-select everything - Auswahl aufheben + Auswahl aufheben @@ -5118,9 +5117,8 @@ Dateiformat wird nicht erkannt. Objekte per Namen auswählen - Toggle snap axes - Einrasten an Achsen umschalten + Einrasten an Achsen umschalten @@ -5132,6 +5130,18 @@ Dateiformat wird nicht erkannt. Do not snap movement along the XY plane Bewegung in der XY-Eben kontinuierlich + + + Deselect everything + AI-generated translation draft; requires human review. + Auswahl aufheben + + + + Toggle movement snapping + AI-generated translation draft; requires human review. + Bewegungsraster ein- oder ausschalten + Snap movement along the XY plane to 1/20 stud @@ -5549,9 +5559,8 @@ Dateiformat wird nicht erkannt. Verkleinern - Fit all pieces in the current view (hold the CTRL key down to zoom all views) - Ansicht für alle Teile anpassen + Ansicht für alle Teile anpassen @@ -5692,6 +5701,27 @@ Dateiformat wird nicht erkannt. Remove the selected control point Ausgewählten Steuerungspunkt entfernen + + + + Rotate selected objects around the X axis + AI-generated translation draft; requires human review. + Ausgewählte Objekte um die X-Achse drehen + + + + + Rotate selected objects around the Y axis + AI-generated translation draft; requires human review. + Ausgewählte Objekte um die Y-Achse drehen + + + + + Rotate selected objects around the Z axis + AI-generated translation draft; requires human review. + Ausgewählte Objekte um die Z-Achse drehen + Move the selected pieces to a new model and replace them with a reference to the model @@ -5873,10 +5903,15 @@ Dateiformat wird nicht erkannt. Fügen Sie dem Modell neue Scheinwerfer hinzu - Add new omnidirectional light sources to the model Machine-translated draft (Google Translate); requires human review. - Fügen Sie dem Modell neue omnidirektionale Lichtquellen hinzu + Fügen Sie dem Modell neue omnidirektionale Lichtquellen hinzu + + + + Add new directional light sources to the model + AI-generated translation draft; requires human review. + Neue gerichtete Lichtquellen zum Modell hinzufügen @@ -5884,6 +5919,12 @@ Dateiformat wird nicht erkannt. Machine-translated draft (Google Translate); requires human review. Fügen Sie dem Modell neue Flächenlichtquellen hinzu + + + Fit all pieces in the current view + AI-generated translation draft; requires human review. + Alle Teile in die aktuelle Ansicht einpassen + @@ -6093,22 +6134,16 @@ Dateiformat wird nicht erkannt. Ausgewählte Teile entlang der Z-Achse bewegen - - Rotate selected objects along the X axis - Ausgewählte Teile entlang der X-Achse drehen + Ausgewählte Teile entlang der X-Achse drehen - - Rotate selected objects along the Y axis - Ausgewählte Teile entlang der Y-Achse drehen + Ausgewählte Teile entlang der Y-Achse drehen - - Rotate selected objects along the Z axis - Ausgewählte Teile entlang der Z-Achse drehen + Ausgewählte Teile entlang der Z-Achse drehen diff --git a/resources/leocad_es.ts b/resources/leocad_es.ts index bd2b4bf8..5d53ffc6 100644 --- a/resources/leocad_es.ts +++ b/resources/leocad_es.ts @@ -4782,9 +4782,8 @@ Formato de archivo no reconocido. Buscar el siguiente objeto - De-select everything - Deseleccionar todo + Deseleccionar todo @@ -4797,9 +4796,8 @@ Formato de archivo no reconocido. Seleccionar objetos por nombre - Toggle snap axes - Alternar el ajuste a la rejilla para traslaciones + Alternar el ajuste a la rejilla para traslaciones @@ -4811,6 +4809,18 @@ Formato de archivo no reconocido. Do not snap movement along the XY plane No ajustar traslaciones en el plano XY + + + Deselect everything + AI-generated translation draft; requires human review. + Deseleccionar todo + + + + Toggle movement snapping + AI-generated translation draft; requires human review. + Activar o desactivar el ajuste del movimiento + Snap movement along the XY plane to 1/20 stud @@ -5222,9 +5232,8 @@ Formato de archivo no reconocido. Reducir - Fit all pieces in the current view (hold the CTRL key down to zoom all views) - Encajar todas las piezas en la vista actual (mantener pulsado Ctrl para ampliar todas las vistas) + Encajar todas las piezas en la vista actual (mantener pulsado Ctrl para ampliar todas las vistas) @@ -5365,6 +5374,27 @@ Formato de archivo no reconocido. Remove the selected control point Quitar la selección del punto de control + + + + Rotate selected objects around the X axis + AI-generated translation draft; requires human review. + Girar los objetos seleccionados alrededor del eje X + + + + + Rotate selected objects around the Y axis + AI-generated translation draft; requires human review. + Girar los objetos seleccionados alrededor del eje Y + + + + + Rotate selected objects around the Z axis + AI-generated translation draft; requires human review. + Girar los objetos seleccionados alrededor del eje Z + Open the model referenced by the selected piece in a new tab @@ -5539,10 +5569,15 @@ Formato de archivo no reconocido. Agregar nuevos focos al modelo. - Add new omnidirectional light sources to the model Machine-translated draft (Google Translate); requires human review. - Agregue nuevas fuentes de luz omnidireccionales al modelo. + Agregue nuevas fuentes de luz omnidireccionales al modelo. + + + + Add new directional light sources to the model + AI-generated translation draft; requires human review. + Añadir nuevas fuentes de luz direccional al modelo @@ -5550,6 +5585,12 @@ Formato de archivo no reconocido. Machine-translated draft (Google Translate); requires human review. Agregar nuevas fuentes de luz de área al modelo + + + Fit all pieces in the current view + AI-generated translation draft; requires human review. + Ajustar la vista actual para mostrar todas las piezas + @@ -5744,22 +5785,16 @@ Formato de archivo no reconocido. Mover los objetos seleccionados a lo largo del eje Z - - Rotate selected objects along the X axis - Rotar los objetos seleccionados a lo largo del eje X + Rotar los objetos seleccionados a lo largo del eje X - - Rotate selected objects along the Y axis - Rotar los objetos seleccionados a lo largo del eje Y + Rotar los objetos seleccionados a lo largo del eje Y - - Rotate selected objects along the Z axis - Rotar los objetos seleccionados a lo largo del eje Z + Rotar los objetos seleccionados a lo largo del eje Z diff --git a/resources/leocad_fr.ts b/resources/leocad_fr.ts index 6918eb67..4add8f2e 100644 --- a/resources/leocad_fr.ts +++ b/resources/leocad_fr.ts @@ -5137,9 +5137,8 @@ Le format du fichier n'est pas reconnu. Trouver l’objet suivant - De-select everything - Vider la sélection + Vider la sélection @@ -5152,9 +5151,8 @@ Le format du fichier n'est pas reconnu. Sélectionner des objets par leur nom - Toggle snap axes - Basculer l’usage de pas pour les déplacements + Basculer l’usage de pas pour les déplacements @@ -5387,6 +5385,12 @@ Le format du fichier n'est pas reconnu. Machine-translated draft (Google Translate); requires human review. Sélectionnez toutes les pièces du modèle + + + Deselect everything + AI-generated translation draft; requires human review. + Tout désélectionner + Select one piece at a time @@ -5447,6 +5451,12 @@ Le format du fichier n'est pas reconnu. Machine-translated draft (Google Translate); requires human review. Basculer la rotation des pièces sélectionnées séparément + + + Toggle movement snapping + AI-generated translation draft; requires human review. + Activer ou désactiver l’accrochage des déplacements + Snap rotations to 15 degrees @@ -5512,6 +5522,12 @@ Le format du fichier n'est pas reconnu. Add new pieces to the model Ajouter des nouvelles pièces au modèle + + + Add new directional light sources to the model + AI-generated translation draft; requires human review. + Ajouter de nouvelles sources de lumière directionnelle au modèle + Add new omni light sources to the model Ajouter des sources de lumière omnidirectionnelles au modèle @@ -5602,9 +5618,8 @@ Le format du fichier n'est pas reconnu. Dézoomer - Fit all pieces in the current view (hold the CTRL key down to zoom all views) - Zoomer pour voir toutes les pièces dans la vue courante (maintenir la touche Ctrl enfoncée pour zoomer toutes les vues) + Zoomer pour voir toutes les pièces dans la vue courante (maintenir la touche Ctrl enfoncée pour zoomer toutes les vues) @@ -5754,6 +5769,27 @@ Le format du fichier n'est pas reconnu. Machine-translated draft (Google Translate); requires human review. Supprimer le point de contrôle sélectionné + + + + Rotate selected objects around the X axis + AI-generated translation draft; requires human review. + Faire tourner les objets sélectionnés autour de l’axe X + + + + + Rotate selected objects around the Y axis + AI-generated translation draft; requires human review. + Faire tourner les objets sélectionnés autour de l’axe Y + + + + + Rotate selected objects around the Z axis + AI-generated translation draft; requires human review. + Faire tourner les objets sélectionnés autour de l’axe Z + Open the model referenced by the selected piece in a new tab @@ -5949,10 +5985,9 @@ Le format du fichier n'est pas reconnu. Ajouter de nouveaux spots au modèle - Add new omnidirectional light sources to the model Machine-translated draft (Google Translate); requires human review. - Ajouter de nouvelles sources de lumière omnidirectionnelles au modèle + Ajouter de nouvelles sources de lumière omnidirectionnelles au modèle @@ -5960,6 +5995,12 @@ Le format du fichier n'est pas reconnu. Machine-translated draft (Google Translate); requires human review. Ajouter de nouvelles sources lumineuses de zone au modèle + + + Fit all pieces in the current view + AI-generated translation draft; requires human review. + Ajuster la vue actuelle pour afficher toutes les pièces + @@ -6174,22 +6215,16 @@ Le format du fichier n'est pas reconnu. Déplacer les objets sélectionnés sur l’axe Z - - Rotate selected objects along the X axis - Tourner les objets sélections suivant l’axe X + Tourner les objets sélections suivant l’axe X - - Rotate selected objects along the Y axis - Tourner les objets sélections suivant l’axe Y + Tourner les objets sélections suivant l’axe Y - - Rotate selected objects along the Z axis - Tourner les objets sélections suivant l’axe Z + Tourner les objets sélections suivant l’axe Z diff --git a/resources/leocad_pt.ts b/resources/leocad_pt.ts index 03e4bb08..4f1b1473 100644 --- a/resources/leocad_pt.ts +++ b/resources/leocad_pt.ts @@ -5138,9 +5138,8 @@ O formato do ficheiro não é reconhecido. Procurar objecto seguinte - De-select everything - De-selecciona tudo + De-selecciona tudo @@ -5153,9 +5152,8 @@ O formato do ficheiro não é reconhecido. Selecciona objectos por nome - Toggle snap axes - Bascula a grelha nos eixos + Bascula a grelha nos eixos @@ -5388,6 +5386,12 @@ O formato do ficheiro não é reconhecido. Machine-translated draft (Google Translate); requires human review. Selecione todas as peças do modelo + + + Deselect everything + AI-generated translation draft; requires human review. + Desselecionar tudo + Select one piece at a time @@ -5448,6 +5452,12 @@ O formato do ficheiro não é reconhecido. Machine-translated draft (Google Translate); requires human review. Alternar a rotação das peças selecionadas em separado + + + Toggle movement snapping + AI-generated translation draft; requires human review. + Ativar ou desativar o ajuste do movimento + Snap rotations to 15 degrees @@ -5513,6 +5523,12 @@ O formato do ficheiro não é reconhecido. Add new pieces to the model Adiciona novas peças ao modelo + + + Add new directional light sources to the model + AI-generated translation draft; requires human review. + Adicionar novas fontes de luz direcional ao modelo + Add new omni light sources to the model Adiciona novas luzes difusas ao modelo @@ -5603,9 +5619,8 @@ O formato do ficheiro não é reconhecido. Ampliar - Fit all pieces in the current view (hold the CTRL key down to zoom all views) - Faz caber todas as peças na vista actual (carregue na tecla CTRL para aplicar a todas as vistas) + Faz caber todas as peças na vista actual (carregue na tecla CTRL para aplicar a todas as vistas) @@ -5748,6 +5763,27 @@ O formato do ficheiro não é reconhecido. Machine-translated draft (Google Translate); requires human review. Fechar separador atual + + + + Rotate selected objects around the X axis + AI-generated translation draft; requires human review. + Rodar os objetos selecionados em torno do eixo X + + + + + Rotate selected objects around the Y axis + AI-generated translation draft; requires human review. + Rodar os objetos selecionados em torno do eixo Y + + + + + Rotate selected objects around the Z axis + AI-generated translation draft; requires human review. + Rodar os objetos selecionados em torno do eixo Z + Open the model referenced by the selected piece in a new tab @@ -5949,10 +5985,9 @@ O formato do ficheiro não é reconhecido. Adicione novos focos de luz ao modelo - Add new omnidirectional light sources to the model Machine-translated draft (Google Translate); requires human review. - Adicione novas fontes de luz omnidirecionais ao modelo + Adicione novas fontes de luz omnidirecionais ao modelo @@ -5960,6 +5995,12 @@ O formato do ficheiro não é reconhecido. Machine-translated draft (Google Translate); requires human review. Adicione novas fontes de luz de área ao modelo + + + Fit all pieces in the current view + AI-generated translation draft; requires human review. + Ajustar a vista atual para mostrar todas as peças + @@ -6182,22 +6223,16 @@ O formato do ficheiro não é reconhecido. Move os objectos seleccionados no eixo Z - - Rotate selected objects along the X axis - Roda os objectos seleccionados no eixo X + Roda os objectos seleccionados no eixo X - - Rotate selected objects along the Y axis - Roda os objectos seleccionados no eixo Y + Roda os objectos seleccionados no eixo Y - - Rotate selected objects along the Z axis - Roda os objectos seleccionados no eixo Z + Roda os objectos seleccionados no eixo Z diff --git a/resources/leocad_ru.ts b/resources/leocad_ru.ts index 5c3a81c4..e7c0a5e6 100644 --- a/resources/leocad_ru.ts +++ b/resources/leocad_ru.ts @@ -4823,9 +4823,8 @@ File format is not recognized. Выбрать все детали модели - De-select everything - Снять выделение + Снять выделение @@ -4894,6 +4893,12 @@ File format is not recognized. Replace all pieces that match the search criteria Заменить все детали, совпадающие с условиями поиска + + + Deselect everything + AI-generated translation draft; requires human review. + Снять всё выделение + Select one piece at a time @@ -4945,9 +4950,8 @@ File format is not recognized. Переключить вращение выбранных деталей отдельно - Toggle snap axes - Переключить привязку осей + Переключить привязку осей @@ -5155,10 +5159,9 @@ File format is not recognized. Добавьте в модель новые точечные светильники - Add new omnidirectional light sources to the model Machine-translated draft (Google Translate); requires human review. - Добавьте в модель новые всенаправленные источники света. + Добавьте в модель новые всенаправленные источники света. @@ -5247,9 +5250,26 @@ File format is not recognized. Уменьшить - Fit all pieces in the current view (hold the CTRL key down to zoom all views) - Вписать все детали в текущий вид (удерживайте клавишу CTRL для масштабирования всех видов) + Вписать все детали в текущий вид (удерживайте клавишу CTRL для масштабирования всех видов) + + + + Toggle movement snapping + AI-generated translation draft; requires human review. + Включить или отключить привязку перемещения + + + + Add new directional light sources to the model + AI-generated translation draft; requires human review. + Добавить в модель новые направленные источники света + + + + Fit all pieces in the current view + AI-generated translation draft; requires human review. + Показать все детали в текущем виде @@ -5583,20 +5603,35 @@ File format is not recognized. - Rotate selected objects along the X axis - Вращать выбранные объекты по оси X + Rotate selected objects around the X axis + AI-generated translation draft; requires human review. + Повернуть выбранные объекты вокруг оси X - Rotate selected objects along the Y axis - Вращать выбранные объекты по оси Y + Rotate selected objects around the Y axis + AI-generated translation draft; requires human review. + Повернуть выбранные объекты вокруг оси Y + Rotate selected objects around the Z axis + AI-generated translation draft; requires human review. + Повернуть выбранные объекты вокруг оси Z + + + Rotate selected objects along the X axis + Вращать выбранные объекты по оси X + + + Rotate selected objects along the Y axis + Вращать выбранные объекты по оси Y + + Rotate selected objects along the Z axis - Вращать выбранные объекты по оси Z + Вращать выбранные объекты по оси Z diff --git a/resources/leocad_uk.ts b/resources/leocad_uk.ts index 011c6f4c..fb8d8168 100644 --- a/resources/leocad_uk.ts +++ b/resources/leocad_uk.ts @@ -5316,10 +5316,9 @@ File format is not recognized. Виберіть усі частини моделі - De-select everything Machine-translated draft (Google Translate); requires human review. - Зніміть вибір із усього + Зніміть вибір із усього @@ -5399,6 +5398,12 @@ File format is not recognized. Machine-translated draft (Google Translate); requires human review. Замініть усі елементи, які відповідають критеріям пошуку + + + Deselect everything + AI-generated translation draft; requires human review. + Зняти все виділення + Select one piece at a time @@ -5460,10 +5465,9 @@ File format is not recognized. Перемкнути обертання вибраних частин окремо - Toggle snap axes Machine-translated draft (Google Translate); requires human review. - Перемикати осі прив’язки + Перемикати осі прив’язки @@ -5700,10 +5704,9 @@ File format is not recognized. Додайте до моделі нові прожектори - Add new omnidirectional light sources to the model Machine-translated draft (Google Translate); requires human review. - Додайте до моделі нові всенаправлені джерела світла + Додайте до моделі нові всенаправлені джерела світла @@ -5808,10 +5811,27 @@ File format is not recognized. Зменшити масштаб - Fit all pieces in the current view (hold the CTRL key down to zoom all views) Machine-translated draft (Google Translate); requires human review. - Розмістіть усі частини в поточному поданні (утримуйте клавішу CTRL, щоб збільшити всі подання) + Розмістіть усі частини в поточному поданні (утримуйте клавішу CTRL, щоб збільшити всі подання) + + + + Toggle movement snapping + AI-generated translation draft; requires human review. + Увімкнути або вимкнути прив’язку переміщення + + + + Add new directional light sources to the model + AI-generated translation draft; requires human review. + Додати до моделі нові спрямовані джерела світла + + + + Fit all pieces in the current view + AI-generated translation draft; requires human review. + Показати всі деталі в поточному вигляді @@ -6203,23 +6223,38 @@ File format is not recognized. - Rotate selected objects along the X axis - Machine-translated draft (Google Translate); requires human review. - Повертати виділені об’єкти вздовж осі X + Rotate selected objects around the X axis + AI-generated translation draft; requires human review. + Повернути вибрані об’єкти навколо осі X - Rotate selected objects along the Y axis - Machine-translated draft (Google Translate); requires human review. - Повертати виділені об’єкти вздовж осі Y + Rotate selected objects around the Y axis + AI-generated translation draft; requires human review. + Повернути вибрані об’єкти навколо осі Y + Rotate selected objects around the Z axis + AI-generated translation draft; requires human review. + Повернути вибрані об’єкти навколо осі Z + + + Rotate selected objects along the X axis + Machine-translated draft (Google Translate); requires human review. + Повертати виділені об’єкти вздовж осі X + + + Rotate selected objects along the Y axis + Machine-translated draft (Google Translate); requires human review. + Повертати виділені об’єкти вздовж осі Y + + Rotate selected objects along the Z axis Machine-translated draft (Google Translate); requires human review. - Повертати виділені об’єкти вздовж осі Z + Повертати виділені об’єкти вздовж осі Z diff --git a/resources/leocad_zh_CN.ts b/resources/leocad_zh_CN.ts index 2a82cc8d..3058adef 100644 --- a/resources/leocad_zh_CN.ts +++ b/resources/leocad_zh_CN.ts @@ -4775,9 +4775,8 @@ File format is not recognized. 查找下一个对象 - De-select everything - 取消全选 + 取消全选 @@ -4790,9 +4789,8 @@ File format is not recognized. 按名称选择物体 - Toggle snap axes - 切换吸附轴 + 切换吸附轴 @@ -5007,6 +5005,12 @@ File format is not recognized. Select all pieces in the model 选择模型中的所有零件 + + + Deselect everything + AI-generated translation draft; requires human review. + 取消全部选择 + Select one piece at a time @@ -5057,6 +5061,12 @@ File format is not recognized. Toggle rotating selected pieces separately 切换分别旋转选定零件 + + + Toggle movement snapping + AI-generated translation draft; requires human review. + 切换移动捕捉 + Snap rotations to 15 degrees @@ -5122,6 +5132,12 @@ File format is not recognized. Add new pieces to the model 向模型添加新零件 + + + Add new directional light sources to the model + AI-generated translation draft; requires human review. + 向模型添加新的定向光源 + Add new omni light sources to the model 向模型添加新的点光源 @@ -5211,9 +5227,8 @@ File format is not recognized. 缩小 - Fit all pieces in the current view (hold the CTRL key down to zoom all views) - 使所有零件适应当前视图(按住 CTRL 键可缩放所有视图) + 使所有零件适应当前视图(按住 CTRL 键可缩放所有视图) @@ -5349,6 +5364,27 @@ File format is not recognized. Close current tab 关闭当前标签页 + + + + Rotate selected objects around the X axis + AI-generated translation draft; requires human review. + 绕 X 轴旋转所选对象 + + + + + Rotate selected objects around the Y axis + AI-generated translation draft; requires human review. + 绕 Y 轴旋转所选对象 + + + + + Rotate selected objects around the Z axis + AI-generated translation draft; requires human review. + 绕 Z 轴旋转所选对象 + Open the model referenced by the selected piece in a new tab @@ -5528,10 +5564,9 @@ File format is not recognized. 向模型添加新的聚光灯 - Add new omnidirectional light sources to the model Machine-translated draft (Google Translate); requires human review. - 向模型添加新的全向光源 + 向模型添加新的全向光源 @@ -5539,6 +5574,12 @@ File format is not recognized. Machine-translated draft (Google Translate); requires human review. 向模型添加新的区域光源 + + + Fit all pieces in the current view + AI-generated translation draft; requires human review. + 调整当前视图以显示所有零件 + @@ -5738,22 +5779,16 @@ File format is not recognized. 沿 Z 轴移动选定物体 - - Rotate selected objects along the X axis - 沿 X 轴旋转选定物体 + 沿 X 轴旋转选定物体 - - Rotate selected objects along the Y axis - 沿 Y 轴旋转选定物体 + 沿 Y 轴旋转选定物体 - - Rotate selected objects along the Z axis - 沿 Z 轴旋转选定物体 + 沿 Z 轴旋转选定物体