Fix i18n calls

parent ac551996
......@@ -230,7 +230,7 @@ ClipProperties::ClipProperties(DocClipBase *clip, Timecode tc, double fps, QWidg
m_proxyContainer = new QFrame();
m_proxyContainer->setFrameShape(QFrame::NoFrame);
QHBoxLayout *l = new QHBoxLayout;
l->addWidget(new QLabel(i18n("Proxy clip: %1").arg(KIO::convertSize(f.size()))));
l->addWidget(new QLabel(i18n("Proxy clip: %1", KIO::convertSize(f.size()))));
l->addStretch(5);
QPushButton *pb = new QPushButton(i18n("Delete proxy"));
l->addWidget(pb);
......
......@@ -6252,7 +6252,7 @@ void CustomTrackView::alignAudio()
if (counter == 0) {
emit displayMessage(i18n("No audio clips selected."), ErrorMessage);
} else {
emit displayMessage(i18n("Auto-aligned %1 clips.").arg(counter), InformationMessage);
emit displayMessage(i18n("Auto-aligned %1 clips.", counter), InformationMessage);
}
}
......
......@@ -103,12 +103,12 @@ void EffectStackView2::slotClipItemSelected(ClipItem* c)
if (c) {
QString cname = m_clipref->clipName();
if (cname.length() > 30) {
m_ui.checkAll->setToolTip(i18n("Effects for %1").arg(cname));
m_ui.checkAll->setToolTip(i18n("Effects for %1", cname));
cname.truncate(27);
m_ui.checkAll->setText(i18n("Effects for %1").arg(cname) + "...");
m_ui.checkAll->setText(i18n("Effects for %1", cname) + "...");
} else {
m_ui.checkAll->setToolTip(QString());
m_ui.checkAll->setText(i18n("Effects for %1").arg(cname));
m_ui.checkAll->setText(i18n("Effects for %1", cname));
}
m_ui.checkAll->setEnabled(true);
QString size = c->baseClip()->getProperty("frame_size");
......@@ -140,7 +140,7 @@ void EffectStackView2::slotTrackItemSelected(int ix, const TrackInfo info)
m_trackInfo = info;
setEnabled(true);
m_ui.checkAll->setToolTip(QString());
m_ui.checkAll->setText(i18n("Effects for track %1").arg(info.trackName.isEmpty() ? QString::number(ix) : info.trackName));
m_ui.checkAll->setText(i18n("Effects for track %1", info.trackName.isEmpty() ? QString::number(ix) : info.trackName));
m_ui.checkAll->setEnabled(true);
m_trackindex = ix;
setupListView();
......
......@@ -798,7 +798,7 @@ void KdenliveDoc::setProjectFolder(KUrl url)
KStandardDirs::makeDir(url.path());
KStandardDirs::makeDir(url.path(KUrl::AddTrailingSlash) + "titles/");
KStandardDirs::makeDir(url.path(KUrl::AddTrailingSlash) + "thumbs/");
if (KMessageBox::questionYesNo(kapp->activeWindow(), i18n("You have changed the project folder. Do you want to copy the cached data from %1 to the new folder %2?").arg(m_projectFolder.path(), url.path())) == KMessageBox::Yes) moveProjectData(url);
if (KMessageBox::questionYesNo(kapp->activeWindow(), i18n("You have changed the project folder. Do you want to copy the cached data from %1 to the new folder %2?", m_projectFolder.path(), url.path())) == KMessageBox::Yes) moveProjectData(url);
m_projectFolder = url;
updateProjectFolderPlacesEntry();
......
......@@ -399,11 +399,11 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
KActionCategory *layoutActions = new KActionCategory(i18n("Layouts"), actionCollection());
m_loadLayout = new KSelectAction(i18n("Load Layout"), actionCollection());
for (int i = 1; i < 5; i++) {
KAction *load = new KAction(KIcon(), i18n("Layout %1").arg(i), this);
KAction *load = new KAction(KIcon(), i18n("Layout %1", i), this);
load->setData("_" + QString::number(i));
layoutActions->addAction("load_layout" + QString::number(i), load);
m_loadLayout->addAction(load);
KAction *save = new KAction(KIcon(), i18n("Save As Layout %1").arg(i), this);
KAction *save = new KAction(KIcon(), i18n("Save As Layout %1", i), this);
save->setData("_" + QString::number(i));
layoutActions->addAction("save_layout" + QString::number(i), save);
}
......@@ -698,7 +698,7 @@ bool MainWindow::queryClose()
if (m_activeDocument->url().fileName().isEmpty())
message = i18n("Save changes to document?");
else
message = i18n("The project <b>\"%1\"</b> has been changed.\nDo you want to save your changes?").arg(m_activeDocument->url().fileName());
message = i18n("The project <b>\"%1\"</b> has been changed.\nDo you want to save your changes?", m_activeDocument->url().fileName());
switch (KMessageBox::warningYesNoCancel(this, message)) {
case KMessageBox::Yes :
// save document here. If saving fails, return false;
......@@ -1736,7 +1736,7 @@ void MainWindow::loadLayouts()
}
for (int j = 0; j < saveActions.count(); j++) {
if (saveActions.at(j)->data().toString().endsWith("_" + QString::number(i))) {
saveActions[j]->setText(i18n("Save as %1").arg(layoutName));
saveActions[j]->setText(i18n("Save as %1", layoutName));
saveActions[j]->setData(key);
break;
}
......@@ -1919,7 +1919,7 @@ bool MainWindow::closeCurrentDocument(bool saveChanges)
if (m_activeDocument->url().fileName().isEmpty())
message = i18n("Save changes to document?");
else
message = i18n("The project <b>\"%1\"</b> has been changed.\nDo you want to save your changes?").arg(m_activeDocument->url().fileName());
message = i18n("The project <b>\"%1\"</b> has been changed.\nDo you want to save your changes?", m_activeDocument->url().fileName());
switch (KMessageBox::warningYesNoCancel(this, message)) {
case KMessageBox::Yes :
// save document here. If saving fails, return false;
......@@ -3108,7 +3108,7 @@ void MainWindow::slotAddVideoEffect(QAction *result)
else
effect = customEffects.getEffectByTag(info.at(0), info.at(1));
if (!effect.isNull()) slotAddEffect(effect);
else m_messageLabel->setMessage(i18n("Cannot find effect %1 / %2").arg(info.at(0)).arg(info.at(1)), ErrorMessage);
else m_messageLabel->setMessage(i18n("Cannot find effect %1 / %2", info.at(0), info.at(1)), ErrorMessage);
}
......@@ -4108,12 +4108,12 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS
// Do save scenelist
QFile file(playlistPath);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
m_messageLabel->setMessage(i18n("Cannot write to file %1").arg(playlistPath), ErrorMessage);
m_messageLabel->setMessage(i18n("Cannot write to file %1", playlistPath), ErrorMessage);
return;
}
file.write(playlistContent.toUtf8());
if (file.error() != QFile::NoError) {
m_messageLabel->setMessage(i18n("Cannot write to file %1").arg(playlistPath), ErrorMessage);
m_messageLabel->setMessage(i18n("Cannot write to file %1", playlistPath), ErrorMessage);
file.close();
return;
}
......
......@@ -384,7 +384,7 @@ QImage AudioSpectrum::renderHUD(uint)
} else {
x = leftDist + m_innerScopeRect.width();
davinci.drawLine(x, topDist, x, topDist + m_innerScopeRect.height()+6);
davinci.drawText(x-10, y, i18n("%1 kHz").arg((double)m_freqMax/1000, 0, 'f', 1));
davinci.drawText(x-10, y, i18n("%1 kHz", QString("%1").arg((double)m_freqMax/1000, 0, 'f', 1)));
}
if (hz > 0) {
......
......@@ -260,7 +260,7 @@ QImage Spectrogram::renderHUD(uint)
&& mouseX < m_innerScopeRect.width() && mouseX >= 0;
davinci.drawLine(x, topDist, x, topDist + m_innerScopeRect.height()+6);
if (!hideText) {
davinci.drawText(x-10, y, i18n("%1 kHz").arg((double)m_freqMax/1000, 0, 'f', 1));
davinci.drawText(x-10, y, i18n("%1 kHz", QString("%1").arg((double)m_freqMax/1000, 0, 'f', 1)));
}
}
......@@ -269,8 +269,8 @@ QImage Spectrogram::renderHUD(uint)
davinci.setPen(AbstractScopeWidget::penThin);
x = leftDist + mouseX;
davinci.drawLine(x, topDist, x, topDist + m_innerScopeRect.height()+6);
davinci.drawText(x-10, y, i18n("%1 kHz")
.arg((double)(m_mousePos.x()-m_innerScopeRect.left())/m_innerScopeRect.width() * m_freqMax/1000, 0, 'f', 2));
davinci.drawText(x-10, y, i18n("%1 kHz", QString("%1")
.arg((double)(m_mousePos.x()-m_innerScopeRect.left())/m_innerScopeRect.width() * m_freqMax/1000, 0, 'f', 2)));
}
// Draw the dB brightness scale
......@@ -426,7 +426,7 @@ QImage Spectrogram::renderAudioScope(uint, const QVector<int16_t> audioFrame, co
for (QList< QVector<float> >::iterator it = m_fftHistory.begin(); it != m_fftHistory.end(); it++) {
storedBytes += (*it).size() * sizeof((*it)[0]);
}
qDebug() << QString("Total storage used: %1 kB").arg((double)storedBytes/1000, 0, 'f', 2);
qDebug() << QString("Total storage used: %1 kB", QString("%1").arg((double)storedBytes/1000, 0, 'f', 2));
#endif
m_fftHistoryImg = spectrum;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment