Finish t() for src
Update t() calls in src folder
This commit is contained in:
parent
407b2397cb
commit
07d306aa37
19 changed files with 392 additions and 384 deletions
11
src/App.php
11
src/App.php
|
@ -1,9 +1,12 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file src/App.php
|
||||
*/
|
||||
namespace Friendica;
|
||||
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
|
@ -512,9 +515,9 @@ class App
|
|||
'$baseurl' => $this->get_baseurl(),
|
||||
'$local_user' => local_user(),
|
||||
'$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION,
|
||||
'$delitem' => t('Delete this item?'),
|
||||
'$showmore' => t('show more'),
|
||||
'$showfewer' => t('show fewer'),
|
||||
'$delitem' => L10n::t('Delete this item?'),
|
||||
'$showmore' => L10n::t('show more'),
|
||||
'$showfewer' => L10n::t('show fewer'),
|
||||
'$update_interval' => $interval,
|
||||
'$shortcut_icon' => $shortcut_icon,
|
||||
'$touch_icon' => $touch_icon,
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
namespace Friendica\Content;
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
use dba;
|
||||
|
@ -51,12 +52,12 @@ class ContactSelector
|
|||
$o .= "<select id=\"contact-poll-interval\" name=\"poll\" $dis />" . "\r\n";
|
||||
|
||||
$rep = [
|
||||
0 => t('Frequently'),
|
||||
1 => t('Hourly'),
|
||||
2 => t('Twice daily'),
|
||||
3 => t('Daily'),
|
||||
4 => t('Weekly'),
|
||||
5 => t('Monthly')
|
||||
0 => L10n::t('Frequently'),
|
||||
1 => L10n::t('Hourly'),
|
||||
2 => L10n::t('Twice daily'),
|
||||
3 => L10n::t('Daily'),
|
||||
4 => L10n::t('Weekly'),
|
||||
5 => L10n::t('Monthly')
|
||||
];
|
||||
|
||||
foreach ($rep as $k => $v) {
|
||||
|
@ -75,23 +76,23 @@ class ContactSelector
|
|||
public static function networkToName($s, $profile = "")
|
||||
{
|
||||
$nets = [
|
||||
NETWORK_DFRN => t('Friendica'),
|
||||
NETWORK_OSTATUS => t('OStatus'),
|
||||
NETWORK_FEED => t('RSS/Atom'),
|
||||
NETWORK_MAIL => t('Email'),
|
||||
NETWORK_DIASPORA => t('Diaspora'),
|
||||
NETWORK_FACEBOOK => t('Facebook'),
|
||||
NETWORK_ZOT => t('Zot!'),
|
||||
NETWORK_LINKEDIN => t('LinkedIn'),
|
||||
NETWORK_XMPP => t('XMPP/IM'),
|
||||
NETWORK_MYSPACE => t('MySpace'),
|
||||
NETWORK_GPLUS => t('Google+'),
|
||||
NETWORK_PUMPIO => t('pump.io'),
|
||||
NETWORK_TWITTER => t('Twitter'),
|
||||
NETWORK_DIASPORA2 => t('Diaspora Connector'),
|
||||
NETWORK_STATUSNET => t('GNU Social Connector'),
|
||||
NETWORK_PNUT => t('pnut'),
|
||||
NETWORK_APPNET => t('App.net')
|
||||
NETWORK_DFRN => L10n::t('Friendica'),
|
||||
NETWORK_OSTATUS => L10n::t('OStatus'),
|
||||
NETWORK_FEED => L10n::t('RSS/Atom'),
|
||||
NETWORK_MAIL => L10n::t('Email'),
|
||||
NETWORK_DIASPORA => L10n::t('Diaspora'),
|
||||
NETWORK_FACEBOOK => L10n::t('Facebook'),
|
||||
NETWORK_ZOT => L10n::t('Zot!'),
|
||||
NETWORK_LINKEDIN => L10n::t('LinkedIn'),
|
||||
NETWORK_XMPP => L10n::t('XMPP/IM'),
|
||||
NETWORK_MYSPACE => L10n::t('MySpace'),
|
||||
NETWORK_GPLUS => L10n::t('Google+'),
|
||||
NETWORK_PUMPIO => L10n::t('pump.io'),
|
||||
NETWORK_TWITTER => L10n::t('Twitter'),
|
||||
NETWORK_DIASPORA2 => L10n::t('Diaspora Connector'),
|
||||
NETWORK_STATUSNET => L10n::t('GNU Social Connector'),
|
||||
NETWORK_PNUT => L10n::t('pnut'),
|
||||
NETWORK_APPNET => L10n::t('App.net')
|
||||
];
|
||||
|
||||
Addon::callHooks('network_to_name', $nets);
|
||||
|
@ -121,7 +122,7 @@ class ContactSelector
|
|||
public static function gender($current = "", $suffix = "")
|
||||
{
|
||||
$o = '';
|
||||
$select = ['', t('Male'), t('Female'), t('Currently Male'), t('Currently Female'), t('Mostly Male'), t('Mostly Female'), t('Transgender'), t('Intersex'), t('Transsexual'), t('Hermaphrodite'), t('Neuter'), t('Non-specific'), t('Other'), t('Undecided')];
|
||||
$select = ['', L10n::t('Male'), L10n::t('Female'), L10n::t('Currently Male'), L10n::t('Currently Female'), L10n::t('Mostly Male'), L10n::t('Mostly Female'), L10n::t('Transgender'), L10n::t('Intersex'), L10n::t('Transsexual'), L10n::t('Hermaphrodite'), L10n::t('Neuter'), L10n::t('Non-specific'), L10n::t('Other'), L10n::t('Undecided')];
|
||||
|
||||
Addon::callHooks('gender_selector', $select);
|
||||
|
||||
|
@ -143,7 +144,7 @@ class ContactSelector
|
|||
public static function sexualPreference($current = "", $suffix = "")
|
||||
{
|
||||
$o = '';
|
||||
$select = ['', t('Males'), t('Females'), t('Gay'), t('Lesbian'), t('No Preference'), t('Bisexual'), t('Autosexual'), t('Abstinent'), t('Virgin'), t('Deviant'), t('Fetish'), t('Oodles'), t('Nonsexual')];
|
||||
$select = ['', L10n::t('Males'), L10n::t('Females'), L10n::t('Gay'), L10n::t('Lesbian'), L10n::t('No Preference'), L10n::t('Bisexual'), L10n::t('Autosexual'), L10n::t('Abstinent'), L10n::t('Virgin'), L10n::t('Deviant'), L10n::t('Fetish'), L10n::t('Oodles'), L10n::t('Nonsexual')];
|
||||
|
||||
|
||||
Addon::callHooks('sexpref_selector', $select);
|
||||
|
@ -165,7 +166,7 @@ class ContactSelector
|
|||
public static function maritalStatus($current = "")
|
||||
{
|
||||
$o = '';
|
||||
$select = ['', t('Single'), t('Lonely'), t('Available'), t('Unavailable'), t('Has crush'), t('Infatuated'), t('Dating'), t('Unfaithful'), t('Sex Addict'), t('Friends'), t('Friends/Benefits'), t('Casual'), t('Engaged'), t('Married'), t('Imaginarily married'), t('Partners'), t('Cohabiting'), t('Common law'), t('Happy'), t('Not looking'), t('Swinger'), t('Betrayed'), t('Separated'), t('Unstable'), t('Divorced'), t('Imaginarily divorced'), t('Widowed'), t('Uncertain'), t('It\'s complicated'), t('Don\'t care'), t('Ask me')];
|
||||
$select = ['', L10n::t('Single'), L10n::t('Lonely'), L10n::t('Available'), L10n::t('Unavailable'), L10n::t('Has crush'), L10n::t('Infatuated'), L10n::t('Dating'), L10n::t('Unfaithful'), L10n::t('Sex Addict'), L10n::t('Friends'), L10n::t('Friends/Benefits'), L10n::t('Casual'), L10n::t('Engaged'), L10n::t('Married'), L10n::t('Imaginarily married'), L10n::t('Partners'), L10n::t('Cohabiting'), L10n::t('Common law'), L10n::t('Happy'), L10n::t('Not looking'), L10n::t('Swinger'), L10n::t('Betrayed'), L10n::t('Separated'), L10n::t('Unstable'), L10n::t('Divorced'), L10n::t('Imaginarily divorced'), L10n::t('Widowed'), L10n::t('Uncertain'), L10n::t('It\'s complicated'), L10n::t('Don\'t care'), L10n::t('Ask me')];
|
||||
|
||||
Addon::callHooks('marital_selector', $select);
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace Friendica\Content;
|
|||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
class Feature
|
||||
|
@ -75,56 +76,56 @@ class Feature
|
|||
|
||||
// General
|
||||
'general' => [
|
||||
t('General Features'),
|
||||
//array('expire', t('Content Expiration'), t('Remove old posts/comments after a period of time')),
|
||||
['multi_profiles', t('Multiple Profiles'), t('Ability to create multiple profiles'), false, Config::get('feature_lock', 'multi_profiles', false)],
|
||||
['photo_location', t('Photo Location'), t('Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map.'), false, Config::get('feature_lock', 'photo_location', false)],
|
||||
['export_calendar', t('Export Public Calendar'), t('Ability for visitors to download the public calendar'), false, Config::get('feature_lock', 'export_calendar', false)],
|
||||
L10n::t('General Features'),
|
||||
//array('expire', L10n::t('Content Expiration'), L10n::t('Remove old posts/comments after a period of time')),
|
||||
['multi_profiles', L10n::t('Multiple Profiles'), L10n::t('Ability to create multiple profiles'), false, Config::get('feature_lock', 'multi_profiles', false)],
|
||||
['photo_location', L10n::t('Photo Location'), L10n::t('Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map.'), false, Config::get('feature_lock', 'photo_location', false)],
|
||||
['export_calendar', L10n::t('Export Public Calendar'), L10n::t('Ability for visitors to download the public calendar'), false, Config::get('feature_lock', 'export_calendar', false)],
|
||||
],
|
||||
|
||||
// Post composition
|
||||
'composition' => [
|
||||
t('Post Composition Features'),
|
||||
['preview', t('Post Preview'), t('Allow previewing posts and comments before publishing them'), false, Config::get('feature_lock', 'preview', false)],
|
||||
['aclautomention', t('Auto-mention Forums'), t('Add/remove mention when a forum page is selected/deselected in ACL window.'), false, Config::get('feature_lock', 'aclautomention', false)],
|
||||
L10n::t('Post Composition Features'),
|
||||
['preview', L10n::t('Post Preview'), L10n::t('Allow previewing posts and comments before publishing them'), false, Config::get('feature_lock', 'preview', false)],
|
||||
['aclautomention', L10n::t('Auto-mention Forums'), L10n::t('Add/remove mention when a forum page is selected/deselected in ACL window.'), false, Config::get('feature_lock', 'aclautomention', false)],
|
||||
],
|
||||
|
||||
// Network sidebar widgets
|
||||
'widgets' => [
|
||||
t('Network Sidebar Widgets'),
|
||||
['archives', t('Search by Date'), t('Ability to select posts by date ranges'), false, Config::get('feature_lock', 'archives', false)],
|
||||
['forumlist_widget', t('List Forums'), t('Enable widget to display the forums your are connected with'), true, Config::get('feature_lock', 'forumlist_widget', false)],
|
||||
['groups', t('Group Filter'), t('Enable widget to display Network posts only from selected group'), false, Config::get('feature_lock', 'groups', false)],
|
||||
['networks', t('Network Filter'), t('Enable widget to display Network posts only from selected network'), false, Config::get('feature_lock', 'networks', false)],
|
||||
['savedsearch', t('Saved Searches'), t('Save search terms for re-use'), false, Config::get('feature_lock', 'savedsearch', false)],
|
||||
L10n::t('Network Sidebar Widgets'),
|
||||
['archives', L10n::t('Search by Date'), L10n::t('Ability to select posts by date ranges'), false, Config::get('feature_lock', 'archives', false)],
|
||||
['forumlist_widget', L10n::t('List Forums'), L10n::t('Enable widget to display the forums your are connected with'), true, Config::get('feature_lock', 'forumlist_widget', false)],
|
||||
['groups', L10n::t('Group Filter'), L10n::t('Enable widget to display Network posts only from selected group'), false, Config::get('feature_lock', 'groups', false)],
|
||||
['networks', L10n::t('Network Filter'), L10n::t('Enable widget to display Network posts only from selected network'), false, Config::get('feature_lock', 'networks', false)],
|
||||
['savedsearch', L10n::t('Saved Searches'), L10n::t('Save search terms for re-use'), false, Config::get('feature_lock', 'savedsearch', false)],
|
||||
],
|
||||
|
||||
// Network tabs
|
||||
'net_tabs' => [
|
||||
t('Network Tabs'),
|
||||
['personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on'), false, Config::get('feature_lock', 'personal_tab', false)],
|
||||
['new_tab', t('Network New Tab'), t('Enable tab to display only new Network posts (from the last 12 hours)'), false, Config::get('feature_lock', 'new_tab', false)],
|
||||
['link_tab', t('Network Shared Links Tab'), t('Enable tab to display only Network posts with links in them'), false, Config::get('feature_lock', 'link_tab', false)],
|
||||
L10n::t('Network Tabs'),
|
||||
['personal_tab', L10n::t('Network Personal Tab'), L10n::t('Enable tab to display only Network posts that you\'ve interacted on'), false, Config::get('feature_lock', 'personal_tab', false)],
|
||||
['new_tab', L10n::t('Network New Tab'), L10n::t('Enable tab to display only new Network posts (from the last 12 hours)'), false, Config::get('feature_lock', 'new_tab', false)],
|
||||
['link_tab', L10n::t('Network Shared Links Tab'), L10n::t('Enable tab to display only Network posts with links in them'), false, Config::get('feature_lock', 'link_tab', false)],
|
||||
],
|
||||
|
||||
// Item tools
|
||||
'tools' => [
|
||||
t('Post/Comment Tools'),
|
||||
['multi_delete', t('Multiple Deletion'), t('Select and delete multiple posts/comments at once'), false, Config::get('feature_lock', 'multi_delete', false)],
|
||||
['edit_posts', t('Edit Sent Posts'), t('Edit and correct posts and comments after sending'), false, Config::get('feature_lock', 'edit_posts', false)],
|
||||
['commtag', t('Tagging'), t('Ability to tag existing posts'), false, Config::get('feature_lock', 'commtag', false)],
|
||||
['categories', t('Post Categories'), t('Add categories to your posts'), false, Config::get('feature_lock', 'categories', false)],
|
||||
['filing', t('Saved Folders'), t('Ability to file posts under folders'), false, Config::get('feature_lock', 'filing', false)],
|
||||
['dislike', t('Dislike Posts'), t('Ability to dislike posts/comments'), false, Config::get('feature_lock', 'dislike', false)],
|
||||
['star_posts', t('Star Posts'), t('Ability to mark special posts with a star indicator'), false, Config::get('feature_lock', 'star_posts', false)],
|
||||
['ignore_posts', t('Mute Post Notifications'), t('Ability to mute notifications for a thread'), false, Config::get('feature_lock', 'ignore_posts', false)],
|
||||
L10n::t('Post/Comment Tools'),
|
||||
['multi_delete', L10n::t('Multiple Deletion'), L10n::t('Select and delete multiple posts/comments at once'), false, Config::get('feature_lock', 'multi_delete', false)],
|
||||
['edit_posts', L10n::t('Edit Sent Posts'), L10n::t('Edit and correct posts and comments after sending'), false, Config::get('feature_lock', 'edit_posts', false)],
|
||||
['commtag', L10n::t('Tagging'), L10n::t('Ability to tag existing posts'), false, Config::get('feature_lock', 'commtag', false)],
|
||||
['categories', L10n::t('Post Categories'), L10n::t('Add categories to your posts'), false, Config::get('feature_lock', 'categories', false)],
|
||||
['filing', L10n::t('Saved Folders'), L10n::t('Ability to file posts under folders'), false, Config::get('feature_lock', 'filing', false)],
|
||||
['dislike', L10n::t('Dislike Posts'), L10n::t('Ability to dislike posts/comments'), false, Config::get('feature_lock', 'dislike', false)],
|
||||
['star_posts', L10n::t('Star Posts'), L10n::t('Ability to mark special posts with a star indicator'), false, Config::get('feature_lock', 'star_posts', false)],
|
||||
['ignore_posts', L10n::t('Mute Post Notifications'), L10n::t('Ability to mute notifications for a thread'), false, Config::get('feature_lock', 'ignore_posts', false)],
|
||||
],
|
||||
|
||||
// Advanced Profile Settings
|
||||
'advanced_profile' => [
|
||||
t('Advanced Profile Settings'),
|
||||
['forumlist_profile', t('List Forums'), t('Show visitors public community forums at the Advanced Profile Page'), false, Config::get('feature_lock', 'forumlist_profile', false)],
|
||||
['tagadelic', t('Tag Cloud'), t('Provide a personal tag cloud on your profile page'), false, Config::get('feature_lock', 'tagadelic', false)],
|
||||
L10n::t('Advanced Profile Settings'),
|
||||
['forumlist_profile', L10n::t('List Forums'), L10n::t('Show visitors public community forums at the Advanced Profile Page'), false, Config::get('feature_lock', 'forumlist_profile', false)],
|
||||
['tagadelic', L10n::t('Tag Cloud'), L10n::t('Provide a personal tag cloud on your profile page'), false, Config::get('feature_lock', 'tagadelic', false)],
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace Friendica\Content;
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use dba;
|
||||
|
@ -121,12 +122,12 @@ class ForumManager
|
|||
$o .= replace_macros(
|
||||
$tpl,
|
||||
[
|
||||
'$title' => t('Forums'),
|
||||
'$title' => L10n::t('Forums'),
|
||||
'$forums' => $entries,
|
||||
'$link_desc' => t('External link to forum'),
|
||||
'$link_desc' => L10n::t('External link to forum'),
|
||||
'$total' => $total,
|
||||
'$visible_forums' => $visible_forums,
|
||||
'$showmore' => t('show more')]
|
||||
'$showmore' => L10n::t('show more')]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ use Friendica\App;
|
|||
use Friendica\Content\Feature;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Profile;
|
||||
|
@ -50,12 +51,12 @@ class Nav
|
|||
'$sitelocation' => $nav_info['sitelocation'],
|
||||
'$nav' => $nav_info['nav'],
|
||||
'$banner' => $nav_info['banner'],
|
||||
'$emptynotifications' => t('Nothing new here'),
|
||||
'$emptynotifications' => L10n::t('Nothing new here'),
|
||||
'$userinfo' => $nav_info['userinfo'],
|
||||
'$sel' => $a->nav_sel,
|
||||
'$apps' => $a->apps,
|
||||
'$clear_notifs' => t('Clear notifications'),
|
||||
'$search_hint' => t('@name, !forum, #tags, content')
|
||||
'$clear_notifs' => L10n::t('Clear notifications'),
|
||||
'$search_hint' => L10n::t('@name, !forum, #tags, content')
|
||||
]);
|
||||
|
||||
Addon::callHooks('page_header', $a->page['nav']);
|
||||
|
@ -94,15 +95,15 @@ class Nav
|
|||
$userinfo = null;
|
||||
|
||||
if (local_user()) {
|
||||
$nav['logout'] = ['logout', t('Logout'), '', t('End this session')];
|
||||
$nav['logout'] = ['logout', L10n::t('Logout'), '', L10n::t('End this session')];
|
||||
|
||||
// user menu
|
||||
$nav['usermenu'][] = ['profile/' . $a->user['nickname'], t('Status'), '', t('Your posts and conversations')];
|
||||
$nav['usermenu'][] = ['profile/' . $a->user['nickname'] . '?tab=profile', t('Profile'), '', t('Your profile page')];
|
||||
$nav['usermenu'][] = ['photos/' . $a->user['nickname'], t('Photos'), '', t('Your photos')];
|
||||
$nav['usermenu'][] = ['videos/' . $a->user['nickname'], t('Videos'), '', t('Your videos')];
|
||||
$nav['usermenu'][] = ['events/', t('Events'), '', t('Your events')];
|
||||
$nav['usermenu'][] = ['notes/', t('Personal notes'), '', t('Your personal notes')];
|
||||
$nav['usermenu'][] = ['profile/' . $a->user['nickname'], L10n::t('Status'), '', L10n::t('Your posts and conversations')];
|
||||
$nav['usermenu'][] = ['profile/' . $a->user['nickname'] . '?tab=profile', L10n::t('Profile'), '', L10n::t('Your profile page')];
|
||||
$nav['usermenu'][] = ['photos/' . $a->user['nickname'], L10n::t('Photos'), '', L10n::t('Your photos')];
|
||||
$nav['usermenu'][] = ['videos/' . $a->user['nickname'], L10n::t('Videos'), '', L10n::t('Your videos')];
|
||||
$nav['usermenu'][] = ['events/', L10n::t('Events'), '', L10n::t('Your events')];
|
||||
$nav['usermenu'][] = ['notes/', L10n::t('Personal notes'), '', L10n::t('Your personal notes')];
|
||||
|
||||
// user info
|
||||
$contact = dba::selectFirst('contact', ['micro'], ['uid' => $a->user['uid'], 'self' => true]);
|
||||
|
@ -111,7 +112,7 @@ class Nav
|
|||
'name' => $a->user['username'],
|
||||
];
|
||||
} else {
|
||||
$nav['login'] = ['login', t('Login'), ($a->module == 'login' ? 'selected' : ''), t('Sign in')];
|
||||
$nav['login'] = ['login', L10n::t('Login'), ($a->module == 'login' ? 'selected' : ''), L10n::t('Sign in')];
|
||||
}
|
||||
|
||||
// "Home" should also take you home from an authenticated remote profile connection
|
||||
|
@ -121,34 +122,34 @@ class Nav
|
|||
}
|
||||
|
||||
if (($a->module != 'home') && (! (local_user()))) {
|
||||
$nav['home'] = [$homelink, t('Home'), '', t('Home Page')];
|
||||
$nav['home'] = [$homelink, L10n::t('Home'), '', L10n::t('Home Page')];
|
||||
}
|
||||
|
||||
if (($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user())) {
|
||||
$nav['register'] = ['register', t('Register'), '', t('Create an account')];
|
||||
$nav['register'] = ['register', L10n::t('Register'), '', L10n::t('Create an account')];
|
||||
}
|
||||
|
||||
$help_url = 'help';
|
||||
|
||||
if (!Config::get('system', 'hide_help')) {
|
||||
$nav['help'] = [$help_url, t('Help'), '', t('Help and documentation')];
|
||||
$nav['help'] = [$help_url, L10n::t('Help'), '', L10n::t('Help and documentation')];
|
||||
}
|
||||
|
||||
if (count($a->apps) > 0) {
|
||||
$nav['apps'] = ['apps', t('Apps'), '', t('Addon applications, utilities, games')];
|
||||
$nav['apps'] = ['apps', L10n::t('Apps'), '', L10n::t('Addon applications, utilities, games')];
|
||||
}
|
||||
|
||||
if (local_user() || !Config::get('system', 'local_search')) {
|
||||
$nav['search'] = ['search', t('Search'), '', t('Search site content')];
|
||||
$nav['search'] = ['search', L10n::t('Search'), '', L10n::t('Search site content')];
|
||||
|
||||
$nav['searchoption'] = [
|
||||
t('Full Text'),
|
||||
t('Tags'),
|
||||
t('Contacts')
|
||||
L10n::t('Full Text'),
|
||||
L10n::t('Tags'),
|
||||
L10n::t('Contacts')
|
||||
];
|
||||
|
||||
if (Config::get('system', 'poco_local_search')) {
|
||||
$nav['searchoption'][] = t('Forums');
|
||||
$nav['searchoption'][] = L10n::t('Forums');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,62 +163,62 @@ class Nav
|
|||
}
|
||||
|
||||
if (local_user() || Config::get('system', 'community_page_style') != CP_NO_COMMUNITY_PAGE) {
|
||||
$nav['community'] = ['community', t('Community'), '', t('Conversations on this and other servers')];
|
||||
$nav['community'] = ['community', L10n::t('Community'), '', L10n::t('Conversations on this and other servers')];
|
||||
}
|
||||
|
||||
if (local_user()) {
|
||||
$nav['events'] = ['events', t('Events'), '', t('Events and Calendar')];
|
||||
$nav['events'] = ['events', L10n::t('Events'), '', L10n::t('Events and Calendar')];
|
||||
}
|
||||
|
||||
$nav['directory'] = [$gdirpath, t('Directory'), '', t('People directory')];
|
||||
$nav['directory'] = [$gdirpath, L10n::t('Directory'), '', L10n::t('People directory')];
|
||||
|
||||
$nav['about'] = ['friendica', t('Information'), '', t('Information about this friendica instance')];
|
||||
$nav['about'] = ['friendica', L10n::t('Information'), '', L10n::t('Information about this friendica instance')];
|
||||
|
||||
// The following nav links are only show to logged in users
|
||||
if (local_user()) {
|
||||
$nav['network'] = ['network', t('Network'), '', t('Conversations from your friends')];
|
||||
$nav['net_reset'] = ['network/0?f=&order=comment&nets=all', t('Network Reset'), '', t('Load Network page with no filters')];
|
||||
$nav['network'] = ['network', L10n::t('Network'), '', L10n::t('Conversations from your friends')];
|
||||
$nav['net_reset'] = ['network/0?f=&order=comment&nets=all', L10n::t('Network Reset'), '', L10n::t('Load Network page with no filters')];
|
||||
|
||||
$nav['home'] = ['profile/' . $a->user['nickname'], t('Home'), '', t('Your posts and conversations')];
|
||||
$nav['home'] = ['profile/' . $a->user['nickname'], L10n::t('Home'), '', L10n::t('Your posts and conversations')];
|
||||
|
||||
if (in_array($_SESSION['page_flags'], [PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE, PAGE_PRVGROUP])) {
|
||||
// only show friend requests for normal pages. Other page types have automatic friendship.
|
||||
if (in_array($_SESSION['page_flags'], [PAGE_NORMAL, PAGE_SOAPBOX, PAGE_PRVGROUP])) {
|
||||
$nav['introductions'] = ['notifications/intros', t('Introductions'), '', t('Friend Requests')];
|
||||
$nav['introductions'] = ['notifications/intros', L10n::t('Introductions'), '', L10n::t('Friend Requests')];
|
||||
}
|
||||
if (in_array($_SESSION['page_flags'], [PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE])) {
|
||||
$nav['notifications'] = ['notifications', t('Notifications'), '', t('Notifications')];
|
||||
$nav['notifications']['all'] = ['notifications/system', t('See all notifications'), '', ''];
|
||||
$nav['notifications']['mark'] = ['', t('Mark as seen'), '', t('Mark all system notifications seen')];
|
||||
$nav['notifications'] = ['notifications', L10n::t('Notifications'), '', L10n::t('Notifications')];
|
||||
$nav['notifications']['all'] = ['notifications/system', L10n::t('See all notifications'), '', ''];
|
||||
$nav['notifications']['mark'] = ['', L10n::t('Mark as seen'), '', L10n::t('Mark all system notifications seen')];
|
||||
}
|
||||
}
|
||||
|
||||
$nav['messages'] = ['message', t('Messages'), '', t('Private mail')];
|
||||
$nav['messages']['inbox'] = ['message', t('Inbox'), '', t('Inbox')];
|
||||
$nav['messages']['outbox'] = ['message/sent', t('Outbox'), '', t('Outbox')];
|
||||
$nav['messages']['new'] = ['message/new', t('New Message'), '', t('New Message')];
|
||||
$nav['messages'] = ['message', L10n::t('Messages'), '', L10n::t('Private mail')];
|
||||
$nav['messages']['inbox'] = ['message', L10n::t('Inbox'), '', L10n::t('Inbox')];
|
||||
$nav['messages']['outbox'] = ['message/sent', L10n::t('Outbox'), '', L10n::t('Outbox')];
|
||||
$nav['messages']['new'] = ['message/new', L10n::t('New Message'), '', L10n::t('New Message')];
|
||||
|
||||
if (is_array($a->identities) && count($a->identities) > 1) {
|
||||
$nav['manage'] = ['manage', t('Manage'), '', t('Manage other pages')];
|
||||
$nav['manage'] = ['manage', L10n::t('Manage'), '', L10n::t('Manage other pages')];
|
||||
}
|
||||
|
||||
$nav['delegations'] = ['delegate', t('Delegations'), '', t('Delegate Page Management')];
|
||||
$nav['delegations'] = ['delegate', L10n::t('Delegations'), '', L10n::t('Delegate Page Management')];
|
||||
|
||||
$nav['settings'] = ['settings', t('Settings'), '', t('Account settings')];
|
||||
$nav['settings'] = ['settings', L10n::t('Settings'), '', L10n::t('Account settings')];
|
||||
|
||||
if (Feature::isEnabled(local_user(), 'multi_profiles')) {
|
||||
$nav['profiles'] = ['profiles', t('Profiles'), '', t('Manage/Edit Profiles')];
|
||||
$nav['profiles'] = ['profiles', L10n::t('Profiles'), '', L10n::t('Manage/Edit Profiles')];
|
||||
}
|
||||
|
||||
$nav['contacts'] = ['contacts', t('Contacts'), '', t('Manage/edit friends and contacts')];
|
||||
$nav['contacts'] = ['contacts', L10n::t('Contacts'), '', L10n::t('Manage/edit friends and contacts')];
|
||||
}
|
||||
|
||||
// Show the link to the admin configuration page if user is admin
|
||||
if (is_site_admin()) {
|
||||
$nav['admin'] = ['admin/', t('Admin'), '', t('Site setup and configuration')];
|
||||
$nav['admin'] = ['admin/', L10n::t('Admin'), '', L10n::t('Site setup and configuration')];
|
||||
}
|
||||
|
||||
$nav['navigation'] = ['navigation/', t('Navigation'), '', t('Site map')];
|
||||
$nav['navigation'] = ['navigation/', L10n::t('Navigation'), '', L10n::t('Site map')];
|
||||
|
||||
// Provide a banner/logo/whatever
|
||||
$banner = Config::get('system', 'banner');
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file src/Content/OEmbed.php
|
||||
*/
|
||||
|
||||
namespace Friendica\Content;
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -247,7 +246,7 @@ class OEmbed
|
|||
{
|
||||
$stopoembed = Config::get("system", "no_oembed");
|
||||
if ($stopoembed == true) {
|
||||
return preg_replace("/\[embed\](.+?)\[\/embed\]/is", "<!-- oembed $1 --><i>" . t('Embedding disabled') . " : $1</i><!-- /oembed $1 -->", $text);
|
||||
return preg_replace("/\[embed\](.+?)\[\/embed\]/is", "<!-- oembed $1 --><i>" . L10n::t('Embedding disabled') . " : $1</i><!-- /oembed $1 -->", $text);
|
||||
}
|
||||
return preg_replace_callback("/\[embed\](.+?)\[\/embed\]/is", ['self', 'replaceCallback'], $text);
|
||||
}
|
||||
|
@ -367,7 +366,7 @@ class OEmbed
|
|||
$width = '100%';
|
||||
|
||||
$src = System::baseUrl() . '/oembed/' . base64url_encode($src);
|
||||
return '<iframe onload="resizeIframe(this);" class="embed_rich" height="' . $height . '" width="' . $width . '" src="' . $src . '" allowfullscreen scrolling="no" frameborder="no">' . t('Embedded content') . '</iframe>';
|
||||
return '<iframe onload="resizeIframe(this);" class="embed_rich" height="' . $height . '" width="' . $width . '" src="' . $src . '" allowfullscreen scrolling="no" frameborder="no">' . L10n::t('Embedded content') . '</iframe>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,11 +29,11 @@ class Widget
|
|||
public static function follow($value = "")
|
||||
{
|
||||
return replace_macros(get_markup_template('follow.tpl'), array(
|
||||
'$connect' => t('Add New Contact'),
|
||||
'$desc' => t('Enter address or web location'),
|
||||
'$hint' => t('Example: bob@example.com, http://example.com/barbara'),
|
||||
'$connect' => L10n::t('Add New Contact'),
|
||||
'$desc' => L10n::t('Enter address or web location'),
|
||||
'$hint' => L10n::t('Example: bob@example.com, http://example.com/barbara'),
|
||||
'$value' => $value,
|
||||
'$follow' => t('Connect')
|
||||
'$follow' => L10n::t('Connect')
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -55,16 +55,16 @@ class Widget
|
|||
}
|
||||
|
||||
return replace_macros(get_markup_template('peoplefind.tpl'), array(
|
||||
'$findpeople' => t('Find People'),
|
||||
'$desc' => t('Enter name or interest'),
|
||||
'$label' => t('Connect/Follow'),
|
||||
'$hint' => t('Examples: Robert Morgenstein, Fishing'),
|
||||
'$findthem' => t('Find'),
|
||||
'$suggest' => t('Friend Suggestions'),
|
||||
'$similar' => t('Similar Interests'),
|
||||
'$random' => t('Random Profile'),
|
||||
'$inv' => t('Invite Friends'),
|
||||
'$directory' => t('View Global Directory'),
|
||||
'$findpeople' => L10n::t('Find People'),
|
||||
'$desc' => L10n::t('Enter name or interest'),
|
||||
'$label' => L10n::t('Connect/Follow'),
|
||||
'$hint' => L10n::t('Examples: Robert Morgenstein, Fishing'),
|
||||
'$findthem' => L10n::t('Find'),
|
||||
'$suggest' => L10n::t('Friend Suggestions'),
|
||||
'$similar' => L10n::t('Similar Interests'),
|
||||
'$random' => L10n::t('Random Profile'),
|
||||
'$inv' => L10n::t('Invite Friends'),
|
||||
'$directory' => L10n::t('View Global Directory'),
|
||||
'$global_dir' => $global_dir
|
||||
));
|
||||
}
|
||||
|
@ -155,10 +155,10 @@ class Widget
|
|||
}
|
||||
|
||||
return replace_macros(get_markup_template('nets.tpl'), array(
|
||||
'$title' => t('Networks'),
|
||||
'$title' => L10n::t('Networks'),
|
||||
'$desc' => '',
|
||||
'$sel_all' => (($selected == '') ? 'selected' : ''),
|
||||
'$all' => t('All Networks'),
|
||||
'$all' => L10n::t('All Networks'),
|
||||
'$nets' => $nets,
|
||||
'$base' => $baseurl,
|
||||
));
|
||||
|
@ -196,10 +196,10 @@ class Widget
|
|||
}
|
||||
|
||||
return replace_macros(get_markup_template('fileas_widget.tpl'), array(
|
||||
'$title' => t('Saved Folders'),
|
||||
'$title' => L10n::t('Saved Folders'),
|
||||
'$desc' => '',
|
||||
'$sel_all' => (($selected == '') ? 'selected' : ''),
|
||||
'$all' => t('Everything'),
|
||||
'$all' => L10n::t('Everything'),
|
||||
'$terms' => $terms,
|
||||
'$base' => $baseurl,
|
||||
));
|
||||
|
@ -236,10 +236,10 @@ class Widget
|
|||
}
|
||||
|
||||
return replace_macros(get_markup_template('categories_widget.tpl'), array(
|
||||
'$title' => t('Categories'),
|
||||
'$title' => L10n::t('Categories'),
|
||||
'$desc' => '',
|
||||
'$sel_all' => (($selected == '') ? 'selected' : ''),
|
||||
'$all' => t('Everything'),
|
||||
'$all' => L10n::t('Everything'),
|
||||
'$terms' => $terms,
|
||||
'$base' => $baseurl,
|
||||
));
|
||||
|
@ -308,7 +308,7 @@ class Widget
|
|||
'$uid' => $profile_uid,
|
||||
'$cid' => (($cid) ? $cid : '0'),
|
||||
'$linkmore' => (($t > 5) ? 'true' : ''),
|
||||
'$more' => t('show more'),
|
||||
'$more' => L10n::t('show more'),
|
||||
'$items' => $r)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file src/Core/NotificationsManager.php
|
||||
* @brief Methods for read and write notifications from/to database
|
||||
* or for formatting notifications
|
||||
*/
|
||||
|
||||
namespace Friendica\Core;
|
||||
|
||||
use Friendica\BaseObject;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -167,35 +166,35 @@ class NotificationsManager extends BaseObject
|
|||
{
|
||||
$tabs = [
|
||||
[
|
||||
'label' => t('System'),
|
||||
'label' => L10n::t('System'),
|
||||
'url' => 'notifications/system',
|
||||
'sel' => ((self::getApp()->argv[1] == 'system') ? 'active' : ''),
|
||||
'id' => 'system-tab',
|
||||
'accesskey' => 'y',
|
||||
],
|
||||
[
|
||||
'label' => t('Network'),
|
||||
'label' => L10n::t('Network'),
|
||||
'url' => 'notifications/network',
|
||||
'sel' => ((self::getApp()->argv[1] == 'network') ? 'active' : ''),
|
||||
'id' => 'network-tab',
|
||||
'accesskey' => 'w',
|
||||
],
|
||||
[
|
||||
'label' => t('Personal'),
|
||||
'label' => L10n::t('Personal'),
|
||||
'url' => 'notifications/personal',
|
||||
'sel' => ((self::getApp()->argv[1] == 'personal') ? 'active' : ''),
|
||||
'id' => 'personal-tab',
|
||||
'accesskey' => 'r',
|
||||
],
|
||||
[
|
||||
'label' => t('Home'),
|
||||
'label' => L10n::t('Home'),
|
||||
'url' => 'notifications/home',
|
||||
'sel' => ((self::getApp()->argv[1] == 'home') ? 'active' : ''),
|
||||
'id' => 'home-tab',
|
||||
'accesskey' => 'h',
|
||||
],
|
||||
[
|
||||
'label' => t('Introductions'),
|
||||
'label' => L10n::t('Introductions'),
|
||||
'url' => 'notifications/intros',
|
||||
'sel' => ((self::getApp()->argv[1] == 'intros') ? 'active' : ''),
|
||||
'id' => 'intro-tab',
|
||||
|
@ -252,7 +251,7 @@ class NotificationsManager extends BaseObject
|
|||
$default_item_link = System::baseUrl(true) . '/display/' . $it['pguid'];
|
||||
$default_item_image = proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO);
|
||||
$default_item_url = $it['author-link'];
|
||||
$default_item_text = sprintf(t("%s commented on %s's post"), $it['author-name'], $it['pname']);
|
||||
$default_item_text = sprintf(L10n::t("%s commented on %s's post"), $it['author-name'], $it['pname']);
|
||||
$default_item_when = datetime_convert('UTC', date_default_timezone_get(), $it['created'], 'r');
|
||||
$default_item_ago = relative_date($it['created']);
|
||||
break;
|
||||
|
@ -263,8 +262,8 @@ class NotificationsManager extends BaseObject
|
|||
$default_item_image = proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO);
|
||||
$default_item_url = $it['author-link'];
|
||||
$default_item_text = (($it['id'] == $it['parent'])
|
||||
? sprintf(t("%s created a new post"), $it['author-name'])
|
||||
: sprintf(t("%s commented on %s's post"), $it['author-name'], $it['pname']));
|
||||
? sprintf(L10n::t("%s created a new post"), $it['author-name'])
|
||||
: sprintf(L10n::t("%s commented on %s's post"), $it['author-name'], $it['pname']));
|
||||
$default_item_when = datetime_convert('UTC', date_default_timezone_get(), $it['created'], 'r');
|
||||
$default_item_ago = relative_date($it['created']);
|
||||
}
|
||||
|
@ -277,7 +276,7 @@ class NotificationsManager extends BaseObject
|
|||
'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
'url' => $it['author-link'],
|
||||
'text' => sprintf(t("%s liked %s's post"), $it['author-name'], $it['pname']),
|
||||
'text' => sprintf(L10n::t("%s liked %s's post"), $it['author-name'], $it['pname']),
|
||||
'when' => $default_item_when,
|
||||
'ago' => $default_item_ago,
|
||||
'seen' => $it['seen']
|
||||
|
@ -290,7 +289,7 @@ class NotificationsManager extends BaseObject
|
|||
'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
'url' => $it['author-link'],
|
||||
'text' => sprintf(t("%s disliked %s's post"), $it['author-name'], $it['pname']),
|
||||
'text' => sprintf(L10n::t("%s disliked %s's post"), $it['author-name'], $it['pname']),
|
||||
'when' => $default_item_when,
|
||||
'ago' => $default_item_ago,
|
||||
'seen' => $it['seen']
|
||||
|
@ -303,7 +302,7 @@ class NotificationsManager extends BaseObject
|
|||
'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
'url' => $it['author-link'],
|
||||
'text' => sprintf(t("%s is attending %s's event"), $it['author-name'], $it['pname']),
|
||||
'text' => sprintf(L10n::t("%s is attending %s's event"), $it['author-name'], $it['pname']),
|
||||
'when' => $default_item_when,
|
||||
'ago' => $default_item_ago,
|
||||
'seen' => $it['seen']
|
||||
|
@ -316,7 +315,7 @@ class NotificationsManager extends BaseObject
|
|||
'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
'url' => $it['author-link'],
|
||||
'text' => sprintf(t("%s is not attending %s's event"), $it['author-name'], $it['pname']),
|
||||
'text' => sprintf(L10n::t("%s is not attending %s's event"), $it['author-name'], $it['pname']),
|
||||
'when' => $default_item_when,
|
||||
'ago' => $default_item_ago,
|
||||
'seen' => $it['seen']
|
||||
|
@ -329,7 +328,7 @@ class NotificationsManager extends BaseObject
|
|||
'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
'url' => $it['author-link'],
|
||||
'text' => sprintf(t("%s may attend %s's event"), $it['author-name'], $it['pname']),
|
||||
'text' => sprintf(L10n::t("%s may attend %s's event"), $it['author-name'], $it['pname']),
|
||||
'when' => $default_item_when,
|
||||
'ago' => $default_item_ago,
|
||||
'seen' => $it['seen']
|
||||
|
@ -346,7 +345,7 @@ class NotificationsManager extends BaseObject
|
|||
'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
'url' => $it['author-link'],
|
||||
'text' => sprintf(t("%s is now friends with %s"), $it['author-name'], $it['fname']),
|
||||
'text' => sprintf(L10n::t("%s is now friends with %s"), $it['author-name'], $it['fname']),
|
||||
'when' => $default_item_when,
|
||||
'ago' => $default_item_ago,
|
||||
'seen' => $it['seen']
|
||||
|
@ -809,7 +808,7 @@ class NotificationsManager extends BaseObject
|
|||
|
||||
$intro = [
|
||||
'label' => 'friend_suggestion',
|
||||
'notify_type' => t('Friend Suggestion'),
|
||||
'notify_type' => L10n::t('Friend Suggestion'),
|
||||
'intro_id' => $it['intro_id'],
|
||||
'madeby' => $it['name'],
|
||||
'contact_id' => $it['contact-id'],
|
||||
|
@ -835,7 +834,7 @@ class NotificationsManager extends BaseObject
|
|||
}
|
||||
$intro = [
|
||||
'label' => (($it['network'] !== NETWORK_OSTATUS) ? 'friend_request' : 'follower'),
|
||||
'notify_type' => (($it['network'] !== NETWORK_OSTATUS) ? t('Friend/Connect Request') : t('New Follower')),
|
||||
'notify_type' => (($it['network'] !== NETWORK_OSTATUS) ? L10n::t('Friend/Connect Request') : L10n::t('New Follower')),
|
||||
'dfrn_id' => $it['issued-id'],
|
||||
'uid' => $_SESSION['uid'],
|
||||
'intro_id' => $it['intro_id'],
|
||||
|
|
|
@ -9,17 +9,18 @@ use Friendica\Core\L10n;
|
|||
use Friendica\Database\DBM;
|
||||
use dba;
|
||||
|
||||
require_once "boot.php";
|
||||
require_once 'boot.php';
|
||||
require_once 'include/dba.php';
|
||||
require_once 'include/enotify.php';
|
||||
require_once "include/text.php";
|
||||
require_once 'include/text.php';
|
||||
|
||||
/**
|
||||
* @brief This class contain functions for the database management
|
||||
*
|
||||
* This class contains functions that doesn't need to know if pdo, mysqli or whatever is used.
|
||||
*/
|
||||
class DBStructure {
|
||||
class DBStructure
|
||||
{
|
||||
/*
|
||||
* Converts all tables from MyISAM to InnoDB
|
||||
*/
|
||||
|
@ -28,7 +29,7 @@ class DBStructure {
|
|||
dbesc(dba::database_name()));
|
||||
|
||||
if (!DBM::is_result($r)) {
|
||||
echo t('There are no tables on MyISAM.')."\n";
|
||||
echo L10n::t('There are no tables on MyISAM.')."\n";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -71,12 +72,12 @@ class DBStructure {
|
|||
$lang = (($admin['language'])?$admin['language']:'en');
|
||||
L10n::pushLang($lang);
|
||||
|
||||
$preamble = deindent(t("
|
||||
$preamble = deindent(L10n::t("
|
||||
The friendica developers released update %s recently,
|
||||
but when I tried to install it, something went terribly wrong.
|
||||
This needs to be fixed soon and I can't do it alone. Please contact a
|
||||
friendica developer if you can not help me on your own. My database might be invalid."));
|
||||
$body = t("The error message is\n[pre]%s[/pre]");
|
||||
$body = L10n::t("The error message is\n[pre]%s[/pre]");
|
||||
$preamble = sprintf($preamble, $update_id);
|
||||
$body = sprintf($body, $error_message);
|
||||
|
||||
|
@ -187,10 +188,10 @@ class DBStructure {
|
|||
* @return string Error message
|
||||
*/
|
||||
private static function printUpdateError($message) {
|
||||
echo sprintf(t("\nError %d occurred during database update:\n%s\n"),
|
||||
echo sprintf(L10n::t("\nError %d occurred during database update:\n%s\n"),
|
||||
dba::errorNo(), dba::errorMessage());
|
||||
|
||||
return t('Errors encountered performing database changes: ').$message.EOL;
|
||||
return L10n::t('Errors encountered performing database changes: ').$message.EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -205,7 +206,7 @@ class DBStructure {
|
|||
public static function update($verbose, $action, array $tables = null, array $definition = null) {
|
||||
if ($action) {
|
||||
Config::set('system', 'maintenance', 1);
|
||||
Config::set('system', 'maintenance_reason', sprintf(t(': Database update'), DBM::date().' '.date('e')));
|
||||
Config::set('system', 'maintenance_reason', sprintf(L10n::t(': Database update'), DBM::date().' '.date('e')));
|
||||
}
|
||||
|
||||
$errors = '';
|
||||
|
@ -455,7 +456,7 @@ class DBStructure {
|
|||
}
|
||||
|
||||
if ($action) {
|
||||
Config::set('system', 'maintenance_reason', sprintf(t('%s: updating %s table.'), DBM::date().' '.date('e'), $name));
|
||||
Config::set('system', 'maintenance_reason', sprintf(L10n::t('%s: updating %s table.'), DBM::date().' '.date('e'), $name));
|
||||
|
||||
// Ensure index conversion to unique removes duplicates
|
||||
if ($is_unique && ($temp_name != $name)) {
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace Friendica\Model;
|
|||
use Friendica\BaseObject;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
|
@ -491,7 +492,7 @@ class Contact extends BaseObject
|
|||
if ($contact['uid'] != $uid) {
|
||||
if ($uid == 0) {
|
||||
$profile_link = Profile::zrl($contact['url']);
|
||||
$menu = ['profile' => [t('View Profile'), $profile_link, true]];
|
||||
$menu = ['profile' => [L10n::t('View Profile'), $profile_link, true]];
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
@ -504,8 +505,8 @@ class Contact extends BaseObject
|
|||
$profile_link = Profile::zrl($contact['url']);
|
||||
$connlnk = 'follow/?url=' . $contact['url'];
|
||||
$menu = [
|
||||
'profile' => [t('View Profile'), $profile_link, true],
|
||||
'follow' => [t('Connect/Follow'), $connlnk, true]
|
||||
'profile' => [L10n::t('View Profile'), $profile_link, true],
|
||||
'follow' => [L10n::t('Connect/Follow'), $connlnk, true]
|
||||
];
|
||||
|
||||
return $menu;
|
||||
|
@ -548,14 +549,14 @@ class Contact extends BaseObject
|
|||
* "name" => [ "Label", "link", (bool)Should the link opened in a new tab? ]
|
||||
*/
|
||||
$menu = [
|
||||
'status' => [t("View Status") , $status_link , true],
|
||||
'profile' => [t("View Profile") , $profile_link , true],
|
||||
'photos' => [t("View Photos") , $photos_link , true],
|
||||
'network' => [t("Network Posts"), $posts_link , false],
|
||||
'edit' => [t("View Contact") , $contact_url , false],
|
||||
'drop' => [t("Drop Contact") , $contact_drop_link, false],
|
||||
'pm' => [t("Send PM") , $pm_url , false],
|
||||
'poke' => [t("Poke") , $poke_link , false],
|
||||
'status' => [L10n::t("View Status") , $status_link , true],
|
||||
'profile' => [L10n::t("View Profile") , $profile_link , true],
|
||||
'photos' => [L10n::t("View Photos") , $photos_link , true],
|
||||
'network' => [L10n::t("Network Posts"), $posts_link , false],
|
||||
'edit' => [L10n::t("View Contact") , $contact_url , false],
|
||||
'drop' => [L10n::t("Drop Contact") , $contact_drop_link, false],
|
||||
'pm' => [L10n::t("Send PM") , $pm_url , false],
|
||||
'poke' => [L10n::t("Poke") , $poke_link , false],
|
||||
];
|
||||
|
||||
$args = ['contact' => $contact, 'menu' => &$menu];
|
||||
|
@ -956,13 +957,13 @@ class Contact extends BaseObject
|
|||
|
||||
switch ($type) {
|
||||
case ACCOUNT_TYPE_ORGANISATION:
|
||||
$account_type = t("Organisation");
|
||||
$account_type = L10n::t("Organisation");
|
||||
break;
|
||||
case ACCOUNT_TYPE_NEWS:
|
||||
$account_type = t('News');
|
||||
$account_type = L10n::t('News');
|
||||
break;
|
||||
case ACCOUNT_TYPE_COMMUNITY:
|
||||
$account_type = t("Forum");
|
||||
$account_type = L10n::t("Forum");
|
||||
break;
|
||||
default:
|
||||
$account_type = "";
|
||||
|
@ -1131,17 +1132,17 @@ class Contact extends BaseObject
|
|||
$url = str_replace('/#!/', '/', $url);
|
||||
|
||||
if (!allowed_url($url)) {
|
||||
$result['message'] = t('Disallowed profile URL.');
|
||||
$result['message'] = L10n::t('Disallowed profile URL.');
|
||||
return $result;
|
||||
}
|
||||
|
||||
if (blocked_url($url)) {
|
||||
$result['message'] = t('Blocked domain');
|
||||
$result['message'] = L10n::t('Blocked domain');
|
||||
return $result;
|
||||
}
|
||||
|
||||
if (!$url) {
|
||||
$result['message'] = t('Connect URL missing.');
|
||||
$result['message'] = L10n::t('Connect URL missing.');
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -1173,8 +1174,8 @@ class Contact extends BaseObject
|
|||
// NOTREACHED
|
||||
}
|
||||
} elseif (Config::get('system', 'dfrn_only')) {
|
||||
$result['message'] = t('This site is not configured to allow communications with other networks.') . EOL;
|
||||
$result['message'] != t('No compatible communication protocols or feeds were discovered.') . EOL;
|
||||
$result['message'] = L10n::t('This site is not configured to allow communications with other networks.') . EOL;
|
||||
$result['message'] != L10n::t('No compatible communication protocols or feeds were discovered.') . EOL;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -1186,30 +1187,30 @@ class Contact extends BaseObject
|
|||
// do we have enough information?
|
||||
|
||||
if (!((x($ret, 'name')) && (x($ret, 'poll')) && ((x($ret, 'url')) || (x($ret, 'addr'))))) {
|
||||
$result['message'] .= t('The profile address specified does not provide adequate information.') . EOL;
|
||||
$result['message'] .= L10n::t('The profile address specified does not provide adequate information.') . EOL;
|
||||
if (!x($ret, 'poll')) {
|
||||
$result['message'] .= t('No compatible communication protocols or feeds were discovered.') . EOL;
|
||||
$result['message'] .= L10n::t('No compatible communication protocols or feeds were discovered.') . EOL;
|
||||
}
|
||||
if (!x($ret, 'name')) {
|
||||
$result['message'] .= t('An author or name was not found.') . EOL;
|
||||
$result['message'] .= L10n::t('An author or name was not found.') . EOL;
|
||||
}
|
||||
if (!x($ret, 'url')) {
|
||||
$result['message'] .= t('No browser URL could be matched to this address.') . EOL;
|
||||
$result['message'] .= L10n::t('No browser URL could be matched to this address.') . EOL;
|
||||
}
|
||||
if (strpos($url, '@') !== false) {
|
||||
$result['message'] .= t('Unable to match @-style Identity Address with a known protocol or email contact.') . EOL;
|
||||
$result['message'] .= t('Use mailto: in front of address to force email check.') . EOL;
|
||||
$result['message'] .= L10n::t('Unable to match @-style Identity Address with a known protocol or email contact.') . EOL;
|
||||
$result['message'] .= L10n::t('Use mailto: in front of address to force email check.') . EOL;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($ret['network'] === NETWORK_OSTATUS && Config::get('system', 'ostatus_disabled')) {
|
||||
$result['message'] .= t('The profile address specified belongs to a network which has been disabled on this site.') . EOL;
|
||||
$result['message'] .= L10n::t('The profile address specified belongs to a network which has been disabled on this site.') . EOL;
|
||||
$ret['notify'] = '';
|
||||
}
|
||||
|
||||
if (!$ret['notify']) {
|
||||
$result['message'] .= t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . EOL;
|
||||
$result['message'] .= L10n::t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . EOL;
|
||||
}
|
||||
|
||||
$writeable = ((($ret['network'] === NETWORK_OSTATUS) && ($ret['notify'])) ? 1 : 0);
|
||||
|
@ -1279,7 +1280,7 @@ class Contact extends BaseObject
|
|||
|
||||
$contact = dba::selectFirst('contact', [], ['url' => $ret['url'], 'network' => $ret['network'], 'uid' => $uid]);
|
||||
if (!DBM::is_result($contact)) {
|
||||
$result['message'] .= t('Unable to retrieve contact information.') . EOL;
|
||||
$result['message'] .= L10n::t('Unable to retrieve contact information.') . EOL;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
/**
|
||||
* @file src/Model/Group.php
|
||||
*/
|
||||
|
||||
namespace Friendica\Model;
|
||||
|
||||
use Friendica\Core\L10n;
|
||||
|
@ -327,7 +326,7 @@ class Group extends BaseObject
|
|||
logger('groups: ' . print_r($display_groups, true));
|
||||
|
||||
if ($label == '') {
|
||||
$label = t('Default privacy group for new contacts');
|
||||
$label = L10n::t('Default privacy group for new contacts');
|
||||
}
|
||||
|
||||
$o = replace_macros(get_markup_template('group_selection.tpl'), [
|
||||
|
@ -360,7 +359,7 @@ class Group extends BaseObject
|
|||
|
||||
$display_groups = [
|
||||
[
|
||||
'text' => t('Everybody'),
|
||||
'text' => L10n::t('Everybody'),
|
||||
'id' => 0,
|
||||
'selected' => (($group_id == 0) ? 'group-selected' : ''),
|
||||
'href' => $every,
|
||||
|
@ -380,7 +379,7 @@ class Group extends BaseObject
|
|||
if ($editmode == 'full') {
|
||||
$groupedit = [
|
||||
'href' => 'group/' . $group['id'],
|
||||
'title' => t('edit'),
|
||||
'title' => L10n::t('edit'),
|
||||
];
|
||||
} else {
|
||||
$groupedit = null;
|
||||
|
@ -399,16 +398,16 @@ class Group extends BaseObject
|
|||
|
||||
$tpl = get_markup_template('group_side.tpl');
|
||||
$o = replace_macros($tpl, [
|
||||
'$add' => t('add'),
|
||||
'$title' => t('Groups'),
|
||||
'$add' => L10n::t('add'),
|
||||
'$title' => L10n::t('Groups'),
|
||||
'$groups' => $display_groups,
|
||||
'newgroup' => $editmode == 'extended' || $editmode == 'full' ? 1 : '',
|
||||
'grouppage' => 'group/',
|
||||
'$edittext' => t('Edit group'),
|
||||
'$ungrouped' => $every === 'contacts' ? t('Contacts not in any group') : '',
|
||||
'$createtext' => t('Create a new group'),
|
||||
'$creategroup' => t('Group Name: '),
|
||||
'$editgroupstext' => t('Edit groups'),
|
||||
'$edittext' => L10n::t('Edit group'),
|
||||
'$ungrouped' => $every === 'contacts' ? L10n::t('Contacts not in any group') : '',
|
||||
'$createtext' => L10n::t('Create a new group'),
|
||||
'$creategroup' => L10n::t('Group Name: '),
|
||||
'$editgroupstext' => L10n::t('Edit groups'),
|
||||
'$form_security_token' => get_form_security_token('group_edit'),
|
||||
]);
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
namespace Friendica\Model;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -35,7 +36,7 @@ class Mail
|
|||
}
|
||||
|
||||
if (!strlen($subject)) {
|
||||
$subject = t('[no subject]');
|
||||
$subject = L10n::t('[no subject]');
|
||||
}
|
||||
|
||||
$me = dba::selectFirst('contact', [], ['uid' => local_user(), 'self' => true]);
|
||||
|
@ -168,7 +169,7 @@ class Mail
|
|||
}
|
||||
|
||||
if (!strlen($subject)) {
|
||||
$subject = t('[no subject]');
|
||||
$subject = L10n::t('[no subject]');
|
||||
}
|
||||
|
||||
$guid = get_guid(32);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
/**
|
||||
* @file src/Model/Profile.php
|
||||
*/
|
||||
|
||||
namespace Friendica\Model;
|
||||
|
||||
use Friendica\App;
|
||||
|
@ -163,7 +162,7 @@ class Profile
|
|||
$a->page['aside'] .= replace_macros(
|
||||
get_markup_template('profile_edlink.tpl'),
|
||||
[
|
||||
'$editprofile' => t('Edit profile'),
|
||||
'$editprofile' => L10n::t('Edit profile'),
|
||||
'$profid' => $a->profile['id']
|
||||
]
|
||||
);
|
||||
|
@ -292,7 +291,7 @@ class Profile
|
|||
|
||||
|
||||
// don't show connect link to yourself
|
||||
$connect = $profile['uid'] != local_user() ? t('Connect') : false;
|
||||
$connect = $profile['uid'] != local_user() ? L10n::t('Connect') : false;
|
||||
|
||||
// don't show connect link to authenticated visitors either
|
||||
if (remote_user() && count($_SESSION['remote'])) {
|
||||
|
@ -331,13 +330,13 @@ class Profile
|
|||
}
|
||||
|
||||
if ($connect && ($profile['network'] == NETWORK_DFRN) && !isset($remoteconnect)) {
|
||||
$subscribe_feed = t('Atom feed');
|
||||
$subscribe_feed = L10n::t('Atom feed');
|
||||
} else {
|
||||
$subscribe_feed = false;
|
||||
}
|
||||
|
||||
if (remote_user() || (self::getMyURL() && x($profile, 'unkmail') && ($profile['uid'] != local_user()))) {
|
||||
$wallmessage = t('Message');
|
||||
$wallmessage = L10n::t('Message');
|
||||
$wallmessage_link = 'wallmessage/' . $profile['nickname'];
|
||||
|
||||
if (remote_user()) {
|
||||
|
@ -367,15 +366,15 @@ class Profile
|
|||
|
||||
// show edit profile to yourself
|
||||
if (!$is_contact && $profile['uid'] == local_user() && Feature::isEnabled(local_user(), 'multi_profiles')) {
|
||||
$profile['edit'] = [System::baseUrl() . '/profiles', t('Profiles'), '', t('Manage/edit profiles')];
|
||||
$profile['edit'] = [System::baseUrl() . '/profiles', L10n::t('Profiles'), '', L10n::t('Manage/edit profiles')];
|
||||
$r = q(
|
||||
"SELECT * FROM `profile` WHERE `uid` = %d",
|
||||
local_user()
|
||||
);
|
||||
|
||||
$profile['menu'] = [
|
||||
'chg_photo' => t('Change profile photo'),
|
||||
'cr_new' => t('Create New Profile'),
|
||||
'chg_photo' => L10n::t('Change profile photo'),
|
||||
'cr_new' => L10n::t('Create New Profile'),
|
||||
'entries' => [],
|
||||
];
|
||||
|
||||
|
@ -384,19 +383,19 @@ class Profile
|
|||
$profile['menu']['entries'][] = [
|
||||
'photo' => $rr['thumb'],
|
||||
'id' => $rr['id'],
|
||||
'alt' => t('Profile Image'),
|
||||
'alt' => L10n::t('Profile Image'),
|
||||
'profile_name' => $rr['profile-name'],
|
||||
'isdefault' => $rr['is-default'],
|
||||
'visibile_to_everybody' => t('visible to everybody'),
|
||||
'edit_visibility' => t('Edit visibility'),
|
||||
'visibile_to_everybody' => L10n::t('visible to everybody'),
|
||||
'edit_visibility' => L10n::t('Edit visibility'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$is_contact && $profile['uid'] == local_user() && !Feature::isEnabled(local_user(), 'multi_profiles')) {
|
||||
$profile['edit'] = [System::baseUrl() . '/profiles/' . $profile['id'], t('Edit profile'), '', t('Edit profile')];
|
||||
$profile['edit'] = [System::baseUrl() . '/profiles/' . $profile['id'], L10n::t('Edit profile'), '', L10n::t('Edit profile')];
|
||||
$profile['menu'] = [
|
||||
'chg_photo' => t('Change profile photo'),
|
||||
'chg_photo' => L10n::t('Change profile photo'),
|
||||
'cr_new' => null,
|
||||
'entries' => [],
|
||||
];
|
||||
|
@ -412,14 +411,14 @@ class Profile
|
|||
|| x($profile, 'postal-code')
|
||||
|| x($profile, 'country-name')
|
||||
) {
|
||||
$location = t('Location:');
|
||||
$location = L10n::t('Location:');
|
||||
}
|
||||
|
||||
$gender = x($profile, 'gender') ? t('Gender:') : false;
|
||||
$marital = x($profile, 'marital') ? t('Status:') : false;
|
||||
$homepage = x($profile, 'homepage') ? t('Homepage:') : false;
|
||||
$about = x($profile, 'about') ? t('About:') : false;
|
||||
$xmpp = x($profile, 'xmpp') ? t('XMPP:') : false;
|
||||
$gender = x($profile, 'gender') ? L10n::t('Gender:') : false;
|
||||
$marital = x($profile, 'marital') ? L10n::t('Status:') : false;
|
||||
$homepage = x($profile, 'homepage') ? L10n::t('Homepage:') : false;
|
||||
$about = x($profile, 'about') ? L10n::t('About:') : false;
|
||||
$xmpp = x($profile, 'xmpp') ? L10n::t('XMPP:') : false;
|
||||
|
||||
if ((x($profile, 'hidewall') || $block) && !local_user() && !remote_user()) {
|
||||
$location = $gender = $marital = $homepage = $about = false;
|
||||
|
@ -513,7 +512,7 @@ class Profile
|
|||
'$marital' => $marital,
|
||||
'$homepage' => $homepage,
|
||||
'$about' => $about,
|
||||
'$network' => t('Network:'),
|
||||
'$network' => L10n::t('Network:'),
|
||||
'$contacts' => $contacts,
|
||||
'$updated' => $updated,
|
||||
'$diaspora' => $diaspora,
|
||||
|
@ -543,8 +542,8 @@ class Profile
|
|||
* return $o;
|
||||
*/
|
||||
|
||||
$bd_format = t('g A l F d'); // 8 AM Friday January 18
|
||||
$bd_short = t('F d');
|
||||
$bd_format = L10n::t('g A l F d'); // 8 AM Friday January 18
|
||||
$bd_short = L10n::t('F d');
|
||||
|
||||
$cachekey = 'get_birthdays:' . local_user();
|
||||
$r = Cache::get($cachekey);
|
||||
|
@ -599,7 +598,7 @@ class Profile
|
|||
|
||||
$rr['link'] = $url;
|
||||
$rr['title'] = $rr['name'];
|
||||
$rr['date'] = day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ? ' ' . t('[today]') : '');
|
||||
$rr['date'] = day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ? ' ' . L10n::t('[today]') : '');
|
||||
$rr['startime'] = null;
|
||||
$rr['today'] = $today;
|
||||
}
|
||||
|
@ -610,8 +609,8 @@ class Profile
|
|||
'$baseurl' => System::baseUrl(),
|
||||
'$classtoday' => $classtoday,
|
||||
'$count' => $total,
|
||||
'$event_reminders' => t('Birthday Reminders'),
|
||||
'$event_title' => t('Birthdays this week:'),
|
||||
'$event_reminders' => L10n::t('Birthday Reminders'),
|
||||
'$event_title' => L10n::t('Birthdays this week:'),
|
||||
'$events' => $r,
|
||||
'$lbr' => '{', // raw brackets mess up if/endif macro processing
|
||||
'$rbr' => '}'
|
||||
|
@ -635,7 +634,7 @@ class Profile
|
|||
* return $o;
|
||||
*/
|
||||
|
||||
$bd_format = t('g A l F d'); // 8 AM Friday January 18
|
||||
$bd_format = L10n::t('g A l F d'); // 8 AM Friday January 18
|
||||
$classtoday = '';
|
||||
|
||||
$s = dba::p(
|
||||
|
@ -670,7 +669,7 @@ class Profile
|
|||
|
||||
$description = substr(strip_tags(bbcode($rr['desc'])), 0, 32) . '... ';
|
||||
if (!$description) {
|
||||
$description = t('[No description]');
|
||||
$description = L10n::t('[No description]');
|
||||
}
|
||||
|
||||
$strt = datetime_convert('UTC', $rr['convert'] ? $a->timezone : 'UTC', $rr['start']);
|
||||
|
@ -683,7 +682,7 @@ class Profile
|
|||
|
||||
$rr['title'] = $title;
|
||||
$rr['description'] = $description;
|
||||
$rr['date'] = day_translate(datetime_convert('UTC', $rr['adjust'] ? $a->timezone : 'UTC', $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '');
|
||||
$rr['date'] = day_translate(datetime_convert('UTC', $rr['adjust'] ? $a->timezone : 'UTC', $rr['start'], $bd_format)) . (($today) ? ' ' . L10n::t('[today]') : '');
|
||||
$rr['startime'] = $strt;
|
||||
$rr['today'] = $today;
|
||||
|
||||
|
@ -697,8 +696,8 @@ class Profile
|
|||
'$baseurl' => System::baseUrl(),
|
||||
'$classtoday' => $classtoday,
|
||||
'$count' => count($r),
|
||||
'$event_reminders' => t('Event Reminders'),
|
||||
'$event_title' => t('Events this week:'),
|
||||
'$event_reminders' => L10n::t('Event Reminders'),
|
||||
'$event_title' => L10n::t('Events this week:'),
|
||||
'$events' => $r,
|
||||
]);
|
||||
}
|
||||
|
@ -710,7 +709,7 @@ class Profile
|
|||
|
||||
$o .= replace_macros(
|
||||
get_markup_template('section_title.tpl'),
|
||||
['$title' => t('Profile')]
|
||||
['$title' => L10n::t('Profile')]
|
||||
);
|
||||
|
||||
if ($a->profile['name']) {
|
||||
|
@ -718,32 +717,32 @@ class Profile
|
|||
|
||||
$profile = [];
|
||||
|
||||
$profile['fullname'] = [t('Full Name:'), $a->profile['name']];
|
||||
$profile['fullname'] = [L10n::t('Full Name:'), $a->profile['name']];
|
||||
|
||||
if ($a->profile['gender']) {
|
||||
$profile['gender'] = [t('Gender:'), $a->profile['gender']];
|
||||
$profile['gender'] = [L10n::t('Gender:'), $a->profile['gender']];
|
||||
}
|
||||
|
||||
if (($a->profile['dob']) && ($a->profile['dob'] > '0001-01-01')) {
|
||||
$year_bd_format = t('j F, Y');
|
||||
$short_bd_format = t('j F');
|
||||
$year_bd_format = L10n::t('j F, Y');
|
||||
$short_bd_format = L10n::t('j F');
|
||||
|
||||
$val = intval($a->profile['dob']) ?
|
||||
day_translate(datetime_convert('UTC', 'UTC', $a->profile['dob'] . ' 00:00 +00:00', $year_bd_format))
|
||||
: day_translate(datetime_convert('UTC', 'UTC', '2001-' . substr($a->profile['dob'], 5) . ' 00:00 +00:00', $short_bd_format));
|
||||
|
||||
$profile['birthday'] = [t('Birthday:'), $val];
|
||||
$profile['birthday'] = [L10n::t('Birthday:'), $val];
|
||||
}
|
||||
|
||||
if (!empty($a->profile['dob'])
|
||||
&& $a->profile['dob'] > '0001-01-01'
|
||||
&& $age = age($a->profile['dob'], $a->profile['timezone'], '')
|
||||
) {
|
||||
$profile['age'] = [t('Age:'), $age];
|
||||
$profile['age'] = [L10n::t('Age:'), $age];
|
||||
}
|
||||
|
||||
if ($a->profile['marital']) {
|
||||
$profile['marital'] = [t('Status:'), $a->profile['marital']];
|
||||
$profile['marital'] = [L10n::t('Status:'), $a->profile['marital']];
|
||||
}
|
||||
|
||||
/// @TODO Maybe use x() here, plus below?
|
||||
|
@ -752,94 +751,94 @@ class Profile
|
|||
}
|
||||
|
||||
if (strlen($a->profile['howlong']) && $a->profile['howlong'] >= NULL_DATE) {
|
||||
$profile['howlong'] = relative_date($a->profile['howlong'], t('for %1$d %2$s'));
|
||||
$profile['howlong'] = relative_date($a->profile['howlong'], L10n::t('for %1$d %2$s'));
|
||||
}
|
||||
|
||||
if ($a->profile['sexual']) {
|
||||
$profile['sexual'] = [t('Sexual Preference:'), $a->profile['sexual']];
|
||||
$profile['sexual'] = [L10n::t('Sexual Preference:'), $a->profile['sexual']];
|
||||
}
|
||||
|
||||
if ($a->profile['homepage']) {
|
||||
$profile['homepage'] = [t('Homepage:'), linkify($a->profile['homepage'])];
|
||||
$profile['homepage'] = [L10n::t('Homepage:'), linkify($a->profile['homepage'])];
|
||||
}
|
||||
|
||||
if ($a->profile['hometown']) {
|
||||
$profile['hometown'] = [t('Hometown:'), linkify($a->profile['hometown'])];
|
||||
$profile['hometown'] = [L10n::t('Hometown:'), linkify($a->profile['hometown'])];
|
||||
}
|
||||
|
||||
if ($a->profile['pub_keywords']) {
|
||||
$profile['pub_keywords'] = [t('Tags:'), $a->profile['pub_keywords']];
|
||||
$profile['pub_keywords'] = [L10n::t('Tags:'), $a->profile['pub_keywords']];
|
||||
}
|
||||
|
||||
if ($a->profile['politic']) {
|
||||
$profile['politic'] = [t('Political Views:'), $a->profile['politic']];
|
||||
$profile['politic'] = [L10n::t('Political Views:'), $a->profile['politic']];
|
||||
}
|
||||
|
||||
if ($a->profile['religion']) {
|
||||
$profile['religion'] = [t('Religion:'), $a->profile['religion']];
|
||||
$profile['religion'] = [L10n::t('Religion:'), $a->profile['religion']];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['about'])) {
|
||||
$profile['about'] = [t('About:'), $txt];
|
||||
$profile['about'] = [L10n::t('About:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['interest'])) {
|
||||
$profile['interest'] = [t('Hobbies/Interests:'), $txt];
|
||||
$profile['interest'] = [L10n::t('Hobbies/Interests:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['likes'])) {
|
||||
$profile['likes'] = [t('Likes:'), $txt];
|
||||
$profile['likes'] = [L10n::t('Likes:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['dislikes'])) {
|
||||
$profile['dislikes'] = [t('Dislikes:'), $txt];
|
||||
$profile['dislikes'] = [L10n::t('Dislikes:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['contact'])) {
|
||||
$profile['contact'] = [t('Contact information and Social Networks:'), $txt];
|
||||
$profile['contact'] = [L10n::t('Contact information and Social Networks:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['music'])) {
|
||||
$profile['music'] = [t('Musical interests:'), $txt];
|
||||
$profile['music'] = [L10n::t('Musical interests:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['book'])) {
|
||||
$profile['book'] = [t('Books, literature:'), $txt];
|
||||
$profile['book'] = [L10n::t('Books, literature:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['tv'])) {
|
||||
$profile['tv'] = [t('Television:'), $txt];
|
||||
$profile['tv'] = [L10n::t('Television:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['film'])) {
|
||||
$profile['film'] = [t('Film/dance/culture/entertainment:'), $txt];
|
||||
$profile['film'] = [L10n::t('Film/dance/culture/entertainment:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['romance'])) {
|
||||
$profile['romance'] = [t('Love/Romance:'), $txt];
|
||||
$profile['romance'] = [L10n::t('Love/Romance:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['work'])) {
|
||||
$profile['work'] = [t('Work/employment:'), $txt];
|
||||
$profile['work'] = [L10n::t('Work/employment:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = prepare_text($a->profile['education'])) {
|
||||
$profile['education'] = [t('School/education:'), $txt];
|
||||
$profile['education'] = [L10n::t('School/education:'), $txt];
|
||||
}
|
||||
|
||||
//show subcribed forum if it is enabled in the usersettings
|
||||
if (Feature::isEnabled($uid, 'forumlist_profile')) {
|
||||
$profile['forumlist'] = [t('Forums:'), ForumManager::profileAdvanced($uid)];
|
||||
$profile['forumlist'] = [L10n::t('Forums:'), ForumManager::profileAdvanced($uid)];
|
||||
}
|
||||
|
||||
if ($a->profile['uid'] == local_user()) {
|
||||
$profile['edit'] = [System::baseUrl() . '/profiles/' . $a->profile['id'], t('Edit profile'), '', t('Edit profile')];
|
||||
$profile['edit'] = [System::baseUrl() . '/profiles/' . $a->profile['id'], L10n::t('Edit profile'), '', L10n::t('Edit profile')];
|
||||
}
|
||||
|
||||
return replace_macros($tpl, [
|
||||
'$title' => t('Profile'),
|
||||
'$basic' => t('Basic'),
|
||||
'$advanced' => t('Advanced'),
|
||||
'$title' => L10n::t('Profile'),
|
||||
'$basic' => L10n::t('Basic'),
|
||||
'$advanced' => L10n::t('Advanced'),
|
||||
'$profile' => $profile
|
||||
]);
|
||||
}
|
||||
|
@ -862,34 +861,34 @@ class Profile
|
|||
|
||||
$tabs = [
|
||||
[
|
||||
'label' => t('Status'),
|
||||
'label' => L10n::t('Status'),
|
||||
'url' => $url,
|
||||
'sel' => !$tab && $a->argv[0] == 'profile' ? 'active' : '',
|
||||
'title' => t('Status Messages and Posts'),
|
||||
'title' => L10n::t('Status Messages and Posts'),
|
||||
'id' => 'status-tab',
|
||||
'accesskey' => 'm',
|
||||
],
|
||||
[
|
||||
'label' => t('Profile'),
|
||||
'label' => L10n::t('Profile'),
|
||||
'url' => $url . '/?tab=profile',
|
||||
'sel' => $tab == 'profile' ? 'active' : '',
|
||||
'title' => t('Profile Details'),
|
||||
'title' => L10n::t('Profile Details'),
|
||||
'id' => 'profile-tab',
|
||||
'accesskey' => 'r',
|
||||
],
|
||||
[
|
||||
'label' => t('Photos'),
|
||||
'label' => L10n::t('Photos'),
|
||||
'url' => System::baseUrl() . '/photos/' . $nickname,
|
||||
'sel' => !$tab && $a->argv[0] == 'photos' ? 'active' : '',
|
||||
'title' => t('Photo Albums'),
|
||||
'title' => L10n::t('Photo Albums'),
|
||||
'id' => 'photo-tab',
|
||||
'accesskey' => 'h',
|
||||
],
|
||||
[
|
||||
'label' => t('Videos'),
|
||||
'label' => L10n::t('Videos'),
|
||||
'url' => System::baseUrl() . '/videos/' . $nickname,
|
||||
'sel' => !$tab && $a->argv[0] == 'videos' ? 'active' : '',
|
||||
'title' => t('Videos'),
|
||||
'title' => L10n::t('Videos'),
|
||||
'id' => 'video-tab',
|
||||
'accesskey' => 'v',
|
||||
],
|
||||
|
@ -898,10 +897,10 @@ class Profile
|
|||
// the calendar link for the full featured events calendar
|
||||
if ($is_owner && $a->theme_events_in_profile) {
|
||||
$tabs[] = [
|
||||
'label' => t('Events'),
|
||||
'label' => L10n::t('Events'),
|
||||
'url' => System::baseUrl() . '/events',
|
||||
'sel' => !$tab && $a->argv[0] == 'events' ? 'active' : '',
|
||||
'title' => t('Events and Calendar'),
|
||||
'title' => L10n::t('Events and Calendar'),
|
||||
'id' => 'events-tab',
|
||||
'accesskey' => 'e',
|
||||
];
|
||||
|
@ -909,10 +908,10 @@ class Profile
|
|||
// with the public events of the calendar owner
|
||||
} elseif (!$is_owner) {
|
||||
$tabs[] = [
|
||||
'label' => t('Events'),
|
||||
'label' => L10n::t('Events'),
|
||||
'url' => System::baseUrl() . '/cal/' . $nickname,
|
||||
'sel' => !$tab && $a->argv[0] == 'cal' ? 'active' : '',
|
||||
'title' => t('Events and Calendar'),
|
||||
'title' => L10n::t('Events and Calendar'),
|
||||
'id' => 'events-tab',
|
||||
'accesskey' => 'e',
|
||||
];
|
||||
|
@ -920,10 +919,10 @@ class Profile
|
|||
|
||||
if ($is_owner) {
|
||||
$tabs[] = [
|
||||
'label' => t('Personal Notes'),
|
||||
'label' => L10n::t('Personal Notes'),
|
||||
'url' => System::baseUrl() . '/notes',
|
||||
'sel' => !$tab && $a->argv[0] == 'notes' ? 'active' : '',
|
||||
'title' => t('Only You Can See This'),
|
||||
'title' => L10n::t('Only You Can See This'),
|
||||
'id' => 'notes-tab',
|
||||
'accesskey' => 't',
|
||||
];
|
||||
|
@ -931,10 +930,10 @@ class Profile
|
|||
|
||||
if ((!$is_owner) && ((count($a->profile)) || (!$a->profile['hide-friends']))) {
|
||||
$tabs[] = [
|
||||
'label' => t('Contacts'),
|
||||
'label' => L10n::t('Contacts'),
|
||||
'url' => System::baseUrl() . '/viewcontacts/' . $nickname,
|
||||
'sel' => !$tab && $a->argv[0] == 'viewcontacts' ? 'active' : '',
|
||||
'title' => t('Contacts'),
|
||||
'title' => L10n::t('Contacts'),
|
||||
'id' => 'viewcontacts-tab',
|
||||
'accesskey' => 'k',
|
||||
];
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file src/Model/User.php
|
||||
* @brief This file includes the User class with user related database functions
|
||||
*/
|
||||
|
||||
namespace Friendica\Model;
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -266,25 +265,25 @@ class User
|
|||
$netpublish = strlen(Config::get('system', 'directory')) ? $publish : 0;
|
||||
|
||||
if ($password1 != $confirm) {
|
||||
throw new Exception(t('Passwords do not match. Password unchanged.'));
|
||||
throw new Exception(L10n::t('Passwords do not match. Password unchanged.'));
|
||||
} elseif ($password1 != '') {
|
||||
$password = $password1;
|
||||
}
|
||||
|
||||
if ($using_invites) {
|
||||
if (!$invite_id) {
|
||||
throw new Exception(t('An invitation is required.'));
|
||||
throw new Exception(L10n::t('An invitation is required.'));
|
||||
}
|
||||
|
||||
if (!dba::exists('register', ['hash' => $invite_id])) {
|
||||
throw new Exception(t('Invitation could not be verified.'));
|
||||
throw new Exception(L10n::t('Invitation could not be verified.'));
|
||||
}
|
||||
}
|
||||
|
||||
if (!x($username) || !x($email) || !x($nickname)) {
|
||||
if ($openid_url) {
|
||||
if (!validate_url($openid_url)) {
|
||||
throw new Exception(t('Invalid OpenID url'));
|
||||
throw new Exception(L10n::t('Invalid OpenID url'));
|
||||
}
|
||||
$_SESSION['register'] = 1;
|
||||
$_SESSION['openid'] = $openid_url;
|
||||
|
@ -297,13 +296,13 @@ class User
|
|||
try {
|
||||
$authurl = $openid->authUrl();
|
||||
} catch (Exception $e) {
|
||||
throw new Exception(t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . EOL . EOL . t('The error message was:') . $e->getMessage(), 0, $e);
|
||||
throw new Exception(L10n::t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . EOL . EOL . L10n::t('The error message was:') . $e->getMessage(), 0, $e);
|
||||
}
|
||||
goaway($authurl);
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
throw new Exception(t('Please enter the required information.'));
|
||||
throw new Exception(L10n::t('Please enter the required information.'));
|
||||
}
|
||||
|
||||
if (!validate_url($openid_url)) {
|
||||
|
@ -316,10 +315,10 @@ class User
|
|||
$username = preg_replace('/ +/', ' ', $username);
|
||||
|
||||
if (mb_strlen($username) > 48) {
|
||||
throw new Exception(t('Please use a shorter name.'));
|
||||
throw new Exception(L10n::t('Please use a shorter name.'));
|
||||
}
|
||||
if (mb_strlen($username) < 3) {
|
||||
throw new Exception(t('Name too short.'));
|
||||
throw new Exception(L10n::t('Name too short.'));
|
||||
}
|
||||
|
||||
// So now we are just looking for a space in the full name.
|
||||
|
@ -327,20 +326,20 @@ class User
|
|||
if (!$loose_reg) {
|
||||
$username = mb_convert_case($username, MB_CASE_TITLE, 'UTF-8');
|
||||
if (!strpos($username, ' ')) {
|
||||
throw new Exception(t("That doesn't appear to be your full \x28First Last\x29 name."));
|
||||
throw new Exception(L10n::t("That doesn't appear to be your full \x28First Last\x29 name."));
|
||||
}
|
||||
}
|
||||
|
||||
if (!allowed_email($email)) {
|
||||
throw new Exception(t('Your email domain is not among those allowed on this site.'));
|
||||
throw new Exception(L10n::t('Your email domain is not among those allowed on this site.'));
|
||||
}
|
||||
|
||||
if (!valid_email($email) || !validate_email($email)) {
|
||||
throw new Exception(t('Not a valid email address.'));
|
||||
throw new Exception(L10n::t('Not a valid email address.'));
|
||||
}
|
||||
|
||||
if (dba::exists('user', ['email' => $email])) {
|
||||
throw new Exception(t('Cannot use that email.'));
|
||||
throw new Exception(L10n::t('Cannot use that email.'));
|
||||
}
|
||||
|
||||
// Disallow somebody creating an account using openid that uses the admin email address,
|
||||
|
@ -348,21 +347,21 @@ class User
|
|||
if (x($a->config, 'admin_email') && strlen($openid_url)) {
|
||||
$adminlist = explode(',', str_replace(' ', '', strtolower($a->config['admin_email'])));
|
||||
if (in_array(strtolower($email), $adminlist)) {
|
||||
throw new Exception(t('Cannot use that email.'));
|
||||
throw new Exception(L10n::t('Cannot use that email.'));
|
||||
}
|
||||
}
|
||||
|
||||
$nickname = $data['nickname'] = strtolower($nickname);
|
||||
|
||||
if (!preg_match('/^[a-z0-9][a-z0-9\_]*$/', $nickname)) {
|
||||
throw new Exception(t('Your "nickname" can only contain "a-z", "0-9" and "_".'));
|
||||
throw new Exception(L10n::t('Your "nickname" can only contain "a-z", "0-9" and "_".'));
|
||||
}
|
||||
|
||||
// Check existing and deleted accounts for this nickname.
|
||||
if (dba::exists('user', ['nickname' => $nickname])
|
||||
|| dba::exists('userd', ['username' => $nickname])
|
||||
) {
|
||||
throw new Exception(t('Nickname is already registered. Please choose another.'));
|
||||
throw new Exception(L10n::t('Nickname is already registered. Please choose another.'));
|
||||
}
|
||||
|
||||
$new_password = strlen($password) ? $password : User::generateNewPassword();
|
||||
|
@ -372,7 +371,7 @@ class User
|
|||
|
||||
$keys = Crypto::newKeypair(4096);
|
||||
if ($keys === false) {
|
||||
throw new Exception(t('SERIOUS ERROR: Generation of security keys failed.'));
|
||||
throw new Exception(L10n::t('SERIOUS ERROR: Generation of security keys failed.'));
|
||||
}
|
||||
|
||||
$prvkey = $keys['prvkey'];
|
||||
|
@ -405,11 +404,11 @@ class User
|
|||
$uid = dba::lastInsertId();
|
||||
$user = dba::selectFirst('user', [], ['uid' => $uid]);
|
||||
} else {
|
||||
throw new Exception(t('An error occurred during registration. Please try again.'));
|
||||
throw new Exception(L10n::t('An error occurred during registration. Please try again.'));
|
||||
}
|
||||
|
||||
if (!$uid) {
|
||||
throw new Exception(t('An error occurred during registration. Please try again.'));
|
||||
throw new Exception(L10n::t('An error occurred during registration. Please try again.'));
|
||||
}
|
||||
|
||||
// if somebody clicked submit twice very quickly, they could end up with two accounts
|
||||
|
@ -418,7 +417,7 @@ class User
|
|||
if ($user_count > 1) {
|
||||
dba::delete('user', ['uid' => $uid]);
|
||||
|
||||
throw new Exception(t('Nickname is already registered. Please choose another.'));
|
||||
throw new Exception(L10n::t('Nickname is already registered. Please choose another.'));
|
||||
}
|
||||
|
||||
$insert_result = dba::insert('profile', [
|
||||
|
@ -429,28 +428,28 @@ class User
|
|||
'publish' => $publish,
|
||||
'is-default' => 1,
|
||||
'net-publish' => $netpublish,
|
||||
'profile-name' => t('default')
|
||||
'profile-name' => L10n::t('default')
|
||||
]);
|
||||
if (!$insert_result) {
|
||||
dba::delete('user', ['uid' => $uid]);
|
||||
|
||||
throw new Exception(t('An error occurred creating your default profile. Please try again.'));
|
||||
throw new Exception(L10n::t('An error occurred creating your default profile. Please try again.'));
|
||||
}
|
||||
|
||||
// Create the self contact
|
||||
if (!Contact::createSelfFromUserId($uid)) {
|
||||
dba::delete('user', ['uid' => $uid]);
|
||||
|
||||
throw new Exception(t('An error occurred creating your self contact. Please try again.'));
|
||||
throw new Exception(L10n::t('An error occurred creating your self contact. Please try again.'));
|
||||
}
|
||||
|
||||
// Create a group with no members. This allows somebody to use it
|
||||
// right away as a default group for new contacts.
|
||||
$def_gid = Group::create($uid, t('Friends'));
|
||||
$def_gid = Group::create($uid, L10n::t('Friends'));
|
||||
if (!$def_gid) {
|
||||
dba::delete('user', ['uid' => $uid]);
|
||||
|
||||
throw new Exception(t('An error occurred creating your default contact group. Please try again.'));
|
||||
throw new Exception(L10n::t('An error occurred creating your default contact group. Please try again.'));
|
||||
}
|
||||
|
||||
$fields = ['def_gid' => $def_gid];
|
||||
|
@ -480,7 +479,7 @@ class User
|
|||
|
||||
$hash = photo_new_resource();
|
||||
|
||||
$r = Photo::store($Image, $uid, 0, $hash, $filename, t('Profile Photos'), 4);
|
||||
$r = Photo::store($Image, $uid, 0, $hash, $filename, L10n::t('Profile Photos'), 4);
|
||||
|
||||
if ($r === false) {
|
||||
$photo_failure = true;
|
||||
|
@ -488,7 +487,7 @@ class User
|
|||
|
||||
$Image->scaleDown(80);
|
||||
|
||||
$r = Photo::store($Image, $uid, 0, $hash, $filename, t('Profile Photos'), 5);
|
||||
$r = Photo::store($Image, $uid, 0, $hash, $filename, L10n::t('Profile Photos'), 5);
|
||||
|
||||
if ($r === false) {
|
||||
$photo_failure = true;
|
||||
|
@ -496,7 +495,7 @@ class User
|
|||
|
||||
$Image->scaleDown(48);
|
||||
|
||||
$r = Photo::store($Image, $uid, 0, $hash, $filename, t('Profile Photos'), 6);
|
||||
$r = Photo::store($Image, $uid, 0, $hash, $filename, L10n::t('Profile Photos'), 6);
|
||||
|
||||
if ($r === false) {
|
||||
$photo_failure = true;
|
||||
|
@ -524,7 +523,7 @@ class User
|
|||
*/
|
||||
public static function sendRegisterPendingEmail($email, $sitename, $username)
|
||||
{
|
||||
$body = deindent(t('
|
||||
$body = deindent(L10n::t('
|
||||
Dear %1$s,
|
||||
Thank you for registering at %2$s. Your account is pending for approval by the administrator.
|
||||
'));
|
||||
|
@ -534,7 +533,7 @@ class User
|
|||
return notification([
|
||||
'type' => SYSTEM_EMAIL,
|
||||
'to_email' => $email,
|
||||
'subject'=> sprintf( t('Registration at %s'), $sitename),
|
||||
'subject'=> sprintf(L10n::t('Registration at %s'), $sitename),
|
||||
'body' => $body]);
|
||||
}
|
||||
|
||||
|
@ -552,11 +551,11 @@ class User
|
|||
*/
|
||||
public static function sendRegisterOpenEmail($email, $sitename, $siteurl, $username, $password)
|
||||
{
|
||||
$preamble = deindent(t('
|
||||
$preamble = deindent(L10n::t('
|
||||
Dear %1$s,
|
||||
Thank you for registering at %2$s. Your account has been created.
|
||||
'));
|
||||
$body = deindent(t('
|
||||
$body = deindent(L10n::t('
|
||||
The login details are as follows:
|
||||
Site Location: %3$s
|
||||
Login Name: %1$s
|
||||
|
@ -588,7 +587,7 @@ class User
|
|||
return notification([
|
||||
'type' => SYSTEM_EMAIL,
|
||||
'to_email' => $email,
|
||||
'subject'=> sprintf( t('Registration details for %s'), $sitename),
|
||||
'subject'=> sprintf(L10n::t('Registration details for %s'), $sitename),
|
||||
'preamble'=> $preamble,
|
||||
'body' => $body]);
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ class Login extends BaseModule
|
|||
$openid->returnUrl = self::getApp()->get_baseurl(true) . '/openid';
|
||||
goaway($openid->authUrl());
|
||||
} catch (Exception $e) {
|
||||
notice(L10n::t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '<br /><br >' . t('The error message was:') . ' ' . $e->getMessage());
|
||||
notice(L10n::t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '<br /><br >' . L10n::t('The error message was:') . ' ' . $e->getMessage());
|
||||
}
|
||||
// NOTREACHED
|
||||
}
|
||||
|
@ -249,8 +249,8 @@ class Login extends BaseModule
|
|||
$reg = false;
|
||||
if ($register) {
|
||||
$reg = [
|
||||
'title' => t('Create a New Account'),
|
||||
'desc' => t('Register')
|
||||
'title' => L10n::t('Create a New Account'),
|
||||
'desc' => L10n::t('Register')
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -278,28 +278,28 @@ class Login extends BaseModule
|
|||
$tpl,
|
||||
[
|
||||
'$dest_url' => self::getApp()->get_baseurl(true) . '/login',
|
||||
'$logout' => t('Logout'),
|
||||
'$login' => t('Login'),
|
||||
'$logout' => L10n::t('Logout'),
|
||||
'$login' => L10n::t('Login'),
|
||||
|
||||
'$lname' => ['username', t('Nickname or Email: ') , '', ''],
|
||||
'$lpassword' => ['password', t('Password: '), '', ''],
|
||||
'$lremember' => ['remember', t('Remember me'), 0, ''],
|
||||
'$lname' => ['username', L10n::t('Nickname or Email: ') , '', ''],
|
||||
'$lpassword' => ['password', L10n::t('Password: '), '', ''],
|
||||
'$lremember' => ['remember', L10n::t('Remember me'), 0, ''],
|
||||
|
||||
'$openid' => !$noid,
|
||||
'$lopenid' => ['openid_url', t('Or login using OpenID: '),'',''],
|
||||
'$lopenid' => ['openid_url', L10n::t('Or login using OpenID: '),'',''],
|
||||
|
||||
'$hiddens' => $hiddens,
|
||||
|
||||
'$register' => $reg,
|
||||
|
||||
'$lostpass' => t('Forgot your password?'),
|
||||
'$lostlink' => t('Password Reset'),
|
||||
'$lostpass' => L10n::t('Forgot your password?'),
|
||||
'$lostlink' => L10n::t('Password Reset'),
|
||||
|
||||
'$tostitle' => t('Website Terms of Service'),
|
||||
'$toslink' => t('terms of service'),
|
||||
'$tostitle' => L10n::t('Website Terms of Service'),
|
||||
'$toslink' => L10n::t('terms of service'),
|
||||
|
||||
'$privacytitle' => t('Website Privacy Policy'),
|
||||
'$privacylink' => t('privacy policy'),
|
||||
'$privacytitle' => L10n::t('Website Privacy Policy'),
|
||||
'$privacylink' => L10n::t('privacy policy'),
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace Friendica\Object;
|
|||
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\Photo;
|
||||
|
@ -944,7 +945,7 @@ class Image
|
|||
$defperm = "";
|
||||
$visitor = 0;
|
||||
|
||||
$r = Photo::store($Image, $uid, $visitor, $hash, $tempfile, t('Wall Photos'), 0, 0, $defperm);
|
||||
$r = Photo::store($Image, $uid, $visitor, $hash, $tempfile, L10n::t('Wall Photos'), 0, 0, $defperm);
|
||||
|
||||
if (!$r) {
|
||||
logger("Picture couldn't be stored", LOGGER_DEBUG);
|
||||
|
@ -960,7 +961,7 @@ class Image
|
|||
|
||||
if ($width > 640 || $height > 640) {
|
||||
$Image->scaleDown(640);
|
||||
$r = Photo::store($Image, $uid, $visitor, $hash, $tempfile, t('Wall Photos'), 1, 0, $defperm);
|
||||
$r = Photo::store($Image, $uid, $visitor, $hash, $tempfile, L10n::t('Wall Photos'), 1, 0, $defperm);
|
||||
if ($r) {
|
||||
$image["medium"] = System::baseUrl()."/photo/{$hash}-1.".$Image->getExt();
|
||||
}
|
||||
|
@ -968,7 +969,7 @@ class Image
|
|||
|
||||
if ($width > 320 || $height > 320) {
|
||||
$Image->scaleDown(320);
|
||||
$r = Photo::store($Image, $uid, $visitor, $hash, $tempfile, t('Wall Photos'), 2, 0, $defperm);
|
||||
$r = Photo::store($Image, $uid, $visitor, $hash, $tempfile, L10n::t('Wall Photos'), 2, 0, $defperm);
|
||||
if ($r) {
|
||||
$image["small"] = System::baseUrl()."/photo/{$hash}-2.".$Image->getExt();
|
||||
}
|
||||
|
@ -993,7 +994,7 @@ class Image
|
|||
$min = 160;
|
||||
$Image->crop(160, $x, $y, $min, $min);
|
||||
|
||||
$r = Photo::store($Image, $uid, $visitor, $hash, $tempfile, t('Wall Photos'), 3, 0, $defperm);
|
||||
$r = Photo::store($Image, $uid, $visitor, $hash, $tempfile, L10n::t('Wall Photos'), 3, 0, $defperm);
|
||||
if ($r) {
|
||||
$image["thumb"] = System::baseUrl()."/photo/{$hash}-3.".$Image->getExt();
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ class Post extends BaseObject
|
|||
// only if the difference is more than 1 second.
|
||||
if (strtotime($item['edited']) - strtotime($item['created']) > 1) {
|
||||
$edited = [
|
||||
'label' => t('This entry was edited'),
|
||||
'label' => L10n::t('This entry was edited'),
|
||||
'date' => datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r'),
|
||||
'relative' => relative_date($item['edited'])
|
||||
];
|
||||
|
@ -144,15 +144,15 @@ class Post extends BaseObject
|
|||
|
||||
$lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|
||||
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
|
||||
? t('Private Message')
|
||||
? L10n::t('Private Message')
|
||||
: false);
|
||||
$shareable = in_array($conv->getProfileOwner(), [0, local_user()]) && $item['private'] != 1;
|
||||
|
||||
if (local_user() && link_compare($a->contact['url'], $item['author-link'])) {
|
||||
if ($item["event-id"] != 0) {
|
||||
$edpost = ["events/event/" . $item['event-id'], t("Edit")];
|
||||
$edpost = ["events/event/" . $item['event-id'], L10n::t("Edit")];
|
||||
} else {
|
||||
$edpost = ["editpost/" . $item['id'], t("Edit")];
|
||||
$edpost = ["editpost/" . $item['id'], L10n::t("Edit")];
|
||||
}
|
||||
$dropping = in_array($item['uid'], [0, local_user()]);
|
||||
} else {
|
||||
|
@ -173,11 +173,11 @@ class Post extends BaseObject
|
|||
$drop = [
|
||||
'dropping' => $dropping,
|
||||
'pagedrop' => ((Feature::isEnabled($conv->getProfileOwner(), 'multi_delete')) ? $item['pagedrop'] : ''),
|
||||
'select' => t('Select'),
|
||||
'delete' => t('Delete'),
|
||||
'select' => L10n::t('Select'),
|
||||
'delete' => L10n::t('Delete'),
|
||||
];
|
||||
|
||||
$filer = (($conv->getProfileOwner() == local_user() && ($item['uid'] != 0)) ? t("save to folder") : false);
|
||||
$filer = (($conv->getProfileOwner() == local_user() && ($item['uid'] != 0)) ? L10n::t("save to folder") : false);
|
||||
|
||||
$diff_author = !link_compare($item['url'], $item['author-link']);
|
||||
$profile_name = htmlentities(((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']);
|
||||
|
@ -230,7 +230,7 @@ class Post extends BaseObject
|
|||
$response_verbs[] = 'attendmaybe';
|
||||
if ($conv->isWritable()) {
|
||||
$isevent = true;
|
||||
$attend = [t('I will attend'), t('I will not attend'), t('I might attend')];
|
||||
$attend = [L10n::t('I will attend'), L10n::t('I will not attend'), L10n::t('I might attend')];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,29 +258,29 @@ class Post extends BaseObject
|
|||
$isstarred = (($item['starred']) ? "starred" : "unstarred");
|
||||
|
||||
$star = [
|
||||
'do' => t("add star"),
|
||||
'undo' => t("remove star"),
|
||||
'toggle' => t("toggle star status"),
|
||||
'do' => L10n::t("add star"),
|
||||
'undo' => L10n::t("remove star"),
|
||||
'toggle' => L10n::t("toggle star status"),
|
||||
'classdo' => $item['starred'] ? "hidden" : "",
|
||||
'classundo' => $item['starred'] ? "" : "hidden",
|
||||
'starred' => t('starred'),
|
||||
'starred' => L10n::t('starred'),
|
||||
];
|
||||
|
||||
$thread = dba::selectFirst('thread', ['ignored'], ['uid' => $item['uid'], 'iid' => $item['id']]);
|
||||
if (DBM::is_result($thread)) {
|
||||
$ignore = [
|
||||
'do' => t("ignore thread"),
|
||||
'undo' => t("unignore thread"),
|
||||
'toggle' => t("toggle ignore status"),
|
||||
'do' => L10n::t("ignore thread"),
|
||||
'undo' => L10n::t("unignore thread"),
|
||||
'toggle' => L10n::t("toggle ignore status"),
|
||||
'classdo' => $thread['ignored'] ? "hidden" : "",
|
||||
'classundo' => $thread['ignored'] ? "" : "hidden",
|
||||
'ignored' => t('ignored'),
|
||||
'ignored' => L10n::t('ignored'),
|
||||
];
|
||||
}
|
||||
|
||||
if (Feature::isEnabled($conv->getProfileOwner(), 'commtag')) {
|
||||
$tagger = [
|
||||
'add' => t("add tag"),
|
||||
'add' => L10n::t("add tag"),
|
||||
'class' => "",
|
||||
];
|
||||
}
|
||||
|
@ -291,11 +291,11 @@ class Post extends BaseObject
|
|||
|
||||
if ($conv->isWritable()) {
|
||||
$buttons = [
|
||||
'like' => [t("I like this \x28toggle\x29"), t("like")],
|
||||
'dislike' => Feature::isEnabled($conv->getProfileOwner(), 'dislike') ? [t("I don't like this \x28toggle\x29"), t("dislike")] : '',
|
||||
'like' => [L10n::t("I like this \x28toggle\x29"), L10n::t("like")],
|
||||
'dislike' => Feature::isEnabled($conv->getProfileOwner(), 'dislike') ? [L10n::t("I don't like this \x28toggle\x29"), L10n::t("dislike")] : '',
|
||||
];
|
||||
if ($shareable) {
|
||||
$buttons['share'] = [t('Share this'), t('share')];
|
||||
$buttons['share'] = [L10n::t('Share this'), L10n::t('share')];
|
||||
}
|
||||
|
||||
// If a contact isn't writable, we cannot send a like or dislike to it
|
||||
|
@ -345,8 +345,8 @@ class Post extends BaseObject
|
|||
'tags' => $item['tags'],
|
||||
'hashtags' => $item['hashtags'],
|
||||
'mentions' => $item['mentions'],
|
||||
'txt_cats' => t('Categories:'),
|
||||
'txt_folders' => t('Filed under:'),
|
||||
'txt_cats' => L10n::t('Categories:'),
|
||||
'txt_folders' => L10n::t('Filed under:'),
|
||||
'has_cats' => ((count($categories)) ? 'true' : ''),
|
||||
'has_folders' => ((count($folders)) ? 'true' : ''),
|
||||
'categories' => $categories,
|
||||
|
@ -357,12 +357,12 @@ class Post extends BaseObject
|
|||
'guid' => urlencode($item['guid']),
|
||||
'isevent' => $isevent,
|
||||
'attend' => $attend,
|
||||
'linktitle' => t('View %s\'s profile @ %s', $profile_name, defaults($item, 'author-link', $item['url'])),
|
||||
'olinktitle' => t('View %s\'s profile @ %s', htmlentities($this->getOwnerName()), defaults($item, 'owner-link', $item['url'])),
|
||||
'to' => t('to'),
|
||||
'via' => t('via'),
|
||||
'wall' => t('Wall-to-Wall'),
|
||||
'vwall' => t('via Wall-To-Wall:'),
|
||||
'linktitle' => L10n::t('View %s\'s profile @ %s', $profile_name, defaults($item, 'author-link', $item['url'])),
|
||||
'olinktitle' => L10n::t('View %s\'s profile @ %s', htmlentities($this->getOwnerName()), defaults($item, 'owner-link', $item['url'])),
|
||||
'to' => L10n::t('to'),
|
||||
'via' => L10n::t('via'),
|
||||
'wall' => L10n::t('Wall-to-Wall'),
|
||||
'vwall' => L10n::t('via Wall-To-Wall:'),
|
||||
'profile_url' => $profile_link,
|
||||
'item_photo_menu' => item_photo_menu($item),
|
||||
'name' => $name_e,
|
||||
|
@ -371,7 +371,7 @@ class Post extends BaseObject
|
|||
'sparkle' => $sparkle,
|
||||
'title' => $title_e,
|
||||
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
|
||||
'ago' => $item['app'] ? t('%s from %s', relative_date($item['created']), $item['app']) : relative_date($item['created']),
|
||||
'ago' => $item['app'] ? L10n::t('%s from %s', relative_date($item['created']), $item['app']) : relative_date($item['created']),
|
||||
'app' => $item['app'],
|
||||
'created' => relative_date($item['created']),
|
||||
'lock' => $lock,
|
||||
|
@ -393,10 +393,10 @@ class Post extends BaseObject
|
|||
'like' => $responses['like']['output'],
|
||||
'dislike' => $responses['dislike']['output'],
|
||||
'responses' => $responses,
|
||||
'switchcomment' => t('Comment'),
|
||||
'switchcomment' => L10n::t('Comment'),
|
||||
'comment' => $comment,
|
||||
'previewing' => $conv->isPreview() ? ' preview ' : '',
|
||||
'wait' => t('Please wait'),
|
||||
'wait' => L10n::t('Please wait'),
|
||||
'thread_level' => $thread_level,
|
||||
'edited' => $edited,
|
||||
'network' => $item["item_network"],
|
||||
|
@ -424,7 +424,7 @@ class Post extends BaseObject
|
|||
$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'] = L10n::tt('comment', 'comments', $total_children);
|
||||
$result['children'][0]['hide_text'] = t('show more');
|
||||
$result['children'][0]['hide_text'] = L10n::t('show more');
|
||||
if ($thread_level > 1) {
|
||||
$result['children'][$nb_children - 1]['comment_lastcollapsed'] = true;
|
||||
} else {
|
||||
|
@ -787,21 +787,21 @@ class Post extends BaseObject
|
|||
'$qcomment' => $qcomment,
|
||||
'$profile_uid' => $uid,
|
||||
'$mylink' => $a->remove_baseurl($a->contact['url']),
|
||||
'$mytitle' => t('This is you'),
|
||||
'$mytitle' => L10n::t('This is you'),
|
||||
'$myphoto' => $a->remove_baseurl($a->contact['thumb']),
|
||||
'$comment' => t('Comment'),
|
||||
'$submit' => t('Submit'),
|
||||
'$edbold' => t('Bold'),
|
||||
'$editalic' => t('Italic'),
|
||||
'$eduline' => t('Underline'),
|
||||
'$edquote' => t('Quote'),
|
||||
'$edcode' => t('Code'),
|
||||
'$edimg' => t('Image'),
|
||||
'$edurl' => t('Link'),
|
||||
'$edvideo' => t('Video'),
|
||||
'$preview' => ((Feature::isEnabled($conv->getProfileOwner(), 'preview')) ? t('Preview') : ''),
|
||||
'$comment' => L10n::t('Comment'),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$edbold' => L10n::t('Bold'),
|
||||
'$editalic' => L10n::t('Italic'),
|
||||
'$eduline' => L10n::t('Underline'),
|
||||
'$edquote' => L10n::t('Quote'),
|
||||
'$edcode' => L10n::t('Code'),
|
||||
'$edimg' => L10n::t('Image'),
|
||||
'$edurl' => L10n::t('Link'),
|
||||
'$edvideo' => L10n::t('Video'),
|
||||
'$preview' => ((Feature::isEnabled($conv->getProfileOwner(), 'preview')) ? L10n::t('Preview') : ''),
|
||||
'$indent' => $indent,
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$sourceapp' => L10n::t($a->sourcename),
|
||||
'$ww' => $conv->getMode() === 'network' ? $ww : '',
|
||||
'$rand_num' => random_digits(12)
|
||||
]);
|
||||
|
|
|
@ -7,6 +7,7 @@ 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;
|
||||
|
@ -1258,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];
|
||||
|
@ -1787,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";
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace Friendica\Worker;
|
|||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Queue;
|
||||
|
@ -388,7 +389,7 @@ class Delivery {
|
|||
$reply_to = $r1[0]['reply_to'];
|
||||
}
|
||||
|
||||
$subject = (($it['title']) ? Email::encodeHeader($it['title'],'UTF-8') : t("\x28no subject\x29")) ;
|
||||
$subject = (($it['title']) ? Email::encodeHeader($it['title'],'UTF-8') : L10n::t("\x28no subject\x29")) ;
|
||||
|
||||
// only expose our real email address to true friends
|
||||
|
||||
|
@ -400,7 +401,7 @@ class Delivery {
|
|||
$headers = 'From: '.Email::encodeHeader($local_user[0]['username'],'UTF-8').' <'.$local_user[0]['email'].'>'."\n";
|
||||
}
|
||||
} else {
|
||||
$headers = 'From: '. Email::encodeHeader($local_user[0]['username'],'UTF-8') .' <'. t('noreply') .'@'.$a->get_hostname() .'>'. "\n";
|
||||
$headers = 'From: '. Email::encodeHeader($local_user[0]['username'],'UTF-8') .' <'. L10n::t('noreply') .'@'.$a->get_hostname() .'>'. "\n";
|
||||
}
|
||||
|
||||
//if ($reply_to)
|
||||
|
|
Loading…
Reference in a new issue