Skip to content

Commit

Permalink
Fix translatable strings
Browse files Browse the repository at this point in the history
* 'Untranslate' some button texts
* British vs. American English
* Reset texts mismatch with settings they refer to
* Make text consistent with neighbours
* Some fixes that where pending since 3.5 string freeze
* Add missing strings from order.xml and make sure "Custom" gets translated too
* Use same string as the corresponding UI file does
* Remove trailing space
* Remove superfluous colon
  • Loading branch information
Jojo-Schmitz committed Dec 28, 2020
1 parent 22cf9cb commit 90e8e55
Show file tree
Hide file tree
Showing 16 changed files with 71 additions and 60 deletions.
2 changes: 1 addition & 1 deletion libmscore/property.cpp
Expand Up @@ -167,7 +167,7 @@ static constexpr PropertyMetaData propertyList[] = {
{ Pid::CHANGE_METHOD, true, "changeMethod", P_TYPE::CHANGE_METHOD, DUMMY_QT_TRANSLATE_NOOP("propertyName", "change method") }, // the new, more general version of VELO_CHANGE_METHOD
{ Pid::PLACEMENT, false, "placement", P_TYPE::PLACEMENT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "placement") },
{ Pid::HPLACEMENT, false, "hplacement", P_TYPE::HPLACEMENT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "horizontal placement") },
{ Pid::MMREST_RANGE_BRACKET_TYPE, false, "mmrestRangeBracketType", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "multi-measure rest range bracket type") },
{ Pid::MMREST_RANGE_BRACKET_TYPE, false, "mmrestRangeBracketType", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "multimeasure rest range bracket type") },
{ Pid::VELOCITY, false, "velocity", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "velocity") },
{ Pid::JUMP_TO, true, "jumpTo", P_TYPE::STRING, DUMMY_QT_TRANSLATE_NOOP("propertyName", "jump to") },
{ Pid::PLAY_UNTIL, true, "playUntil", P_TYPE::STRING, DUMMY_QT_TRANSLATE_NOOP("propertyName", "play until") },
Expand Down
2 changes: 1 addition & 1 deletion libmscore/scoreElement.cpp
Expand Up @@ -36,7 +36,7 @@ static const ElementName elementNames[] = {
{ ElementType::SYMBOL, "Symbol", QT_TRANSLATE_NOOP("elementName", "Symbol") },
{ ElementType::TEXT, "Text", QT_TRANSLATE_NOOP("elementName", "Text") },
{ ElementType::MEASURE_NUMBER, "MeasureNumber", QT_TRANSLATE_NOOP("elementName", "Measure Number") },
{ ElementType::MMREST_RANGE, "MMRestRange", QT_TRANSLATE_NOOP("elementName", "Multi-Measure Rest Range") },
{ ElementType::MMREST_RANGE, "MMRestRange", QT_TRANSLATE_NOOP("elementName", "Multimeasure Rest Range") },
{ ElementType::INSTRUMENT_NAME, "InstrumentName", QT_TRANSLATE_NOOP("elementName", "Instrument Name") },
{ ElementType::SLUR_SEGMENT, "SlurSegment", QT_TRANSLATE_NOOP("elementName", "Slur Segment") },
{ ElementType::TIE_SEGMENT, "TieSegment", QT_TRANSLATE_NOOP("elementName", "Tie Segment") },
Expand Down
4 changes: 2 additions & 2 deletions libmscore/scoreOrder.cpp
Expand Up @@ -403,7 +403,7 @@ QString ScoreOrder::getName() const
QString ScoreOrder::getFullName() const
{
if (_customised)
return QString(QT_TRANSLATE_NOOP("OrderXML", "%1 (Customised)")).arg(_name);
return QString(QT_TRANSLATE_NOOP("OrderXML", "%1 (Customized)")).arg(_name);
else
return getName();
}
Expand Down Expand Up @@ -724,7 +724,7 @@ void ScoreOrder::dump() const
ScoreOrderList::ScoreOrderList()
{
_orders.clear();
ScoreOrder* custom = new ScoreOrder(QString("<custom>"), qApp->translate("OrderXML", "Custom"));
ScoreOrder* custom = new ScoreOrder(QString("<custom>"), QString(QT_TRANSLATE_NOOP("OrderXML", "Custom")));
custom->createUnsortedGroup();
addScoreOrder(custom);
}
Expand Down
2 changes: 1 addition & 1 deletion libmscore/style.cpp
Expand Up @@ -2450,7 +2450,7 @@ static constexpr std::array<TextStyleName, int(Tid::TEXT_STYLES)> textStyles { {
{ QT_TRANSLATE_NOOP("TextStyle", "Footer"), &footerTextStyle, Tid::FOOTER },
// Measure-oriented styles
{ QT_TRANSLATE_NOOP("TextStyle", "Measure Number"), &measureNumberTextStyle, Tid::MEASURE_NUMBER },
{ QT_TRANSLATE_NOOP("TextStyle", "Multi-Measure Rest Range"), &mmRestRangeTextStyle, Tid::MMREST_RANGE },
{ QT_TRANSLATE_NOOP("TextStyle", "Multimeasure Rest Range"), &mmRestRangeTextStyle, Tid::MMREST_RANGE },
// Sytem-level styles
{ QT_TRANSLATE_NOOP("TextStyle", "Tempo"), &tempoTextStyle, Tid::TEMPO },
{ QT_TRANSLATE_NOOP("TextStyle", "Metronome"), &metronomeTextStyle, Tid::METRONOME },
Expand Down
2 changes: 1 addition & 1 deletion mscore/editstyle.cpp
Expand Up @@ -487,7 +487,7 @@ EditStyle::EditStyle(Score* s, QWidget* parent)
voicingSelectWidget->voicingBox->addItem(tr("Automatic"), int(Voicing::AUTO));
voicingSelectWidget->voicingBox->addItem(tr("Root Only"), int(Voicing::ROOT_ONLY));
voicingSelectWidget->voicingBox->addItem(tr("Close"), int(Voicing::CLOSE));
voicingSelectWidget->voicingBox->addItem(tr("Drop 2"), int(Voicing::DROP_2));
voicingSelectWidget->voicingBox->addItem(tr("Drop Two"), int(Voicing::DROP_2));
voicingSelectWidget->voicingBox->addItem(tr("Six Note"), int(Voicing::SIX_NOTE));
voicingSelectWidget->voicingBox->addItem(tr("Four Note"), int(Voicing::FOUR_NOTE));
voicingSelectWidget->voicingBox->addItem(tr("Three Note"), int(Voicing::THREE_NOTE));
Expand Down
34 changes: 17 additions & 17 deletions mscore/editstyle.ui
Expand Up @@ -539,7 +539,7 @@
</sizepolicy>
</property>
<property name="text">
<string>First system indentation value:</string>
<string>First system indentation:</string>
</property>
<property name="buddy">
<cstring>indentationValue</cstring>
Expand Down Expand Up @@ -568,7 +568,7 @@
<string>Reset to default</string>
</property>
<property name="accessibleName">
<string>Reset 'First system indentation value'</string>
<string>Reset 'First system indentation' value</string>
</property>
<property name="text">
<string notr="true"/>
Expand Down Expand Up @@ -1345,7 +1345,7 @@
<string>Reset 'Min. system distance' value</string>
</property>
<property name="text">
<string>...</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
Expand Down Expand Up @@ -1491,7 +1491,7 @@
<string>Reset 'Max. grand staff distance' value</string>
</property>
<property name="text">
<string notr="true">...</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
Expand Down Expand Up @@ -1572,7 +1572,7 @@
<item row="0" column="4">
<widget class="QLabel" name="label_162">
<property name="text">
<string>Min. system distance</string>
<string>Min. system distance:</string>
</property>
<property name="buddy">
<cstring>minSystemSpread</cstring>
Expand Down Expand Up @@ -1656,7 +1656,7 @@
<string>Reset 'Max. system distance' value</string>
</property>
<property name="text">
<string notr="true">...</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
Expand All @@ -1667,10 +1667,10 @@
<item row="5" column="6">
<widget class="QToolButton" name="resetMaxPageFillSpread">
<property name="accessibleName">
<string>Reset &quot;Max. page fill distance&quot; value</string>
<string>Reset 'Max. page fill distance' value</string>
</property>
<property name="text">
<string>...</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
Expand Down Expand Up @@ -3163,7 +3163,7 @@
<item>
<widget class="QGroupBox" name="mmRestShowMeasureNumberRange">
<property name="title">
<string>Show measure number range at multi-measure-rests</string>
<string>Show measure number range at multimeasure rests</string>
</property>
<property name="checkable">
<bool>true</bool>
Expand Down Expand Up @@ -3203,7 +3203,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_165">
<property name="text">
<string>Vertical placement</string>
<string>Vertical placement:</string>
</property>
<property name="buddy">
<cstring>mmRestRangeVPlacement</cstring>
Expand Down Expand Up @@ -3238,7 +3238,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_164">
<property name="text">
<string>Bracket type</string>
<string>Bracket type:</string>
</property>
<property name="buddy">
<cstring>mmRestRangeBracketType</cstring>
Expand All @@ -3256,7 +3256,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_166">
<property name="text">
<string>Horizontal placement</string>
<string>Horizontal placement:</string>
</property>
<property name="buddy">
<cstring>mmRestRangeHPlacement</cstring>
Expand Down Expand Up @@ -3796,10 +3796,10 @@
<item row="0" column="3">
<widget class="QToolButton" name="resetAccidentalsOctaveColumnsAlignLeft">
<property name="toolTip">
<string>Reset to padding inside parentheses to default</string>
<string>Reset padding inside parentheses to default</string>
</property>
<property name="accessibleName">
<string>Reset 'align accidentals left in columns' value</string>
<string>Reset 'Padding inside parentheses' value</string>
</property>
<property name="text">
<string notr="true"/>
Expand Down Expand Up @@ -3865,10 +3865,10 @@ By default, they will be placed such as that their right end are at the same lev
<item row="1" column="3" rowspan="2">
<widget class="QToolButton" name="resetAccidentalsBracketPadding">
<property name="toolTip">
<string>Reset to padding inside parentheses to default</string>
<string>Reset to align accidentals within octaves to default</string>
</property>
<property name="accessibleName">
<string>Reset 'padding inside parentheses for bracketed accidentals' value</string>
<string>Reset 'Align octaves left' value</string>
</property>
<property name="text">
<string notr="true"/>
Expand All @@ -3891,7 +3891,7 @@ By default, they will be placed such as that their right end are at the same lev
<string>Bracketed accidentals have a margin between the accidental and the brackets.</string>
</property>
<property name="text">
<string>Padding inside parentheses</string>
<string>Padding inside parentheses:</string>
</property>
<property name="buddy">
<cstring>accidentalsBracketsBadding</cstring>
Expand Down
2 changes: 1 addition & 1 deletion mscore/exportdialog.cpp
Expand Up @@ -141,7 +141,7 @@ void ExportDialog::retranslate()

musicxmlFileTypeComboBox->setItemText(0, tr("Compressed") + " (*.mxl)");
musicxmlFileTypeComboBox->setItemText(1, tr("Uncompressed") + " (*.musicxml)");
musicxmlFileTypeComboBox->setItemText(2, tr("Uncompressed (deprecated)") + " (*.xml)");
musicxmlFileTypeComboBox->setItemText(2, tr("Uncompressed (outdated)") + " (*.xml)");

buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export…"));
}
Expand Down
2 changes: 1 addition & 1 deletion mscore/inspector/inspector_stafftypechange.ui
Expand Up @@ -382,7 +382,7 @@
</sizepolicy>
</property>
<property name="accessibleName">
<string>Reset 'Invisible' value</string>
<string>Reset 'Invisible staff lines' value</string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion mscore/inspector/inspector_text.ui
Expand Up @@ -546,7 +546,7 @@
<string>Line spacing</string>
</property>
<property name="suffix">
<string> li</string>
<string>li</string>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
Expand Down
2 changes: 1 addition & 1 deletion mscore/inspector/inspector_vbox.ui
Expand Up @@ -434,7 +434,7 @@
</sizepolicy>
</property>
<property name="accessibleName">
<string>Reset 'AutoSize&quot; value</string>
<string>Reset 'Auto-Size' value</string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion mscore/mixer/mixerdetails.cpp
Expand Up @@ -278,7 +278,7 @@ void MixerDetails::updateFromTrack()
tb->setText(QString("%1").arg(voice + 1));
tb->setCheckable(true);
tb->setChecked(!staff->playbackVoice(voice));
tb->setToolTip(QString(tr("Staff %1")).arg(staffIdx + 1));
tb->setToolTip(QString(tr("Staff %1:")).arg(staffIdx + 1));

mutePerVoiceGrid->addWidget(tb, staffIdx, voice);
MixerDetailsVoiceButtonHandler* handler =
Expand Down
2 changes: 1 addition & 1 deletion mscore/musescore.cpp
Expand Up @@ -6898,7 +6898,7 @@ void MuseScore::showSearchDialog()
searchDialogLayout->addWidget(searchExit);
searchDialogLayout->addSpacing(10);

searchDialogLayout->addWidget(new QLabel(tr("Go To: ")));
searchDialogLayout->addWidget(new QLabel(tr("Find / Go To: ")));

searchCombo = new SearchComboBox;
searchDialogLayout->addWidget(searchCombo);
Expand Down
12 changes: 6 additions & 6 deletions mscore/prefsdialog.ui
Expand Up @@ -356,7 +356,7 @@
<string>Opens a dialog for selecting the image folder</string>
</property>
<property name="text">
<string/>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
Expand Down Expand Up @@ -2610,7 +2610,7 @@
<string>Instrument list 2</string>
</property>
<property name="accessibleDescription">
<string>Insert path to a instrument list file</string>
<string>Insert path to an instrument list file</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -2646,7 +2646,7 @@
<string>Opens a file dialog for selecting an instrument list file</string>
</property>
<property name="text">
<string/>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
Expand Down Expand Up @@ -2734,7 +2734,7 @@
<item row="2" column="2">
<widget class="QToolButton" name="scoreOrderList1Button">
<property name="text">
<string>...</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
Expand All @@ -2745,7 +2745,7 @@
<item row="3" column="2">
<widget class="QToolButton" name="scoreOrderList2Button">
<property name="text">
<string>...</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
Expand Down Expand Up @@ -3588,7 +3588,7 @@ Adjusting latency can help synchronize your MIDI hardware with MuseScore's inter
<item row="5" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_scoreMigration">
<property name="title">
<string>When opening scores from older MuseScore versions:</string>
<string>When opening scores from older MuseScore versions</string>
</property>
<layout class="QGridLayout" name="gridScoreMigration">
<item row="0" column="0">
Expand Down
6 changes: 3 additions & 3 deletions mscore/resourceManager.cpp
Expand Up @@ -170,7 +170,7 @@ void ResourceManager::displayExtensions()
buttonInstall->setText(tr("Update"));
}
else {
buttonInstall->setText(tr("Updated"));
buttonInstall->setText(tr("Up to date"));
buttonInstall->setDisabled(true);
}
}
Expand Down Expand Up @@ -348,7 +348,7 @@ void ResourceManager::downloadLanguage()
zipFile.close();
if (result) {
QFile::remove(localPath);
button->setText(tr("Updated"));
button->setText(tr("Up to date"));
// retranslate the UI if current language is updated
if (dta == languageButtonMap.first())
setMscoreLocale(localeName);
Expand Down Expand Up @@ -399,7 +399,7 @@ void ResourceManager::downloadExtension()
bool result = mscore->importExtension(localPath);
if (result) {
QFile::remove(localPath);
button->setText(tr("Updated"));
button->setText(tr("Up to date"));
// find uninstall button and make it visible
int rowId = button->property("rowId").toInt();
QPushButton* uninstallButton = static_cast<QPushButton*>(extensionsTable->indexWidget(extensionsTable->model()->index(rowId, 4)));
Expand Down
11 changes: 6 additions & 5 deletions mscore/shortcut.cpp
Expand Up @@ -2731,7 +2731,8 @@ Shortcut Shortcut::_sc[] = {
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY,
"find",
QT_TRANSLATE_NOOP("action","Find")
QT_TRANSLATE_NOOP("action","Find / Go To")
QT_TRANSLATE_NOOP("action","Find / Go to")
},
{
MsWidget::MAIN_WINDOW,
Expand Down Expand Up @@ -3979,7 +3980,7 @@ Shortcut Shortcut::_sc[] = {
STATE_ALL,
"zoom-in-horiz-pre",
QT_TRANSLATE_NOOP("action", "Zoom In Horizontally"),
QT_TRANSLATE_NOOP("action", "Zoom in horizontal - piano roll editor"),
QT_TRANSLATE_NOOP("action", "Zoom in horizontally - piano roll editor"),
0,
Icons::Invalid_ICON
},
Expand All @@ -3988,7 +3989,7 @@ Shortcut Shortcut::_sc[] = {
STATE_ALL,
"zoom-out-horiz-pre",
QT_TRANSLATE_NOOP("action", "Zoom Out Horizontally"),
QT_TRANSLATE_NOOP("action", "Zoom out horizontal - piano roll editor"),
QT_TRANSLATE_NOOP("action", "Zoom out horizontally - piano roll editor"),
0,
Icons::Invalid_ICON
},
Expand All @@ -3997,7 +3998,7 @@ Shortcut Shortcut::_sc[] = {
STATE_ALL,
"zoom-in-vert-pre",
QT_TRANSLATE_NOOP("action", "Zoom In Vertically"),
QT_TRANSLATE_NOOP("action", "Zoom in vertical - piano roll editor"),
QT_TRANSLATE_NOOP("action", "Zoom in vertically - piano roll editor"),
0,
Icons::Invalid_ICON
},
Expand All @@ -4006,7 +4007,7 @@ Shortcut Shortcut::_sc[] = {
STATE_ALL,
"zoom-out-vert-pre",
QT_TRANSLATE_NOOP("action", "Zoom Out Vertically"),
QT_TRANSLATE_NOOP("action", "Zoom out vertical - piano roll editor"),
QT_TRANSLATE_NOOP("action", "Zoom out vertically - piano roll editor"),
0,
Icons::Invalid_ICON
},
Expand Down

0 comments on commit 90e8e55

Please sign in to comment.