mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
docu and declare return type for t()
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user