Add translatable attribute to the app_name string to fix a lint warning

Incomplete translation
----------------------
If an application has more than one locale, then all the strings
declared in one language should also be translated in all other languages.

If the string should not be translated, you can add the attribute
translatable="false" on the <string> element, or you can define all
your non-translatable strings in a resource file called  donottranslate.xml.
Or, you can ignore the issue with a tools:ignore="MissingTranslation" attribute.

Change-Id: I6f93f34fc36a06de9a0b687a93cf58df941dbbcb
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
Lars Schmertmann 2019-01-10 15:11:18 +01:00 committed by Lars Schmertmann
parent ba58776a79
commit 130bede619

View File

@ -1261,7 +1261,7 @@ bool updateStringsXml(const Options &options)
fprintf(stderr, "Can't open %s for writing.\n", qPrintable(fileName));
return false;
}
file.write(QByteArray("<?xml version='1.0' encoding='utf-8'?><resources><string name=\"app_name\">")
file.write(QByteArray("<?xml version='1.0' encoding='utf-8'?><resources><string name=\"app_name\" translatable=\"false\">")
.append(QFileInfo(options.applicationBinary).baseName().mid(sizeof("lib") - 1).toLatin1())
.append("</string></resources>\n"));
return true;