Commit a438a5c3 authored by Yuri Chornoivan's avatar Yuri Chornoivan

Fix XML translation for Generators

parent 9f353c19
Pipeline #4265 passed with stage
in 23 minutes and 1 second
......@@ -2,7 +2,7 @@
kdenlive_subdirs="plugins renderer data src src/ui"
$EXTRACTRC --tag=name --tag=description --tag=label --tag=comment --tag=paramlistdisplay data/effects/*.xml data/kdenliveeffectscategory.rc >> rc.cpp
$EXTRACTRC --tag=name --tag=description --tag=label --tag=comment --tag=paramlistdisplay data/effects/*.xml data/generators/*.xml data/kdenliveeffectscategory.rc >> rc.cpp
$EXTRACTRC `find $kdenlive_subdirs -name \*.rc -a ! -name encodingprofiles.rc -a ! -name camcorderfilters.rc -o -name \*.ui` >> rc.cpp
$XGETTEXT `find $kdenlive_subdirs -name \*.cpp -o -name \*.h -o -name \*.qml` *.cpp -o $podir/kdenlive.pot
......
......@@ -113,7 +113,7 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
continue;
}
currentRow.value = value;
QString title = currentParameter.firstChildElement(QStringLiteral("name")).text();
QString title = i18n(currentParameter.firstChildElement(QStringLiteral("name")).text().toUtf8().data());
currentRow.name = title.isEmpty() ? name : title;
m_params[name] = currentRow;
m_rows.push_back(name);
......
......@@ -58,7 +58,7 @@ Generators::Generators(Monitor *monitor, const QString &path, QWidget *parent)
QDomElement base = doc.documentElement();
if (base.tagName() == QLatin1String("generator")) {
QString generatorTag = base.attribute(QStringLiteral("tag"));
setWindowTitle(base.firstChildElement(QStringLiteral("name")).text());
setWindowTitle(i18n(base.firstChildElement(QStringLiteral("name")).text().toUtf8().data()));
auto *lay = new QVBoxLayout(this);
m_preview = new QLabel;
m_preview->setMinimumSize(1, 1);
......@@ -127,7 +127,7 @@ void Generators::getGenerators(const QStringList &producers, QMenu *menu)
for (const QString &fname : filesnames) {
QPair<QString, QString> result = parseGenerator(directory.absoluteFilePath(fname), producers);
if (!result.first.isEmpty()) {
QAction *action = menu->addAction(result.first);
QAction *action = menu->addAction(i18n(result.first.toUtf8().data()));
action->setData(result.second);
}
}
......
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