mirror of
https://github.com/friendica/friendica
synced 2025-04-26 12:30:11 +00:00
Move L10n::t() calls to DI::l10n()->t() calls
This commit is contained in:
parent
af88c2daa3
commit
5dfee31108
175 changed files with 2841 additions and 2841 deletions
|
@ -907,7 +907,7 @@ class BBCode
|
|||
// it loops over the array starting from the first element and going sequentially
|
||||
// to the last element
|
||||
$newbody = str_replace('[$#saved_image' . $cnt . '#$]',
|
||||
'<img src="' . self::proxyUrl($image) . '" alt="' . L10n::t('Image/photo') . '" />', $newbody);
|
||||
'<img src="' . self::proxyUrl($image) . '" alt="' . DI::l10n()->t('Image/photo') . '" />', $newbody);
|
||||
$cnt++;
|
||||
}
|
||||
|
||||
|
@ -1024,7 +1024,7 @@ class BBCode
|
|||
break;
|
||||
case 4:
|
||||
$headline = '<p><b>' . html_entity_decode('♲ ', ENT_QUOTES, 'UTF-8');
|
||||
$headline .= L10n::t('<a href="%1$s" target="_blank">%2$s</a> %3$s', $attributes['link'], $mention, $attributes['posted']);
|
||||
$headline .= DI::l10n()->t('<a href="%1$s" target="_blank">%2$s</a> %3$s', $attributes['link'], $mention, $attributes['posted']);
|
||||
$headline .= ':</b></p>' . "\n";
|
||||
|
||||
$text = ($is_quote_share? '<hr />' : '') . $headline . '<blockquote class="shared_content">' . trim($content) . '</blockquote>' . "\n";
|
||||
|
@ -1521,7 +1521,7 @@ class BBCode
|
|||
$text = preg_replace("/\[font=(.*?)\](.*?)\[\/font\]/sm", "<span style=\"font-family: $1;\">$2</span>", $text);
|
||||
|
||||
// Declare the format for [spoiler] layout
|
||||
$SpoilerLayout = '<details class="spoiler"><summary>' . L10n::t('Click to open/close') . '</summary>$1</details>';
|
||||
$SpoilerLayout = '<details class="spoiler"><summary>' . DI::l10n()->t('Click to open/close') . '</summary>$1</details>';
|
||||
|
||||
// Check for [spoiler] text
|
||||
// handle nested quotes
|
||||
|
@ -1552,7 +1552,7 @@ class BBCode
|
|||
|
||||
// Check for [quote=Author] text
|
||||
|
||||
$t_wrote = L10n::t('$1 wrote:');
|
||||
$t_wrote = DI::l10n()->t('$1 wrote:');
|
||||
|
||||
// handle nested quotes
|
||||
$endlessloop = 0;
|
||||
|
@ -1603,12 +1603,12 @@ class BBCode
|
|||
$text
|
||||
);
|
||||
|
||||
$text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img src="$1" alt="' . L10n::t('Image/photo') . '" />', $text);
|
||||
$text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/ism", '<img src="$1" alt="' . L10n::t('Image/photo') . '" />', $text);
|
||||
$text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img src="$1" alt="' . DI::l10n()->t('Image/photo') . '" />', $text);
|
||||
$text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/ism", '<img src="$1" alt="' . DI::l10n()->t('Image/photo') . '" />', $text);
|
||||
|
||||
$text = preg_replace("/\[crypt\](.*?)\[\/crypt\]/ism", '<br/><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . L10n::t('Encrypted content') . '" title="' . L10n::t('Encrypted content') . '" /><br />', $text);
|
||||
$text = preg_replace("/\[crypt(.*?)\](.*?)\[\/crypt\]/ism", '<br/><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . L10n::t('Encrypted content') . '" title="' . '$1' . ' ' . L10n::t('Encrypted content') . '" /><br />', $text);
|
||||
//$Text = preg_replace("/\[crypt=(.*?)\](.*?)\[\/crypt\]/ism", '<br/><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . L10n::t('Encrypted content') . '" title="' . '$1' . ' ' . L10n::t('Encrypted content') . '" /><br />', $Text);
|
||||
$text = preg_replace("/\[crypt\](.*?)\[\/crypt\]/ism", '<br/><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . DI::l10n()->t('Encrypted content') . '" title="' . DI::l10n()->t('Encrypted content') . '" /><br />', $text);
|
||||
$text = preg_replace("/\[crypt(.*?)\](.*?)\[\/crypt\]/ism", '<br/><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . DI::l10n()->t('Encrypted content') . '" title="' . '$1' . ' ' . DI::l10n()->t('Encrypted content') . '" /><br />', $text);
|
||||
//$Text = preg_replace("/\[crypt=(.*?)\](.*?)\[\/crypt\]/ism", '<br/><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . DI::l10n()->t('Encrypted content') . '" title="' . '$1' . ' ' . DI::l10n()->t('Encrypted content') . '" /><br />', $Text);
|
||||
|
||||
// Simplify "video" element
|
||||
$text = preg_replace('(\[video.*?\ssrc\s?=\s?([^\s\]]+).*?\].*?\[/video\])ism', '[video]$1[/video]', $text);
|
||||
|
@ -1832,7 +1832,7 @@ class BBCode
|
|||
array_walk($allowed_src_protocols, function(&$value) { $value = preg_quote($value, '#');});
|
||||
|
||||
$text = preg_replace('#<([^>]*?)(src)="(?!' . implode('|', $allowed_src_protocols) . ')(.*?)"(.*?)>#ism',
|
||||
'<$1$2=""$4 data-original-src="$3" class="invalid-src" title="' . L10n::t('Invalid source protocol') . '">', $text);
|
||||
'<$1$2=""$4 data-original-src="$3" class="invalid-src" title="' . DI::l10n()->t('Invalid source protocol') . '">', $text);
|
||||
|
||||
// sanitize href attributes (only whitelisted protocols URLs)
|
||||
// default value for backward compatibility
|
||||
|
@ -1847,7 +1847,7 @@ class BBCode
|
|||
array_walk($allowed_link_protocols, function(&$value) { $value = preg_quote($value, '#');});
|
||||
|
||||
$regex = '#<([^>]*?)(href)="(?!' . implode('|', $allowed_link_protocols) . ')(.*?)"(.*?)>#ism';
|
||||
$text = preg_replace($regex, '<$1$2="javascript:void(0)"$4 data-original-href="$3" class="invalid-href" title="' . L10n::t('Invalid link protocol') . '">', $text);
|
||||
$text = preg_replace($regex, '<$1$2="javascript:void(0)"$4 data-original-href="$3" class="invalid-href" title="' . DI::l10n()->t('Invalid link protocol') . '">', $text);
|
||||
|
||||
// Shared content
|
||||
$text = self::convertShare(
|
||||
|
|
|
@ -799,8 +799,8 @@ class HTML
|
|||
{
|
||||
$tpl = Renderer::getMarkupTemplate("scroll_loader.tpl");
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'wait' => L10n::t('Loading more entries...'),
|
||||
'end' => L10n::t('The end')
|
||||
'wait' => DI::l10n()->t('Loading more entries...'),
|
||||
'end' => DI::l10n()->t('The end')
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -893,28 +893,28 @@ class HTML
|
|||
if (strpos($s, '#') === 0) {
|
||||
$mode = 'tag';
|
||||
}
|
||||
$save_label = $mode === 'text' ? L10n::t('Save') : L10n::t('Follow');
|
||||
$save_label = $mode === 'text' ? DI::l10n()->t('Save') : DI::l10n()->t('Follow');
|
||||
|
||||
$values = [
|
||||
'$s' => $s,
|
||||
'$q' => urlencode($s),
|
||||
'$id' => $id,
|
||||
'$search_label' => L10n::t('Search'),
|
||||
'$search_label' => DI::l10n()->t('Search'),
|
||||
'$save_label' => $save_label,
|
||||
'$search_hint' => L10n::t('@name, !forum, #tags, content'),
|
||||
'$search_hint' => DI::l10n()->t('@name, !forum, #tags, content'),
|
||||
'$mode' => $mode,
|
||||
'$return_url' => urlencode('search?q=' . urlencode($s)),
|
||||
];
|
||||
|
||||
if (!$aside) {
|
||||
$values['$search_options'] = [
|
||||
'fulltext' => L10n::t('Full Text'),
|
||||
'tags' => L10n::t('Tags'),
|
||||
'contacts' => L10n::t('Contacts')
|
||||
'fulltext' => DI::l10n()->t('Full Text'),
|
||||
'tags' => DI::l10n()->t('Tags'),
|
||||
'contacts' => DI::l10n()->t('Contacts')
|
||||
];
|
||||
|
||||
if (Config::get('system', 'poco_local_search')) {
|
||||
$values['$searchoption']['forums'] = L10n::t('Forums');
|
||||
$values['$searchoption']['forums'] = DI::l10n()->t('Forums');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -951,7 +951,7 @@ class HTML
|
|||
$html = Renderer::replaceMacros($tpl, [
|
||||
'$reasons' => $reasons,
|
||||
'$rnd' => Strings::getRandomHex(8),
|
||||
'$openclose' => L10n::t('Click to open/close'),
|
||||
'$openclose' => DI::l10n()->t('Click to open/close'),
|
||||
'$html' => $html
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue