]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/OStatus.php
Merge pull request #4312 from zeroadam/feature/L10n
[friendica.git] / src / Protocol / OStatus.php
index 6a87d476149455d6972f740f7f66cbeb9b4d3bac..0e695416f32eaeda16f99ccc5727b51644dda7f3 100644 (file)
@@ -7,10 +7,12 @@ namespace Friendica\Protocol;
 use Friendica\App;
 use Friendica\Core\Cache;
 use Friendica\Core\Config;
+use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Database\DBM;
 use Friendica\Model\Contact;
 use Friendica\Model\GContact;
+use Friendica\Model\Conversation;
 use Friendica\Network\Probe;
 use Friendica\Object\Image;
 use Friendica\Util\Lock;
@@ -700,7 +702,7 @@ class OStatus
                }
 
                if (($item['author-link'] != '') && !empty($item['protocol'])) {
-                       $item = store_conversation($item);
+                       $item = Conversation::insert($item);
                }
 
                self::$itemlist[] = $item;
@@ -843,7 +845,7 @@ class OStatus
                        }
 
                        logger('Store conversation data for uri '.$conv_data['uri'], LOGGER_DEBUG);
-                       store_conversation($conv_data);
+                       Conversation::insert($conv_data);
                }
        }
 
@@ -1257,9 +1259,9 @@ class OStatus
                $root->setAttribute("xmlns:mastodon", NAMESPACE_MASTODON);
 
                switch ($filter) {
-                       case 'activity': $title = t('%s\'s timeline', $owner['name']); break;
-                       case 'posts'   : $title = t('%s\'s posts'   , $owner['name']); break;
-                       case 'comments': $title = t('%s\'s comments', $owner['name']); break;
+                       case 'activity': $title = L10n::t('%s\'s timeline', $owner['name']); break;
+                       case 'posts'   : $title = L10n::t('%s\'s posts'   , $owner['name']); break;
+                       case 'comments': $title = L10n::t('%s\'s comments', $owner['name']); break;
                }
 
                $attributes = ["uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION . "-" . DB_UPDATE_VERSION];
@@ -1786,12 +1788,12 @@ class OStatus
                }
 
                if ($item['verb'] == ACTIVITY_FOLLOW) {
-                       $message = t('%s is now following %s.');
-                       $title = t('following');
+                       $message = L10n::t('%s is now following %s.');
+                       $title = L10n::t('following');
                        $action = "subscription";
                } else {
-                       $message = t('%s stopped following %s.');
-                       $title = t('stopped following');
+                       $message = L10n::t('%s stopped following %s.');
+                       $title = L10n::t('stopped following');
                        $action = "unfollow";
                }