Commit 8aa5a69b authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix some incorrect i18n calls

parent 5c22efbb
Pipeline #7379 passed with stage
in 18 minutes and 13 seconds
......@@ -133,7 +133,7 @@ void AssetPanel::showTransition(int tid, const std::shared_ptr<AssetParameterMod
clear();
QString transitionId = transitionModel->getAssetId();
QString transitionName = TransitionsRepository::get()->getName(transitionId);
m_assetTitle->setText(i18n("%1 properties").arg(i18n(transitionName.toUtf8().data())));
m_assetTitle->setText(i18n("%1 properties", i18n(transitionName.toUtf8().data())));
m_transitionWidget->setVisible(true);
m_timelineButton->setVisible(true);
m_enableStackButton->setVisible(false);
......
......@@ -37,9 +37,11 @@ AssetCommand::AssetCommand(const std::shared_ptr<AssetParameterModel> &model, co
m_name = m_model->data(index, AssetParameterModel::NameRole).toString();
const QString id = model->getAssetId();
if (EffectsRepository::get()->exists(id)) {
setText(i18n("Edit %1").arg(i18n(EffectsRepository::get()->getName(id).toUtf8().data())));
QString effectName = EffectsRepository::get()->getName(id);
setText(i18n("Edit %1", i18n(effectName.toUtf8().data())));
} else if (TransitionsRepository::get()->exists(id)) {
setText(i18n("Edit %1").arg(i18n(TransitionsRepository::get()->getName(id).toUtf8().data())));
QString compoName = TransitionsRepository::get()->getName(id);
setText(i18n("Edit %1", i18n(compoName.toUtf8().data())));
}
QVariant previousVal = m_model->data(index, AssetParameterModel::ValueRole);
m_oldValue = previousVal.type() == QVariant::Double ? locale.toString(previousVal.toDouble()) : previousVal.toString();
......@@ -86,9 +88,11 @@ AssetMultiCommand::AssetMultiCommand(const std::shared_ptr<AssetParameterModel>
m_name = m_model->data(indexes.first(), AssetParameterModel::NameRole).toString();
const QString id = model->getAssetId();
if (EffectsRepository::get()->exists(id)) {
setText(i18n("Edit %1").arg(i18n(EffectsRepository::get()->getName(id).toUtf8().data())));
QString effectName = EffectsRepository::get()->getName(id);
setText(i18n("Edit %1", i18n(effectName.toUtf8().data())));
} else if (TransitionsRepository::get()->exists(id)) {
setText(i18n("Edit %1").arg(i18n(TransitionsRepository::get()->getName(id).toUtf8().data())));
QString compoName = TransitionsRepository::get()->getName(id);
setText(i18n("Edit %1", i18n(compoName.toUtf8().data())));
}
for (QModelIndex ix : m_indexes) {
QVariant previousVal = m_model->data(ix, AssetParameterModel::ValueRole);
......@@ -146,9 +150,11 @@ AssetKeyframeCommand::AssetKeyframeCommand(const std::shared_ptr<AssetParameterM
{
const QString id = model->getAssetId();
if (EffectsRepository::get()->exists(id)) {
setText(i18n("Edit %1 keyframe", EffectsRepository::get()->getName(id)));
QString effectName = EffectsRepository::get()->getName(id);
setText(i18n("Edit %1 keyframe", i18n(effectName.toUtf8().data())));
} else if (TransitionsRepository::get()->exists(id)) {
setText(i18n("Edit %1 keyframe", TransitionsRepository::get()->getName(id)));
QString compoName = TransitionsRepository::get()->getName(id);
setText(i18n("Edit %1 keyframe", i18n(compoName.toUtf8().data())));
}
m_oldValue = m_model->getKeyframeModel()->getKeyModel(m_index)->getInterpolatedValue(m_pos);
}
......@@ -188,9 +194,11 @@ AssetUpdateCommand::AssetUpdateCommand(const std::shared_ptr<AssetParameterModel
{
const QString id = model->getAssetId();
if (EffectsRepository::get()->exists(id)) {
setText(i18n("Update %1", EffectsRepository::get()->getName(id)));
QString effectName = EffectsRepository::get()->getName(id);
setText(i18n("Update %1", i18n(effectName.toUtf8().data())));
} else if (TransitionsRepository::get()->exists(id)) {
setText(i18n("Update %1", TransitionsRepository::get()->getName(id)));
QString compoName = TransitionsRepository::get()->getName(id);
setText(i18n("Update %1", i18n(compoName.toUtf8().data())));
}
m_oldValue = m_model->getAllParameters();
}
......
......@@ -475,7 +475,7 @@ bool EffectStackModel::appendEffect(const QString &effectId, bool makeCurrent)
update();
PUSH_LAMBDA(update, redo);
PUSH_LAMBDA(update, undo);
PUSH_UNDO(undo, redo, i18n("Add effect %1").arg(i18n(effectName.toUtf8().data())));
PUSH_UNDO(undo, redo, i18n("Add effect %1", i18n(effectName.toUtf8().data())));
} else if (makeCurrent) {
if (auto srvPtr = m_masterService.lock()) {
srvPtr->set("kdenlive:activeeffect", currentActive);
......
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