Updat tt() calls
update function calls for tt()
This commit is contained in:
@@ -8,6 +8,7 @@ use Friendica\Content\ContactSelector;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
@@ -48,7 +49,7 @@ class Widget
|
||||
$x = PConfig::get(local_user(), 'system', 'invites_remaining');
|
||||
if ($x || is_site_admin()) {
|
||||
$a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
|
||||
. tt('%d invitation available', '%d invitations available', $x)
|
||||
. L10n::tt('%d invitation available', '%d invitations available', $x)
|
||||
. '</div>' . $inv;
|
||||
}
|
||||
}
|
||||
@@ -302,7 +303,7 @@ class Widget
|
||||
}
|
||||
|
||||
return replace_macros(get_markup_template('remote_friends_common.tpl'), array(
|
||||
'$desc' => tt("%d contact in common", "%d contacts in common", $t),
|
||||
'$desc' => L10n::tt("%d contact in common", "%d contacts in common", $t),
|
||||
'$base' => System::baseUrl(),
|
||||
'$uid' => $profile_uid,
|
||||
'$cid' => (($cid) ? $cid : '0'),
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ class L10n
|
||||
* @param int $count
|
||||
* @return string
|
||||
*/
|
||||
function tt($singular, $plural, $count)
|
||||
public static function tt($singular, $plural, $count)
|
||||
{
|
||||
global $lang;
|
||||
$a = get_app();
|
||||
|
||||
@@ -231,7 +231,7 @@ class UserImport
|
||||
}
|
||||
}
|
||||
if ($errorcount > 0) {
|
||||
notice(sprintf(tt("%d contact not imported", "%d contacts not imported", $errorcount), $errorcount));
|
||||
notice(sprintf(L10n::tt("%d contact not imported", "%d contacts not imported", $errorcount), $errorcount));
|
||||
}
|
||||
|
||||
foreach ($account['group'] as &$group) {
|
||||
|
||||
+4
-3
@@ -8,6 +8,7 @@ use Friendica\BaseObject;
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
@@ -420,9 +421,9 @@ class Post extends BaseObject
|
||||
// Collapse
|
||||
if (($nb_children > 2) || ($thread_level > 1)) {
|
||||
$result['children'][0]['comment_firstcollapsed'] = true;
|
||||
$result['children'][0]['num_comments'] = tt('%d comment', '%d comments', $total_children);
|
||||
$result['children'][0]['num_comments'] = L10n::tt('%d comment', '%d comments', $total_children);
|
||||
$result['children'][0]['hidden_comments_num'] = $total_children;
|
||||
$result['children'][0]['hidden_comments_text'] = tt('comment', 'comments', $total_children);
|
||||
$result['children'][0]['hidden_comments_text'] = L10n::tt('comment', 'comments', $total_children);
|
||||
$result['children'][0]['hide_text'] = t('show more');
|
||||
if ($thread_level > 1) {
|
||||
$result['children'][$nb_children - 1]['comment_lastcollapsed'] = true;
|
||||
@@ -434,7 +435,7 @@ class Post extends BaseObject
|
||||
|
||||
if ($this->isToplevel()) {
|
||||
$result['total_comments_num'] = "$total_children";
|
||||
$result['total_comments_text'] = tt('comment', 'comments', $total_children);
|
||||
$result['total_comments_text'] = L10n::tt('comment', 'comments', $total_children);
|
||||
}
|
||||
|
||||
$result['private'] = $item['private'];
|
||||
|
||||
Reference in New Issue
Block a user