diff options
author | Andrew Manning <andrewmanning@grid.reticu.li> | 2017-08-23 03:33:03 +0000 |
---|---|---|
committer | Andrew Manning <andrewmanning@grid.reticu.li> | 2017-08-23 03:33:03 +0000 |
commit | 6c388575022cc10f28ed99e8e414fbc76a67bb00 (patch) | |
tree | 49bc3d01e54023855ae95a124efda3d822ab576a /Zotlabs | |
parent | 9d5b6858ea627b5eb6115cacd870ef0277f87b2a (diff) | |
download | volse-hubzilla-6c388575022cc10f28ed99e8e414fbc76a67bb00.tar.gz volse-hubzilla-6c388575022cc10f28ed99e8e414fbc76a67bb00.tar.bz2 volse-hubzilla-6c388575022cc10f28ed99e8e414fbc76a67bb00.zip |
Repaired and extended support for help page translations including table of contents files at the top level. Moved help module javascript to mod_help.js.
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Widget/Helpindex.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Zotlabs/Widget/Helpindex.php b/Zotlabs/Widget/Helpindex.php index f23e73e75..8299cf16a 100644 --- a/Zotlabs/Widget/Helpindex.php +++ b/Zotlabs/Widget/Helpindex.php @@ -9,14 +9,22 @@ class Helpindex { $o .= '<div class="widget">'; $level_0 = get_help_content('sitetoc'); - if(! $level_0) - $level_0 = get_help_content('toc'); + if(! $level_0) { + $path = 'toc'; + $x = determine_help_language(); + $lang = $x['language']; + if($lang !== 'en') { + $path = $lang . '/toc'; + } + $level_0 = get_help_content($path); + } $level_0 = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$level_0); $levels = array(); + // TODO: Implement support for translations in hierarchical table of content files if(argc() > 2) { $path = ''; for($x = 1; $x < argc(); $x ++) { |