]> git.mxchange.org Git - friendica.git/commitdiff
Notice in tt fixed that happens with chinese translations
authorMichael <heluecht@pirati.ca>
Wed, 8 Aug 2018 12:17:49 +0000 (12:17 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 8 Aug 2018 12:17:49 +0000 (12:17 +0000)
src/Core/L10n.php

index 7420f98c98ba9abdc0e85a48cd58f233e8ad8997..8cdd935917539d3bac262de4909ee5d93424ffee 100644 (file)
@@ -6,6 +6,7 @@ namespace Friendica\Core;
 
 use Friendica\BaseObject;
 use Friendica\Database\DBA;
+use Friendica\Core\System;
 
 require_once 'boot.php';
 require_once 'include/dba.php';
@@ -193,7 +194,13 @@ class L10n extends BaseObject
                                } else {
                                        $i = self::stringPluralSelectDefault($count);
                                }
-                               $s = $t[$i];
+
+                               // for some languages there is only a single array item
+                               if (!isset($t[$i])) {
+                                       $s = $t[0];
+                               } else {
+                                       $s = $t[$i];
+                               }
                        } else {
                                $s = $t;
                        }