Skip to content

Commit 767536c

Browse files
committed
Translations and spacing fixes
Resolves: #29267 And some spacing issues, and some texts that might potentially be cut off due to hardcoded widths...
1 parent f444a8d commit 767536c

File tree

10 files changed

+55
-74
lines changed

10 files changed

+55
-74
lines changed

src/engraving/types/typesconv.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -617,16 +617,14 @@ static const std::array ELEMENT_TYPES {
617617
TranslatableString("engraving", "tapping", nullptr, 1),
618618
TranslatableString("engraving", "Tapping", nullptr, 1) },
619619
Item{ ElementType::TAPPING_HALF_SLUR, "TappingHalfSlur",
620-
TranslatableString("engraving", "tapping half slur", nullptr, 1),
621-
TranslatableString("engraving", "Tapping half slur", nullptr, 1),
622-
},
620+
TranslatableString("engraving", "tapping half slur(s)", nullptr, 1),
621+
TranslatableString("engraving", "Tapping half slur(s)", nullptr, 1) },
623622
Item{ ElementType::TAPPING_HALF_SLUR_SEGMENT, "TappingHalfSlurSegment",
624-
TranslatableString("engraving", "tapping half slur segment"),
625-
TranslatableString("engraving", "Tapping half slur segment") },
623+
TranslatableString("engraving", "tapping half slur segment(s)", nullptr, 1),
624+
TranslatableString("engraving", "Tapping half slur segment(s)", nullptr, 1) },
626625
Item{ ElementType::TAPPING_TEXT, "TappingText",
627-
TranslatableString("engraving", "tapping text"),
628-
TranslatableString("engraving", "Tapping text"),
629-
},
626+
TranslatableString("engraving", "tapping text(s)", nullptr, 1),
627+
TranslatableString("engraving", "Tapping text(s)", nullptr, 1) },
630628
Item{ ElementType::ROOT_ITEM, "RootItem",
631629
TranslatableString::untranslatable("root item"),
632630
TranslatableString::untranslatable("Root item") },

