Simplify dynamic string handling and localization
Use Qt `.arg()` instead of substring replacement; Fully remove remnants of SDL renderers from translations; Restore platform-dependent pcap library name in the pcap error message, but use Npcap on Windows instead
This commit is contained in:
@@ -40,12 +40,6 @@ public:
|
||||
sourceText = "Begin trace\tCtrl+T";
|
||||
if (strcmp(sourceText, "End trace") == 0)
|
||||
sourceText = "End trace\tCtrl+T";
|
||||
if (strcmp(sourceText, "&Qt (Software)") == 0) {
|
||||
QString finalstr = QTranslator::translate("", "&SDL (Software)", disambiguation, n);
|
||||
finalstr.replace("SDL", "Qt");
|
||||
finalstr.replace("(&S)", "(&Q)");
|
||||
return finalstr;
|
||||
}
|
||||
QString finalstr = QTranslator::translate("", sourceText, disambiguation, n);
|
||||
#ifdef Q_OS_MACOS
|
||||
if (finalstr.contains('\t'))
|
||||
|
||||
Reference in New Issue
Block a user