Change function QETApp::elementTranslatedInfoKey

Use the function QETInformation::translatedInfoKey(const QString &info)
instead of QETApp::elementTranslatedInfoKey(const QString &info).

The final goal is to remove all information from the QETApp and use
instea QETInformation who is dedicated to this
This commit is contained in:
Claveau Joshua
2020-11-08 19:16:02 +01:00
parent 7882c5734a
commit 6f60156e00
10 changed files with 18 additions and 42 deletions

View File

@@ -412,37 +412,6 @@ QStringList QETApp::elementInfoKeys()
return info_list;
}
/**
@brief ElementsProperties::translatedInfo
Return the translated information key given by info
If info don't match, return an empty string
@param info the key to be translated
@return
*/
QString QETApp::elementTranslatedInfoKey(const QString &info)
{
if (info == "formula") return tr("Formule du label");
else if (info == "label") return tr("Label");
else if (info == "plant") return tr("Installation");
else if (info == "location") return tr("Localisation");
else if (info == "comment") return tr("Commentaire");
else if (info == "function") return tr("Fonction");
else if (info == "auxiliary1") return tr("Bloc auxiliaire 1");
else if (info == "auxiliary2") return tr("Bloc auxiliaire 2");
else if (info == "description") return tr("Description textuelle");
else if (info == "designation") return tr("Numéro d'article");
else if (info == "manufacturer") return tr("Fabricant");
else if (info == "manufacturer_reference") return tr("Numéro de commande");
else if (info == "machine_manufacturer_reference") return tr("Numéro interne");
else if (info == "supplier") return tr("Fournisseur");
else if (info == "quantity") return tr("Quantité");
else if (info == "unity") return tr("Unité");
else return QString();
}
/**
@brief QETApp::elementInfoToVar
@param info