diff --git a/public/js/ff/help.js b/public/js/ff/help.js index 9e7280b1c0..f7c3933c2b 100644 --- a/public/js/ff/help.js +++ b/public/js/ff/help.js @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with Firefly III. If not, see . */ -/** global: token */ +/** global: token, helpPageTitle, noHelpForPage,noHelpForPageTitle */ $(function () { "use strict"; $('#help').click(showHelp); @@ -35,12 +35,12 @@ function showHelp(e) { } $('#helpBody').html(''); $('#helpModal').modal('show'); - $('#helpTitle').html('Help for this page'); - $.getJSON('help/' + encodeURI(route)).done(function (data) { + $('#helpTitle').html(helpPageTitle); + $.getJSON('helpx/' + encodeURI(route)).done(function (data) { $('#helpBody').html(data.html); }).fail(function () { - $('#helpBody').html('

No help text could be found.

'); - $('#helpTitle').html('Apologies'); + $('#helpBody').html('

' + noHelpForPage + '

'); + $('#helpTitle').html(noHelpForPageTitle); }); $('#reenableGuidance').unbind('click').click(function () { enableGuidance(route, specialPage); diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 2dc625165c..f2c908583a 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -60,6 +60,9 @@ return [ 'flash_error_multiple' => 'There is one error|There are :count errors', 'net_worth' => 'Net worth', 'route_has_no_help' => 'There is no help for this route.', + 'help_for_this_page' => 'Help for this page', + 'no_help_could_be_found' => 'No help text could be found.', + 'no_help_title' => 'Apologies, an error occurred.', 'two_factor_welcome' => 'Hello, :user!', 'two_factor_enter_code' => 'To continue, please enter your two factor authentication code. Your application can generate it for you.', 'two_factor_code_here' => 'Enter code here', diff --git a/resources/views/layout/default.twig b/resources/views/layout/default.twig index 4e3cfa0de4..683f1b5c9a 100644 --- a/resources/views/layout/default.twig +++ b/resources/views/layout/default.twig @@ -188,6 +188,11 @@ + {% if not shownDemo %}