From 20baf96db345d8740d29fab6527f79cf33c80459 Mon Sep 17 00:00:00 2001 From: Martin Pavelek Date: Sat, 19 Nov 2022 17:16:44 +0100 Subject: [PATCH] Fix several issues raised at Transifex (#6568) Make strings independent on word order, fix capitalization and typos --- plugins/SpectrumAnalyzer/SaControlsDialog.cpp | 10 ++-- plugins/VstBase/VstPlugin.cpp | 50 ++++++++----------- src/gui/LfoControllerDialog.cpp | 33 +++++------- 3 files changed, 39 insertions(+), 54 deletions(-) diff --git a/plugins/SpectrumAnalyzer/SaControlsDialog.cpp b/plugins/SpectrumAnalyzer/SaControlsDialog.cpp index 4a1cb8a79..c4fc431b1 100644 --- a/plugins/SpectrumAnalyzer/SaControlsDialog.cpp +++ b/plugins/SpectrumAnalyzer/SaControlsDialog.cpp @@ -240,7 +240,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor) envelopeResolutionKnob->setModel(&controls->m_envelopeResolutionModel); envelopeResolutionKnob->setLabel(tr("Envelope res.")); envelopeResolutionKnob->setToolTip(tr("Increase envelope resolution for better details, decrease for better GUI performance.")); - envelopeResolutionKnob->setHintText(tr("Draw at most"), tr(" envelope points per pixel")); + envelopeResolutionKnob->setHintText(tr("Maximum number of envelope points drawn per pixel:"), ""); advanced_layout->addWidget(envelopeResolutionKnob, 0, 0, 1, 1, Qt::AlignCenter); // Spectrum graph resolution @@ -248,7 +248,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor) spectrumResolutionKnob->setModel(&controls->m_spectrumResolutionModel); spectrumResolutionKnob->setLabel(tr("Spectrum res.")); spectrumResolutionKnob->setToolTip(tr("Increase spectrum resolution for better details, decrease for better GUI performance.")); - spectrumResolutionKnob->setHintText(tr("Draw at most"), tr(" spectrum points per pixel")); + spectrumResolutionKnob->setHintText(tr("Maximum number of spectrum points drawn per pixel:"), ""); advanced_layout->addWidget(spectrumResolutionKnob, 1, 0, 1, 1, Qt::AlignCenter); // Peak falloff speed @@ -272,7 +272,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor) waterfallHeightKnob->setModel(&controls->m_waterfallHeightModel); waterfallHeightKnob->setLabel(tr("Waterfall height")); waterfallHeightKnob->setToolTip(tr("Increase to get slower scrolling, decrease to see fast transitions better. Warning: medium CPU usage.")); - waterfallHeightKnob->setHintText(tr("Keep"), tr(" lines")); + waterfallHeightKnob->setHintText(tr("Number of lines to keep:"), ""); advanced_layout->addWidget(waterfallHeightKnob, 0, 2, 1, 1, Qt::AlignCenter); processor->reallocateBuffers(); connect(&controls->m_waterfallHeightModel, &FloatModel::dataChanged, [=] {processor->reallocateBuffers();}); @@ -290,7 +290,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor) windowOverlapKnob->setModel(&controls->m_windowOverlapModel); windowOverlapKnob->setLabel(tr("Window overlap")); windowOverlapKnob->setToolTip(tr("Increase to prevent missing fast transitions arriving near FFT window edges. Warning: high CPU usage.")); - windowOverlapKnob->setHintText(tr("Each sample processed"), tr(" times")); + windowOverlapKnob->setHintText(tr("Number of times each sample is processed:"), ""); advanced_layout->addWidget(windowOverlapKnob, 0, 3, 1, 1, Qt::AlignCenter); // FFT zero padding @@ -365,4 +365,4 @@ QSize SaControlsDialog::sizeHint() const } -} // namespace lmms::gui \ No newline at end of file +} // namespace lmms::gui diff --git a/plugins/VstBase/VstPlugin.cpp b/plugins/VstBase/VstPlugin.cpp index 488931e6d..700a14ac7 100644 --- a/plugins/VstBase/VstPlugin.cpp +++ b/plugins/VstBase/VstPlugin.cpp @@ -504,20 +504,14 @@ QWidget *VstPlugin::editor() void VstPlugin::openPreset() { - - gui::FileDialog ofd( nullptr, tr( "Open Preset" ), "", - tr( "Vst Plugin Preset (*.fxp *.fxb)" ) ); - ofd.setFileMode( gui::FileDialog::ExistingFiles ); - if( ofd.exec () == QDialog::Accepted && - !ofd.selectedFiles().isEmpty() ) + gui::FileDialog ofd(nullptr, tr("Open Preset"), "", tr("VST Plugin Preset (*.fxp *.fxb)")); + ofd.setFileMode(gui::FileDialog::ExistingFiles); + if (ofd.exec() == QDialog::Accepted && !ofd.selectedFiles().isEmpty()) { lock(); - sendMessage( message( IdLoadPresetFile ). - addString( - QSTR_TO_STDSTR( - QDir::toNativeSeparators( ofd.selectedFiles()[0] ) ) ) - ); - waitForMessage( IdLoadPresetFile, true ); + sendMessage(message(IdLoadPresetFile).addString(QSTR_TO_STDSTR( + QDir::toNativeSeparators(ofd.selectedFiles()[0])))); + waitForMessage(IdLoadPresetFile, true); unlock(); } } @@ -585,32 +579,32 @@ void VstPlugin::savePreset() QString presName = currentProgramName().isEmpty() ? tr(": default") : currentProgramName(); presName.replace("\"", "'"); // QFileDialog unable to handle double quotes properly - gui::FileDialog sfd( nullptr, tr( "Save Preset" ), presName.section(": ", 1, 1) + tr(".fxp"), - tr( "Vst Plugin Preset (*.fxp *.fxb)" ) ); + gui::FileDialog sfd(nullptr, tr("Save Preset"), presName.section(": ", 1, 1) + tr(".fxp"), + tr("VST Plugin Preset (*.fxp *.fxb)")); - if( p_name != "" ) // remember last directory + if (p_name != "") // remember last directory { - sfd.setDirectory( QFileInfo( p_name ).absolutePath() ); + sfd.setDirectory(QFileInfo(p_name).absolutePath()); } - sfd.setAcceptMode( gui::FileDialog::AcceptSave ); - sfd.setFileMode( gui::FileDialog::AnyFile ); - if( sfd.exec () == QDialog::Accepted && - !sfd.selectedFiles().isEmpty() && sfd.selectedFiles()[0] != "" ) + sfd.setAcceptMode(gui::FileDialog::AcceptSave); + sfd.setFileMode(gui::FileDialog::AnyFile); + if (sfd.exec() == QDialog::Accepted && !sfd.selectedFiles().isEmpty() && sfd.selectedFiles()[0] != "") { QString fns = sfd.selectedFiles()[0]; p_name = fns; if ((fns.toUpper().indexOf(tr(".FXP")) == -1) && (fns.toUpper().indexOf(tr(".FXB")) == -1)) + { fns = fns + tr(".fxb"); - else fns = fns.left(fns.length() - 4) + (fns.right( 4 )).toLower(); + } + else + { + fns = fns.left(fns.length() - 4) + (fns.right(4)).toLower(); + } lock(); - sendMessage( message( IdSavePresetFile ). - addString( - QSTR_TO_STDSTR( - QDir::toNativeSeparators( fns ) ) ) - ); - waitForMessage( IdSavePresetFile, true ); + sendMessage(message(IdSavePresetFile).addString(QSTR_TO_STDSTR(QDir::toNativeSeparators(fns)))); + waitForMessage(IdSavePresetFile, true); unlock(); } } @@ -825,4 +819,4 @@ QString VstPlugin::embedMethod() const } -} // namespace lmms \ No newline at end of file +} // namespace lmms diff --git a/src/gui/LfoControllerDialog.cpp b/src/gui/LfoControllerDialog.cpp index 9e58d3e18..64602cd74 100644 --- a/src/gui/LfoControllerDialog.cpp +++ b/src/gui/LfoControllerDialog.cpp @@ -167,31 +167,22 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent m_waveBtnGrp->addButton( m_userWaveBtn ); auto x1 = new PixmapButton(this, nullptr); - x1->move( CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y +7); - x1->setActiveGraphic( embed::getIconPixmap( - "lfo_x1_active" ) ); - x1->setInactiveGraphic( embed::getIconPixmap( - "lfo_x1_inactive" ) ); - x1->setToolTip( - tr( "Mutliply modulation frequency by 1" )); + x1->move(CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y + 7); + x1->setActiveGraphic(embed::getIconPixmap("lfo_x1_active")); + x1->setInactiveGraphic(embed::getIconPixmap("lfo_x1_inactive")); + x1->setToolTip(tr("Multiply modulation frequency by 1")); auto x100 = new PixmapButton(this, nullptr); - x100->move( CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y - 8 ); - x100->setActiveGraphic( embed::getIconPixmap( - "lfo_x100_active" ) ); - x100->setInactiveGraphic( embed::getIconPixmap( - "lfo_x100_inactive" ) ); - x100->setToolTip( - tr( "Mutliply modulation frequency by 100" )); + x100->move(CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y - 8); + x100->setActiveGraphic(embed::getIconPixmap("lfo_x100_active")); + x100->setInactiveGraphic(embed::getIconPixmap("lfo_x100_inactive")); + x100->setToolTip(tr("Multiply modulation frequency by 100")); auto d100 = new PixmapButton(this, nullptr); - d100->move( CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y + 22 ); - d100->setActiveGraphic( embed::getIconPixmap( - "lfo_d100_active" ) ); - d100->setInactiveGraphic( embed::getIconPixmap( - "lfo_d100_inactive" ) ); - d100->setToolTip( - tr( "Divide modulation frequency by 100" )); + d100->move(CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y + 22); + d100->setActiveGraphic(embed::getIconPixmap("lfo_d100_active")); + d100->setInactiveGraphic(embed::getIconPixmap("lfo_d100_inactive")); + d100->setToolTip(tr("Divide modulation frequency by 100")); m_multiplierBtnGrp = new automatableButtonGroup( this ); m_multiplierBtnGrp->addButton( x1 );