aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-07-23 18:52:12 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-07-23 18:52:12 +0200
commit1bd52867fb463a4b34cd2c4a9b9ace8b570e18b4 (patch)
treef4ed6334e7c6e7bb5c2b7250b8a61072332dd3b9 /Zotlabs
parent898fb4f80039bf1ec920f931d4e8c00162bf4ef8 (diff)
downloadvolse-hubzilla-1bd52867fb463a4b34cd2c4a9b9ace8b570e18b4.tar.gz
volse-hubzilla-1bd52867fb463a4b34cd2c4a9b9ace8b570e18b4.tar.bz2
volse-hubzilla-1bd52867fb463a4b34cd2c4a9b9ace8b570e18b4.zip
Fallback to english help topic if localized topic is not found.
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Traits/HelpHelperTrait.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Traits/HelpHelperTrait.php b/Zotlabs/Lib/Traits/HelpHelperTrait.php
index b7711bbd5..9e4fefa4b 100644
--- a/Zotlabs/Lib/Traits/HelpHelperTrait.php
+++ b/Zotlabs/Lib/Traits/HelpHelperTrait.php
@@ -53,10 +53,10 @@ trait HelpHelperTrait {
// Use local variable until we can use trait constants.
$valid_file_ext = ['md', 'bb', 'html'];
- $base_path = "doc/{$lang}/${base_path}";
+ $base_path_with_lang = "doc/{$lang}/${base_path}";
foreach ($valid_file_ext as $ext) {
- $path = "{$base_path}.{$ext}";
+ $path = "{$base_path_with_lang}.{$ext}";
if (file_exists($path)) {
$this->file_name = $path;
$this->file_type = $ext;
@@ -64,5 +64,9 @@ trait HelpHelperTrait {
break;
}
}
+
+ if (empty($this->file_name) && $lang !== 'en') {
+ $this->find_help_file($base_path, 'en');
+ }
}
}