Fix internationalization of "txt File" in QFileDialog
Some languages (for example Finnish) need to customize punctuation and capitalization in this case. Change-Id: I9720626263f061adc7972bff18bcb59f2f2b382f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
e276fc11fa
commit
565ee701a0
@ -368,8 +368,10 @@ QString QFileIconProvider::type(const QFileInfo &info) const
|
|||||||
if (info.isRoot())
|
if (info.isRoot())
|
||||||
return QApplication::translate("QFileDialog", "Drive");
|
return QApplication::translate("QFileDialog", "Drive");
|
||||||
if (info.isFile()) {
|
if (info.isFile()) {
|
||||||
if (!info.suffix().isEmpty())
|
if (!info.suffix().isEmpty()) {
|
||||||
return info.suffix() + QLatin1Char(' ') + QApplication::translate("QFileDialog", "File");
|
//: %1 is a file name suffix, for example txt
|
||||||
|
return QApplication::translate("QFileDialog", "%1 File").arg(info.suffix());
|
||||||
|
}
|
||||||
return QApplication::translate("QFileDialog", "File");
|
return QApplication::translate("QFileDialog", "File");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user