Make model checker warning easier to translate

It's often more clear to have a variable name in there so that the translator knows what'll be filled in for the variable.

Contributes to issue CURA-4557.
This commit is contained in:
Ruben D 2018-03-22 00:20:10 +01:00
parent c7ba9f9e37
commit ab7f10ea52
No known key found for this signature in database
GPG key ID: 6B42C9465E304A62

View file

@ -64,11 +64,11 @@ class ModelChecker(QObject, Extension):
def showWarningMessage(self, warning_nodes): def showWarningMessage(self, warning_nodes):
caution_message = Message(catalog.i18nc( caution_message = Message(catalog.i18nc(
"@info:status", "@info:status",
"Some models may not be printed optimal due to object size and chosen material [%s].\n" "Some models may not be printed optimal due to object size and chosen material for models: {model_names}.\n"
"Tips that may be useful to improve the print quality:\n" "Tips that may be useful to improve the print quality:\n"
"1) Use rounded corners\n" "1) Use rounded corners\n"
"2) Turn the fan off (only if the are no tiny details on the model)\n" "2) Turn the fan off (only if the are no tiny details on the model)\n"
"3) Use a different material") % ", ".join([n.getName() for n in warning_nodes]), "3) Use a different material").format(model_names = ", ".join([n.getName() for n in warning_nodes])),
lifetime = 0, lifetime = 0,
title = catalog.i18nc("@info:title", "Model Checker Warning")) title = catalog.i18nc("@info:title", "Model Checker Warning"))
caution_message.show() caution_message.show()