aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-07-24 11:57:41 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-07-24 11:57:41 +0200
commitd3093dce1bfd4685d5e11f828689630862f77bda (patch)
tree81f99a0c0f29ccc6c1a1bdd6615b1f93556b2028
parent61f9ad8274d662a056aff05407771fb450a2ab35 (diff)
downloadvolse-hubzilla-d3093dce1bfd4685d5e11f828689630862f77bda.tar.gz
volse-hubzilla-d3093dce1bfd4685d5e11f828689630862f77bda.tar.bz2
volse-hubzilla-d3093dce1bfd4685d5e11f828689630862f77bda.zip
Improve translation message for help pages.
Display the target language instead of "your preferred language". Makes it a bit more explicit.
-rw-r--r--Zotlabs/Lib/Traits/HelpHelperTrait.php7
-rw-r--r--tests/unit/Module/HelpTest.php2
2 files changed, 7 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Traits/HelpHelperTrait.php b/Zotlabs/Lib/Traits/HelpHelperTrait.php
index 0ce586d08..63b0eb22e 100644
--- a/Zotlabs/Lib/Traits/HelpHelperTrait.php
+++ b/Zotlabs/Lib/Traits/HelpHelperTrait.php
@@ -83,8 +83,13 @@ trait HelpHelperTrait {
}
public function missing_translation_message(): string {
+ $prefered_language_name = get_language_name(
+ $this->lang['language'],
+ $this->lang['language']
+ );
+
return bbcode(
- t("This page is not yet available in your preferred language. See [observer.baseurl]/help/developer/developer_guide#Translations for information about how to help.")
+ t("This page is not yet available in {$prefered_language_name}. See [observer.baseurl]/help/developer/developer_guide#Translations for information about how to help.")
);
}
}
diff --git a/tests/unit/Module/HelpTest.php b/tests/unit/Module/HelpTest.php
index 81d2e9287..2c1d31570 100644
--- a/tests/unit/Module/HelpTest.php
+++ b/tests/unit/Module/HelpTest.php
@@ -110,7 +110,7 @@ class HelpTest extends \Zotlabs\Tests\Unit\Module\TestCase {
$this->get('help/about/help_topic');
$this->assertPageContains('Hubzilla Documentation: About');
- $this->assertPageContains('This page is not yet available in your preferred language');
+ $this->assertPageContains('This page is not yet available in norsk bokmål');
}
public function test_includes(): void {