From ebc89c2774b3a77e218a6f5908438b7e6cf5c70e Mon Sep 17 00:00:00 2001 From: Alfonso Ruzafa Date: Mon, 16 May 2022 21:36:52 +0200 Subject: [PATCH] localize untranslated strings --- common/lc_application.cpp | 2 +- common/lc_edgecolordialog.cpp | 12 ++++++------ common/lc_instructionsdialog.cpp | 8 ++++---- common/lc_partselectionwidget.cpp | 2 +- common/lc_previewwidget.cpp | 7 ++++--- docs/leocad.1 | 2 +- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/common/lc_application.cpp b/common/lc_application.cpp index 1bdf2c51..f009232e 100644 --- a/common/lc_application.cpp +++ b/common/lc_application.cpp @@ -830,7 +830,7 @@ lcCommandLineOptions lcApplication::ParseCommandLineOptions() Options.StdOut += tr(" --no-highlight: Do not highlight parts in the steps they appear.\n"); Options.StdOut += tr(" --highlight-color: Renderinng color for highlighted parts (#AARRGGBB).\n"); Options.StdOut += tr(" --shading : Select shading mode for rendering.\n"); - Options.StdOut += tr(" --line-width : Set the with of the edge lines.\n"); + Options.StdOut += tr(" --line-width : Set the width of the edge lines.\n"); Options.StdOut += tr(" --aa-samples : AntiAliasing sample size (1, 2, 4, or 8).\n"); Options.StdOut += tr(" -scc, --stud-cylinder-color <#AARRGGBB>: High contrast stud cylinder color.\n"); Options.StdOut += tr(" -ec, --edge-color <#AARRGGBB>: High contrast edge color.\n"); diff --git a/common/lc_edgecolordialog.cpp b/common/lc_edgecolordialog.cpp index af4d7304..77310b45 100644 --- a/common/lc_edgecolordialog.cpp +++ b/common/lc_edgecolordialog.cpp @@ -45,14 +45,14 @@ lcAutomateEdgeColorDialog::lcAutomateEdgeColorDialog(QWidget* Parent, bool ShowH EdgeSettingsLayout->addWidget(ResetPartEdgeContrastButton,0,3); } - QLabel* PartColorValueLDIndexLabel = new QLabel(tr(ShowHighContrastDialog ? "Light/Dark Value:" : "Saturation:"), this); + QLabel* PartColorValueLDIndexLabel = new QLabel(ShowHighContrastDialog ? tr("Light/Dark Value:") : tr("Saturation:"), this); PartColorValueLDIndex = new QLabel(this); PartColorValueLDIndexSlider = new QSlider(Qt::Horizontal, this); PartColorValueLDIndexSlider->setRange(0, 100); PartColorValueLDIndexSlider->setValue(mPartColorValueLDIndex * 100); - PartColorValueLDIndexSlider->setToolTip(tr(ShowHighContrastDialog ? - "Set to classify where color values are light or dark - e.g. Dark Bluish Gray (72) is light at 0.39." : - "Set to specify amount of edge color tint or shade from the saturation adjusted part color")); + PartColorValueLDIndexSlider->setToolTip(ShowHighContrastDialog ? + tr("Set to classify where color values are light or dark - e.g. Dark Bluish Gray (72) is light at 0.39.") : + tr("Set to specify amount of edge color tint or shade from the saturation adjusted part color")); connect(PartColorValueLDIndexSlider, SIGNAL(valueChanged(int)), this, SLOT(SliderValueChanged(int))); emit PartColorValueLDIndexSlider->valueChanged(PartColorValueLDIndexSlider->value()); @@ -176,7 +176,7 @@ void lcAutomateEdgeColorDialog::ColorButtonClicked() if (lcGetPreferences().mAutomateEdgeColor) { QMessageBox msgBox; - msgBox.setText("Automate edge color appears to be enabled.
Black parts edge color will not be accessible.
Do you want to continue ?"); + msgBox.setText(tr("Automate edge color appears to be enabled.
Black parts edge color will not be accessible.
Do you want to continue?")); if (msgBox.exec() != QMessageBox::Accepted) return; } @@ -188,7 +188,7 @@ void lcAutomateEdgeColorDialog::ColorButtonClicked() if (lcGetPreferences().mAutomateEdgeColor) { QMessageBox msgBox; - msgBox.setText("Automate edge color appears to be enabled.
Dark parts edge color will not be accessible.
Do you want to continue ?"); + msgBox.setText(tr("Automate edge color appears to be enabled.
Dark parts edge color will not be accessible.
Do you want to continue?")); if (msgBox.exec() != QMessageBox::Accepted) return; } diff --git a/common/lc_instructionsdialog.cpp b/common/lc_instructionsdialog.cpp index 444d0e80..45b5488b 100644 --- a/common/lc_instructionsdialog.cpp +++ b/common/lc_instructionsdialog.cpp @@ -186,7 +186,7 @@ lcInstructionsPageListWidget::lcInstructionsPageListWidget(QWidget* Parent, lcIn Layout->addLayout(ButtonsLayout); QToolButton* PageSetupButton = new QToolButton(); - PageSetupButton->setText("Page Setup"); + PageSetupButton->setText(tr("Page Setup")); ButtonsLayout->addWidget(PageSetupButton); connect(PageSetupButton, SIGNAL(clicked()), this, SLOT(ShowPageSetupDialog())); @@ -551,10 +551,10 @@ lcInstructionsDialog::lcInstructionsDialog(QWidget* Parent, Project* Project) mPrintAction = mPageSettingsToolBar->addAction(tr("Print")); - mVerticalPageAction = mPageSettingsToolBar->addAction("Vertical"); + mVerticalPageAction = mPageSettingsToolBar->addAction(tr("Vertical")); mVerticalPageAction->setCheckable(true); - mHorizontalPageAction = mPageSettingsToolBar->addAction("Horizontal"); + mHorizontalPageAction = mPageSettingsToolBar->addAction(tr("Horizontal")); mHorizontalPageAction->setCheckable(true); mRowsSpinBox = new QSpinBox(mPageSettingsToolBar); @@ -568,7 +568,7 @@ lcInstructionsDialog::lcInstructionsDialog(QWidget* Parent, Project* Project) PageDirectionGroup->addAction(mHorizontalPageAction); for (size_t PageNumber = 0; PageNumber < mInstructions->mPages.size(); PageNumber++) - mPageListWidget->mThumbnailsWidget->addItem(QString("Page %1").arg(PageNumber + 1)); + mPageListWidget->mThumbnailsWidget->addItem(QString(tr("Page %1")).arg(PageNumber + 1)); connect(mPageListWidget->mThumbnailsWidget, SIGNAL(currentRowChanged(int)), this, SLOT(CurrentThumbnailChanged(int))); mPageListWidget->mThumbnailsWidget->setCurrentRow(0); diff --git a/common/lc_partselectionwidget.cpp b/common/lc_partselectionwidget.cpp index 38dd6bfb..373d527e 100644 --- a/common/lc_partselectionwidget.cpp +++ b/common/lc_partselectionwidget.cpp @@ -899,7 +899,7 @@ void lcPartSelectionWidget::OptionsMenuAboutToShow() QMenu* Menu = (QMenu*)sender(); Menu->clear(); - Menu->addAction("Edit Palettes...", this, SLOT(EditPartPalettes())); + Menu->addAction(tr("Edit Palettes..."), this, SLOT(EditPartPalettes())); Menu->addSeparator(); lcPartSelectionListModel* ListModel = mPartsWidget->GetListModel(); diff --git a/common/lc_previewwidget.cpp b/common/lc_previewwidget.cpp index 0dd3c4b5..496b3521 100644 --- a/common/lc_previewwidget.cpp +++ b/common/lc_previewwidget.cpp @@ -74,10 +74,11 @@ void lcPreviewDockWidget::SetPreviewLock() } QIcon LockIcon(Locked ? ":/resources/action_preview_locked.png" : ":/resources/action_preview_unlocked.png"); - QString State(Locked ? tr("Unlock") : tr("Lock")); - QString StatusTip(tr("%1 the preview display to %2 updates").arg(State).arg(Locked ? "enable" : "disable")); + QString StatusTip(Locked + ? tr("Unlock the preview display to enable updates") + : tr("Lock the preview display to disable updates")); - mLockAction->setToolTip(tr("%1 Preview").arg(State)); + mLockAction->setToolTip(Locked ? tr("Unlock Preview") : tr("Lock Preview")); mLockAction->setIcon(LockIcon); mLockAction->setStatusTip(StatusTip); } diff --git a/docs/leocad.1 b/docs/leocad.1 index 57ee6f09..109a419c 100644 --- a/docs/leocad.1 +++ b/docs/leocad.1 @@ -130,7 +130,7 @@ Select shading mode for rendering. .TP .BI "\-\-line-width " width -Set the with of the edge lines. +Set the width of the edge lines. .TP .BI "\-\-aa\-samples " count