r21038 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 25 12:48:14 UTC 2016


Author: jghali
Date: Thu Feb 25 12:48:14 2016
New Revision: 21038

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21038
Log:
fix fallback to english in help browser when current language is not available

Modified:
    trunk/Scribus/scribus/ui/helpbrowser.cpp

Modified: trunk/Scribus/scribus/ui/helpbrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21038&path=/trunk/Scribus/scribus/ui/helpbrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/helpbrowser.cpp	(original)
+++ trunk/Scribus/scribus/ui/helpbrowser.cpp	Thu Feb 25 12:48:14 2016
@@ -577,8 +577,7 @@
 					language=language.left(2);
 					toLoad = QDir::toNativeSeparators(baseHelpMenuFile3);
 				}
-				else
-				if (altfi3.exists())
+				else if (altfi3.exists())
 				{
 					language=language.left(2);
 					toLoad = QDir::toNativeSeparators(altHelpMenuFile3);
@@ -588,7 +587,10 @@
 					//Fall back to English
 					sDebug("Scribus help in your selected language does not exist, trying English. Otherwise, please visit http://docs.scribus.net.");
 					language="en";
-					toLoad = QDir::toNativeSeparators(baseHelpDir + language + "/menu.xml");
+					if (QFile::exists(baseHelpDir + language + "/menu.xml"))
+						toLoad = QDir::toNativeSeparators(baseHelpDir + language + "/menu.xml");
+					else
+						toLoad = QDir::toNativeSeparators(installHelpDir + language + "/menu.xml");
 				}
 			}
 			else




More information about the scribus-commit mailing list