Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Fix some UI strings todo

parent 2b4487d7
......@@ -491,8 +491,7 @@ void KeyframeModelList::checkConsistency()
for (auto &time : fullList) {
if (!list.contains(time)) {
qDebug()<<" = = = \n\n = = = = \n\nWARNING; MISSING KF DETECTED AT: "<<time.seconds()<<"\n\n= = = \n\n= = =";
//TODO: add better error message after string freeze
pCore->displayMessage(i18n("Keyframe interpolation"), ErrorMessage);
pCore->displayMessage(i18n("Missing keyframe detected at %1, automatically re-added", time.seconds()), ErrorMessage);
QVariant missingVal = param.second->getInterpolatedValue(time);
local_update = param.second->addKeyframe_lambda(time, type, missingVal, false);
local_update();
......
......@@ -26,6 +26,7 @@
#include "klocalizedstring.h"
#include "profiles/profilemodel.hpp"
#include <QDebug>
#include <QDir>
#include <QJsonArray>
#include <QJsonObject>
#include <QLocale>
......@@ -661,7 +662,6 @@ void AssetParameterModel::deletePreset(const QString &presetFile, const QString
QByteArray saveData = loadFile.readAll();
QJsonDocument loadDoc(QJsonDocument::fromJson(saveData));
if (loadDoc.isArray()) {
qDebug() << " * * ** JSON IS AN ARRAY, DELETING: " << presetName;
array = loadDoc.array();
QList<int> toDelete;
for (int i = 0; i < array.size(); i++) {
......@@ -684,15 +684,21 @@ void AssetParameterModel::deletePreset(const QString &presetFile, const QString
array.append(obj);
}
loadFile.close();
} else if (!loadFile.open(QIODevice::ReadWrite)) {
// TODO: error message
}
}
if (!loadFile.open(QIODevice::WriteOnly)) {
// TODO: error message
pCore->displayMessage(i18n("Cannot open preset file %1", presetFile), ErrorMessage);
return;
}
if (array.isEmpty()) {
QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QStringLiteral("/effects/presets/"));
if (dir.exists(presetFile)) {
// Ensure we don't delete an unwanted file
loadFile.remove();
}
} else {
loadFile.write(QJsonDocument(array).toJson());
}
//TODO: delete file if there are no more presets in it
loadFile.write(QJsonDocument(array).toJson());
}
void AssetParameterModel::savePreset(const QString &presetFile, const QString &presetName)
......@@ -725,12 +731,11 @@ void AssetParameterModel::savePreset(const QString &presetFile, const QString &p
array.append(obj);
}
loadFile.close();
} else if (!loadFile.open(QIODevice::ReadWrite)) {
// TODO: error message
}
}
if (!loadFile.open(QIODevice::WriteOnly)) {
// TODO: error message
pCore->displayMessage(i18n("Cannot open preset file %1", presetFile), ErrorMessage);
return;
}
object[presetName] = doc.array();
array.append(object);
......
......@@ -55,8 +55,7 @@ CutClipJob::CutClipJob(const QString &binId, const QString sourcePath, GenTime i
const QString CutClipJob::getDescription() const
{
//TODO: add better description after string freeze
return i18n("Extract Zone");
return i18n("Extract Clip Zone");
}
// static
......
......@@ -44,7 +44,7 @@ FilterClipJob::FilterClipJob(const QString &binId, int cid, std::weak_ptr<AssetP
const QString FilterClipJob::getDescription() const
{
//TODO: add better description after string freeze
return i18n("Analyse clip");
return i18n("Apply Filter on Clip");
}
void FilterClipJob::configureConsumer()
......
......@@ -47,7 +47,7 @@ TranscodeJob::TranscodeJob(const QString &binId, QString params)
const QString TranscodeJob::getDescription() const
{
//TODO: add better description after string freeze
return i18n("Transcode");
return i18n("Transcode Clip");
}
bool TranscodeJob::startJob()
......
......@@ -365,7 +365,7 @@ void LibraryWidget::slotAddFolder()
}
QDir dir(parentFolder);
if (dir.exists(name)) {
// TODO: warn user
showMessage(i18n("Folder %1 already exists", name));
return;
}
if (!dir.mkdir(name)) {
......
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