From 69862bc6df3ab0a32edbb90ff0e60ffedd03cc4e Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 10 Jun 2024 08:26:06 +0000 Subject: docu and declare return type for t() --- include/language.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/language.php b/include/language.php index 22f350aac..538f67d90 100644 --- a/include/language.php +++ b/include/language.php @@ -198,10 +198,10 @@ function load_translation_table($lang, $install = false) { * * @param string $s string that should get translated * @param string $ctx (optional) context to appear in po file - * @return translated string if exists, otherwise return $s + * @return string translated string if exists, otherwise return $s * */ -function t($s, $ctx = '') { +function t($s, $ctx = ''): string { $cs = $ctx ? '__ctx:' . $ctx . '__ ' . $s : $s; if (x(App::$strings, $cs)) { -- cgit v1.2.3