]> git.mxchange.org Git - friendica.git/blobdiff - src/Object/Post.php
Merge pull request #8279 from MrPetovan/task/frio-mobile-actions-buttons
[friendica.git] / src / Object / Post.php
index efaa688199768f51c4f06093ff5e740f77a04da7..7b8f4b00d6b2ce4879bc735cc1f9898f08b1afaa 100644 (file)
@@ -1,15 +1,30 @@
 <?php
 /**
- * @file src/Object/Post.php
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
  */
+
 namespace Friendica\Object;
 
 use Friendica\Content\ContactSelector;
 use Friendica\Content\Feature;
 use Friendica\Core\Addon;
-use Friendica\Core\Config;
 use Friendica\Core\Hook;
-use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
@@ -375,14 +390,14 @@ class Post
 
                $ago = Temporal::getRelativeDate($item['created']);
                $ago_received = Temporal::getRelativeDate($item['received']);
-               if (Config::get('system', 'show_received') && (abs(strtotime($item['created']) - strtotime($item['received'])) > Config::get('system', 'show_received_seconds')) && ($ago != $ago_received)) {
+               if (DI::config()->get('system', 'show_received') && (abs(strtotime($item['created']) - strtotime($item['received'])) > DI::config()->get('system', 'show_received_seconds')) && ($ago != $ago_received)) {
                        $ago = DI::l10n()->t('%s (Received %s)', $ago, $ago_received);
                }
 
                $tmp_item = [
                        'template'        => $this->getTemplate(),
                        'type'            => implode("", array_slice(explode("/", $item['verb']), -1)),
-                       'suppress_tags'   => Config::get('system', 'suppress_tags'),
+                       'suppress_tags'   => DI::config()->get('system', 'suppress_tags'),
                        'tags'            => $tags['tags'],
                        'hashtags'        => $tags['hashtags'],
                        'mentions'        => $tags['mentions'],
@@ -442,6 +457,7 @@ class Post
                        'switchcomment'   => DI::l10n()->t('Comment'),
                        'reply_label'     => DI::l10n()->t('Reply to %s', $name_e),
                        'comment'         => $comment,
+                       'menu'            => DI::l10n()->t('More'),
                        'previewing'      => $conv->isPreview() ? ' preview ' : '',
                        'wait'            => DI::l10n()->t('Please wait'),
                        'thread_level'    => $thread_level,
@@ -480,7 +496,7 @@ class Post
                        // Collapse
                        if (($nb_children > 2) || ($thread_level > 1)) {
                                $result['children'][0]['comment_firstcollapsed'] = true;
-                               $result['children'][0]['num_comments'] = L10n::tt('%d comment', '%d comments', $total_children);
+                               $result['children'][0]['num_comments'] = DI::l10n()->tt('%d comment', '%d comments', $total_children);
                                $result['children'][0]['show_text'] = DI::l10n()->t('Show more');
                                $result['children'][0]['hide_text'] = DI::l10n()->t('Show fewer');
                                if ($thread_level > 1) {
@@ -493,7 +509,7 @@ class Post
 
                if ($this->isToplevel()) {
                        $result['total_comments_num'] = "$total_children";
-                       $result['total_comments_text'] = L10n::tt('comment', 'comments', $total_children);
+                       $result['total_comments_text'] = DI::l10n()->tt('comment', 'comments', $total_children);
                }
 
                $result['private'] = $item['private'];
@@ -903,6 +919,7 @@ class Post
                                '$myphoto'     => DI::baseUrl()->remove($a->contact['thumb']),
                                '$comment'     => DI::l10n()->t('Comment'),
                                '$submit'      => DI::l10n()->t('Submit'),
+                               '$loading'     => DI::l10n()->t('Loading...'),
                                '$edbold'      => DI::l10n()->t('Bold'),
                                '$editalic'    => DI::l10n()->t('Italic'),
                                '$eduline'     => DI::l10n()->t('Underline'),