Skip to content
Permalink
Browse files
Help viewer: Add nicer help not found message; reduce margins
  • Loading branch information
NathanW2 authored and alexbruy committed Feb 11, 2012
1 parent 78d2ee7 commit 49cdac0fe0bb8e9b98896545739cec7380e541a2
Showing with 11 additions and 3 deletions.
  1. +8 −3 src/helpviewer/qgshelpviewer.cpp
  2. +3 −0 src/helpviewer/qgshelpviewerbase.ui
@@ -126,6 +126,12 @@ void QgsHelpViewer::loadContext( const QString &contextId )
// get the help content and title from the localized file
QString helpContents;
QFile file( fullHelpPath );

QString missingError = tr("<h3>Opps! QGIS can't find help for this form.</h3>"
"The help file for %1 was not found for your language<br>"
"If you would like to create it, contact the QGIS development team"
).arg( contextId );

// check to see if the localized version exists
if ( !file.exists() )
{
@@ -136,13 +142,12 @@ void QgsHelpViewer::loadContext( const QString &contextId )
// translate this for us message
if ( !lang.contains( "en_" ) )
{
helpContents = "<i>" + tr( "This help file is not available in your language %1. If you would like to translate it, please contact the QGIS development team." ).arg( lang ) + "</i><hr />";
helpContents = missingError;
}
}
if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
{
helpContents = tr( "This help file does not exist for your language:<p><b>%1</b><p>If you would like to create it, contact the QGIS development team" )
.arg( fullHelpPath );
helpContents = missingError;
}
else
{
@@ -22,6 +22,9 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QWebView" name="webView">
<property name="url">

0 comments on commit 49cdac0

Please sign in to comment.