src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/InstrumentSettingsPopup.qml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ StyledPopupView {
6969
StyledTextLabel {
7070
id: nameLabel
7171
width: parent.width
72-
text: settingsModel.isMainScore ? qsTrc("instruments", "Name on main score") :
73-
qsTrc("instruments", "Name on part score")
72+
text: settingsModel.isMainScore ? qsTrc("layoutpanel/instrumentsettingspopup", "Name on main score") :
73+
qsTrc("layoutpanel/instrumentsettingspopup", "Name on part score")
7474
horizontalAlignment: Text.AlignLeft
7575
}
7676

@@ -98,7 +98,7 @@ StyledPopupView {
9898
StyledTextLabel {
9999
id: abbreviatureLabel
100100
width: parent.width
101-
text: qsTrc("instruments", "Abbreviated name")
101+
text: qsTrc("layoutpanel/instrumentsettingspopup", "Abbreviated name")
102102
horizontalAlignment: Text.AlignLeft
103103
}
104104

@@ -126,7 +126,7 @@ StyledPopupView {
126126
StyledTextLabel {
127127
id: hideEmptyStavesLabel
128128
width: parent.width
129-
text: qsTrc("instruments", "Hide empty staves")
129+
text: qsTrc("layoutpanel/instrumentsettingspopup", "Hide empty staves")
130130
font: ui.theme.bodyBoldFont
131131
horizontalAlignment: Text.AlignLeft
132132
}
@@ -138,9 +138,9 @@ StyledPopupView {
138138
orientation: ListView.Vertical
139139

140140
model: [
141-
{ text: qsTrc("instruments", "Auto"), value: 0 },
142-
{ text: qsTrc("instruments", "Always hide"), value: 1 },
143-
{ text: qsTrc("instruments", "Never hide"), value: 2 }
141+
{ text: qsTrc("layoutpanel/instrumentsettingspopup", "Auto"), value: 0 },
142+
{ text: qsTrc("layoutpanel/instrumentsettingspopup", "Always hide"), value: 1 },
143+
{ text: qsTrc("layoutpanel/instrumentsettingspopup", "Never hide"), value: 2 }
144144
]
145145

146146
delegate: FlatRadioButton {
@@ -170,7 +170,7 @@ StyledPopupView {
170170
navigation.panel: root.navigationPanel
171171
navigation.row: 6
172172

173-
text: qsTrc("instruments", "Only hide staves on a system if the entire instrument is empty")
173+
text: qsTrc("layoutpanel/instrumentsettingspopup", "Only hide staves on a system if the entire instrument is empty")
174174

175175
checked: !settingsModel.hideStavesWhenIndividuallyEmpty
176176
onClicked: {
@@ -191,7 +191,7 @@ StyledPopupView {
191191
navigation.panel: root.navigationPanel
192192
navigation.row: 7
193193

194-
text: qsTrc("instruments", "Replace instrument")
194+
text: qsTrc("layoutpanel/instrumentsettingspopup", "Replace instrument")
195195

196196
visible: settingsModel.isMainScore
197197

@@ -207,7 +207,7 @@ StyledPopupView {
207207
navigation.panel: root.navigationPanel
208208
navigation.row: 8
209209

210-
text: qsTrc("instruments", "Reset all formatting")
210+
text: qsTrc("layoutpanel/instrumentsettingspopup", "Reset all formatting")
211211

212212
visible: !settingsModel.isMainScore
213213

src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/StaffSettingsPopup.qml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ StyledPopupView {
6969
StyledTextLabel {
7070
id: typeLabel
7171
width: parent.width
72-
text: qsTrc("layoutpanel", "Staff type")
72+
text: qsTrc("layoutpanel/staffsettingspopup", "Staff type")
7373
font: ui.theme.bodyBoldFont
7474
horizontalAlignment: Text.AlignLeft
7575
}
@@ -103,7 +103,7 @@ StyledPopupView {
103103

104104
StyledTextLabel {
105105
visible: !settingsModel.isMainScore
106-
text: qsTrc("layoutpanel", "Voices visible in the score")
106+
text: qsTrc("layoutpanel/staffsettingspopup", "Voices visible in the score")
107107
}
108108

109109
Row {
@@ -159,7 +159,7 @@ StyledPopupView {
159159
navigation.panel: root.navigationPanel
160160
navigation.row: 20 // Should be more than a voices checkbox
161161

162-
text: qsTrc("layoutpanel", "Small staff")
162+
text: qsTrc("layoutpanel/staffsettingspopup", "Small staff")
163163
checked: settingsModel.isSmallStaff
164164

165165
onClicked: {
@@ -173,7 +173,7 @@ StyledPopupView {
173173
navigation.panel: root.navigationPanel
174174
navigation.row: 21 // after small staff CheckBox
175175

176-
text: qsTrc("layoutpanel", "Hide all measures that do not contain notation (cutaway)")
176+
text: qsTrc("layoutpanel/staffsettingspopup", "Hide all measures that do not contain notation (cutaway)")
177177

178178
checked: settingsModel.cutawayEnabled
179179

@@ -191,7 +191,7 @@ StyledPopupView {
191191

192192
StyledTextLabel {
193193
width: parent.width
194-
text: qsTrc("layoutpanel", "Hide empty staves")
194+
text: qsTrc("layoutpanel/staffsettingspopup", "Hide empty staves")
195195
font: ui.theme.bodyBoldFont
196196
horizontalAlignment: Text.AlignLeft
197197
}
@@ -203,9 +203,9 @@ StyledPopupView {
203203
orientation: ListView.Vertical
204204

205205
model: [
206-
{ text: qsTrc("layoutpanel", "Follow instrument"), value: 0 },
207-
{ text: qsTrc("layoutpanel", "Always hide"), value: 1 },
208-
{ text: qsTrc("layoutpanel", "Never hide"), value: 2 }
206+
{ text: qsTrc("layoutpanel/staffsettingspopup", "Follow instrument"), value: 0 },
207+
{ text: qsTrc("layoutpanel/staffsettingspopup", "Always hide"), value: 1 },
208+
{ text: qsTrc("layoutpanel/staffsettingspopup", "Never hide"), value: 2 }
209209
]
210210

211211
delegate: FlatRadioButton {
@@ -214,7 +214,7 @@ StyledPopupView {
214214

215215
navigation.panel: root.navigationPanel
216216
navigation.row: 22 + index
217-
navigation.accessible.name: qsTrc("layoutpanel", "Hide empty staves") + " " + text
217+
navigation.accessible.name: qsTrc("layoutpanel/staffsettingspopup", "Hide empty staves") + " " + text
218218

219219
text: modelData.text
220220

@@ -232,7 +232,7 @@ StyledPopupView {
232232
navigation.panel: root.navigationPanel
233233
navigation.row: 25 // after hideEmptyStavesGroup
234234

235-
text: qsTrc("layoutpanel", "If the entire system is empty, show this staff")
235+
text: qsTrc("layoutpanel/staffsettingspopup", "If the entire system is empty, show this staff")
236236
checked: settingsModel.showIfEntireSystemEmpty
237237

238238
onClicked: {
@@ -253,7 +253,7 @@ StyledPopupView {
253253
navigation.panel: root.navigationPanel
254254
navigation.row: 26 // after showIfEntireSystemEmptyCheckBox
255255

256-
text: qsTrc("layoutpanel", "Create a linked staff")
256+
text: qsTrc("layoutpanel/staffsettingspopup", "Create a linked staff")
257257

258258
onClicked: {
259259
settingsModel.createLinkedStaff()
@@ -264,7 +264,7 @@ StyledPopupView {
264264
StyledTextLabel {
265265
width: parent.width
266266

267-
text: qsTrc("layoutpanel", "Linked staves contain identical notation (e.g. for guitar tablature)")
267+
text: qsTrc("layoutpanel/staffsettingspopup", "Linked staves contain identical notation (e.g. for guitar tablature)")
268268
wrapMode: Text.WordWrap
269269
}
270270
}

src/instrumentsscene/view/instrumentsettingsmodel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void InstrumentSettingsModel::setHideWhenEmpty(int value)
126126
return;
127127
}
128128

129-
currentNotation()->undoStack()->prepareChanges(muse::TranslatableString("instruments", "Change instrument settings"));
129+
currentNotation()->undoStack()->prepareChanges(muse::TranslatableString("undoableAction", "Change instrument settings"));
130130

131131
Part* mutablePart = const_cast<Part*>(part);
132132
mutablePart->undoChangeProperty(Pid::HIDE_WHEN_EMPTY, PropertyValue(static_cast<AutoOnOff>(value)));
@@ -148,7 +148,7 @@ void InstrumentSettingsModel::setHideStavesWhenIndividuallyEmpty(bool value)
148148
return;
149149
}
150150

151-
currentNotation()->undoStack()->prepareChanges(muse::TranslatableString("instruments", "Change instrument settings"));
151+
currentNotation()->undoStack()->prepareChanges(muse::TranslatableString("undoableAction", "Change instrument settings"));
152152

153153
Part* mutablePart = const_cast<Part*>(part);
154154
mutablePart->undoChangeProperty(Pid::HIDE_STAVES_WHEN_INDIVIDUALLY_EMPTY, PropertyValue(value));

src/instrumentsscene/view/instrumentsonscorelistmodel.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
#include "instrumentsonscorelistmodel.h"
2424

25-
#include "types/translatablestring.h"
26-
2725
#include "log.h"
2826

2927
using namespace muse;

src/instrumentsscene/view/roottreeitem.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "roottreeitem.h"
2323

2424
#include "parttreeitem.h"
25-
#include "stafftreeitem.h"
2625
#include "systemobjectslayertreeitem.h"
2726

2827
using namespace mu::instrumentsscene;

src/instrumentsscene/view/staffsettingsmodel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ void StaffSettingsModel::setHideWhenEmpty(int value)
237237
return;
238238
}
239239

240-
currentNotation()->undoStack()->prepareChanges(muse::TranslatableString("instruments", "Change staff settings"));
240+
currentNotation()->undoStack()->prepareChanges(muse::TranslatableString("undoableAction", "Change staff settings"));
241241

242242
Staff* mutableStaff = const_cast<Staff*>(staff);
243243
mutableStaff->undoChangeProperty(Pid::HIDE_WHEN_EMPTY, PropertyValue(static_cast<AutoOnOff>(value)));
@@ -272,7 +272,7 @@ void StaffSettingsModel::setShowIfEntireSystemEmpty(bool value)
272272
return;
273273
}
274274

275-
currentNotation()->undoStack()->prepareChanges(muse::TranslatableString("instruments", "Change staff settings"));
275+
currentNotation()->undoStack()->prepareChanges(muse::TranslatableString("undoableAction", "Change staff settings"));
276276

277277
Staff* mutableStaff = const_cast<Staff*>(staff);
278278
mutableStaff->undoChangeProperty(Pid::SHOW_IF_ENTIRE_SYSTEM_EMPTY, PropertyValue(value));

src/notation/qml/MuseScore/NotationScene/internal/EditStyle/ClefKeyTimeSigPage.qml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,15 @@ StyledFlickable {
346346
StyledTextLabel {
347347
Layout.preferredWidth: styleGroupBox.labelWidth
348348
horizontalAlignment: Text.AlignLeft
349-
text: qsTrc("notation/editstyle/timesignatures", "Gap between numbers\n(scaled):")
349+
text: qsTrc("notation/editstyle/timesignatures", "Gap between numbers (scaled):")
350+
wrapMode: Text.Wrap
350351
}
351352

352353
IncrementalPropertyControl {
353354
Layout.preferredWidth: 100
354355
decimals: 2
355356
step: 0.1
356-
measureUnitsSymbol: 'sp'
357+
measureUnitsSymbol: qsTrc("global", "sp")
357358

358359
currentValue: root.numDist.value
359360
onValueEdited: function(newValue) {

0 commit comments

Comments
 (0)