Skip to content
Permalink
Browse files

Help viewer: Add nicer help not found message; reduce margins

  • Loading branch information
NathanW2 committed Feb 1, 2012
1 parent 6e7610a commit 7dca9dd0c3fc053f25840ea83a62ff3508dee4ba
Showing with 11 additions and 3 deletions.
  1. +8 −3 src/helpviewer/qgshelpviewer.cpp
  2. +3 −0 src/helpviewer/qgshelpviewerbase.ui
@@ -127,6 +127,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() )
{
@@ -137,13 +143,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 7dca9dd

Please sign in to comment.
You can’t perform that action at this time.