Skip to content

Commit 045e7cb

Browse files
authored
Patch: introduce proper plural form strings and fix typo (#1622)
* fix typo in fisheye UI “othographic” → “orthographic” * subtitles: use builtin plural support Currently, the source code on subtitles either assumes subtitle items to be always in plural form or tries determines plural form by itself. This commit fixes that by using builtin `QObject::tr` plural support. * glow: fix typo “shne” → “shine” * fisheye: fix typo “Seperate” → “Separate” * mainwindow: remove incidental `notr`
1 parent 5a04984 commit 045e7cb

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/commands/subtitlecommands.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ OverwriteSubtitlesCommand::OverwriteSubtitlesCommand(SubtitlesModel &model, int
102102
if (m_newSubtitles.size() == 1) {
103103
setText(QObject::tr("Add subtitle"));
104104
} else {
105-
setText(QObject::tr("Add %1 subtitles").arg(m_newSubtitles.size()));
105+
setText(QObject::tr("Add %n subtitles", nullptr, m_newSubtitles.size()));
106106
}
107107

108108
if (m_newSubtitles.size() <= 0) {
@@ -155,7 +155,7 @@ RemoveSubtitlesCommand::RemoveSubtitlesCommand(SubtitlesModel &model, int trackI
155155
if (m_items.size() == 1) {
156156
setText(QObject::tr("Remove subtitle"));
157157
} else {
158-
setText(QObject::tr("Remove %1 subtitles").arg(m_items.size()));
158+
setText(QObject::tr("Remove %n subtitles", nullptr, m_items.size()));
159159
}
160160
}
161161

@@ -288,7 +288,7 @@ MoveSubtitlesCommand::MoveSubtitlesCommand(SubtitlesModel &model, int trackIndex
288288
if (m_oldSubtitles.size() == 1) {
289289
setText(QObject::tr("Move subtitle"));
290290
} else {
291-
setText(QObject::tr("Move %1 subtitles").arg(m_oldSubtitles.size()));
291+
setText(QObject::tr("Move %n subtitles", nullptr, m_oldSubtitles.size()));
292292
}
293293
// Create a list of subtitles with the new times
294294
int64_t delta = msTime - m_oldSubtitles[0].start;

src/docks/subtitlesdock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ void SubtitlesDock::importSrtFromFile(const QString &srtPath, const QString &tra
495495

496496
m_model->importSubtitlesToNewTrack(track, items);
497497

498-
MAIN.showStatusMessage(QObject::tr("Imported %1 subtitle items").arg(items.size()));
498+
MAIN.showStatusMessage(QObject::tr("Imported %1 subtitle item(s)", nullptr, items.size()));
499499
}
500500

501501
void SubtitlesDock::addSubtitleTrack()
@@ -624,7 +624,7 @@ void SubtitlesDock::importSubtitles()
624624
}
625625
ensureTrackExists();
626626
m_model->importSubtitles(m_trackCombo->currentIndex(), msTime, items);
627-
MAIN.showStatusMessage(QObject::tr("Imported %1 subtitle items").arg(items.size()));
627+
MAIN.showStatusMessage(QObject::tr("Imported %n subtitle item(s)", nullptr, items.size()));
628628
}
629629

630630
void SubtitlesDock::exportSubtitles()

src/mainwindow.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@
692692
<bool>true</bool>
693693
</property>
694694
<property name="text">
695-
<string notr="true">Lanczos (best)</string>
695+
<string>Lanczos (best)</string>
696696
</property>
697697
</action>
698698
<action name="actionProfileAutomatic">

src/qml/filters/fisheye/ui.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ Item {
621621
}
622622

623623
ListElement {
624-
text: qsTr('Ortographic')
624+
text: qsTr('Orthographic')
625625
value: 0.333
626626
}
627627

@@ -854,7 +854,7 @@ Item {
854854
visible: scaleYShowSlider
855855

856856
Shotcut.HoverTip {
857-
text: qsTr('Seperate Y scale')
857+
text: qsTr('Separate Y scale')
858858
}
859859
}
860860

src/qml/filters/glow/meta_movit.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.shotcut.qml
44
Metadata {
55
type: Metadata.Filter
66
name: qsTr("Glow")
7-
keywords: qsTr('shne blur', 'search keywords for the Glow video filter') + ' glow gpu'
7+
keywords: qsTr('shine blur', 'search keywords for the Glow video filter') + ' glow gpu'
88
mlt_service: "movit.glow"
99
needsGPU: true
1010
qml: "ui_movit.qml"

0 commit comments

Comments
 (0)