Compare commits

...

13 Commits

Author SHA1 Message Date
Hypolite Petovan df660b66c9 [v2.4.0] Bump version number for release 2022-05-12 09:15:19 -04:00
heluecht 3f38b3adea Merge pull request 'Remove obsolete profile.dfrn_request field' (#87) from MrPetovan/friendica-directory:task/86-remove-dfrn_request into stable
Reviewed-on: friendica/friendica-directory#87
2022-05-11 04:17:41 +00:00
Hypolite Petovan e65bb660ce [Database v0010] Drop unused column profile.dfrn_request 2022-05-07 16:10:43 -04:00
Hypolite Petovan a5700cb2c9 Remove references to dfrn_request 2022-05-07 16:10:43 -04:00
Hypolite Petovan 2627b54349 Replace dfrn_request by subscribe URL when available for the follow link
- Falls back to the `/remote_follow` module available since Friendica version 2020.03
- Falls back to the profile URL
- Remove unused atlas dependency in a couple API controllers
2022-05-07 16:10:42 -04:00
Hypolite Petovan 8988ad9f9d Add subscribe URL retrieval to server poll 2022-05-07 16:09:30 -04:00
Hypolite Petovan 7d5012e72e [Database v0009] Add server.subscribe_url field 2022-05-07 16:09:30 -04:00
Hypolite Petovan b0142f6ab2 Add optional version parameter to console updatedb 2022-05-07 16:09:29 -04:00
Hypolite Petovan cd809f7646 Remove mention of non-existent console parameters in Install and UpdateDb 2022-05-07 16:09:29 -04:00
Hypolite Petovan 2aba91d42c Add HTML link to profile to account name
- Normalize white space in HTML
2022-05-07 16:09:27 -04:00
Hypolite Petovan 2e84f5aa7b Merge pull request 'added DA DK translation THX atjn' (#88) from tobias/friendica-directory:20220501-daDK into stable
Reviewed-on: friendica/friendica-directory#88
2022-05-04 21:45:51 +00:00
Tobias Diekershoff 1ebddb042f
PL translation updated THX strebski 2022-05-03 09:17:55 +02:00
Tobias Diekershoff 0344c77336
added DA DK translation THX atjn 2022-05-01 20:17:13 +02:00
26 changed files with 570 additions and 89 deletions

View File

@ -1 +1 @@
2.3.5
2.4.0

View File

@ -44,10 +44,11 @@ Example:
"region": "New York",
"country": "USA",
"profile_url": "https://friendica.mrpetovan.com/profile/hypolite",
"dfrn_request": "https://friendica.mrpetovan.com/dfrn_request/hypolite",
"photo": "https://friendica.mrpetovan.com/photo/27330388315ae4ed2b03e3c116980490-4.jpg?ts=1541567135",
"tags": "videogame gaming boardgame politics philosophy development programming php",
"last_activity": "2018-45"
"last_activity": "2018-45",
"remote_follow": "https://friendica.mrpetovan.com/remote_follow/hypolite",
"subscribe": null
},
...
]

View File

@ -11,10 +11,6 @@ use Psr\Http\Message\ServerRequestInterface;
*/
class MatchSearch
{
/**
* @var \Atlas\Pdo\Connection
*/
private $atlas;
/**
* @var \Friendica\Directory\Models\Profile
*/
@ -25,12 +21,10 @@ class MatchSearch
private $l10n;
public function __construct(
\Atlas\Pdo\Connection $atlas,
\Friendica\Directory\Models\Profile $profileModel,
\Gettext\TranslatorInterface $l10n
)
{
$this->atlas = $atlas;
$this->profileModel = $profileModel;
$this->l10n = $l10n;
}
@ -53,7 +47,13 @@ class MatchSearch
$values = ['query' => $query];
$profiles = $this->profileModel->getListForDisplay($pager->getItemsPerPage(), $pager->getStart(), $sql_where, $values);
$profiles = $this->profileModel->getListForDisplay(
null,
$pager->getItemsPerPage(),
$pager->getStart(),
$sql_where,
$values,
);
$results = [];
foreach ($profiles as $profile) {

View File

@ -11,10 +11,6 @@ use Psr\Http\Message\ServerRequestInterface;
*/
class Search
{
/**
* @var \Atlas\Pdo\Connection
*/
private $atlas;
/**
* @var \Friendica\Directory\Models\Profile
*/
@ -25,12 +21,10 @@ class Search
private $l10n;
public function __construct(
\Atlas\Pdo\Connection $atlas,
\Friendica\Directory\Models\Profile $profileModel,
\Gettext\TranslatorInterface $l10n
)
{
$this->atlas = $atlas;
$this->profileModel = $profileModel;
$this->l10n = $l10n;
}
@ -64,7 +58,13 @@ AND `account_type` = :account_type';
$values['account_type'] = $account_type;
}
$profiles = $this->profileModel->getListForDisplay($pager->getItemsPerPage(), $pager->getStart(), $sql_where, $values);
$profiles = $this->profileModel->getListForDisplay(
null,
$pager->getItemsPerPage(),
$pager->getStart(),
$sql_where,
$values,
);
$count = $this->profileModel->getCountForDisplay($sql_where, $values);

View File

@ -31,9 +31,9 @@ class Install extends \Asika\SimpleConsole\Console
protected function getHelp()
{
$help = <<<HELP
console install - Install directory
console install - Install wizard
Usage
bin/console install <server_url> [-h|--help|-?] [-v]
bin/console install [-h|--help|-?] [-v]
Description
Install directory

View File

@ -37,12 +37,14 @@ class UpdateDb extends \Asika\SimpleConsole\Console
$help = <<<HELP
console updatedb - Update database schema
Usage
bin/console updatedb <server_url> [-h|--help|-?] [-v]
bin/console updatedb [<version>] [-h|--help|-?] [-v]
Description
Update database schema
Options
<version> Optional target version number, default is the latest version.
Do not use this parameter if you're not sure what you're doing, it will result in data loss!
-h|--help|-? Show help information
-v Show more debug information.
HELP;
@ -56,16 +58,38 @@ HELP;
return 0;
}
if (count($this->args) > 1) {
if (count($this->args) > 2) {
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
}
$this->out('Updating database schema to latest version...');
$currentVersion = $this->migration->getCurrentVersion()['version'];
$this->migration->up();
$this->out('Database schema currently in version ' . $currentVersion);
$this->out('Database schema migrated to version ' . $this->migration->getCurrentVersion()['version']);
if (count($this->args) == 1) {
$this->out('Updating database schema to latest version...');
$this->migration->up();
$this->out('Database schema migrated to version ' . $this->migration->getCurrentVersion()['version']);
return 0;
}
$target = $this->getArgument(1);
if ($target > $currentVersion) {
$this->out('Updating database schema to version ' . $target);
$this->migration->up($target);
$this->out('Database schema migrated up to version ' . $this->migration->getCurrentVersion()['version']);
return 0;
}
if ($target < $currentVersion) {
$this->out('Downgrading database schema to version ' . $target);
$this->migration->down($target);
$this->out('Database schema migrated down to version ' . $this->migration->getCurrentVersion()['version']);
return 0;
}
$this->out('Target version equal to current version, exiting.');
return 0;
}
}

View File

@ -18,6 +18,10 @@ class Directory extends BaseController
* @var \Atlas\Pdo\Connection
*/
private $atlas;
/**
* @var \Friendica\Directory\Models\Server
*/
private $serverModel;
/**
* @var \Friendica\Directory\Models\Profile
*/
@ -37,6 +41,7 @@ class Directory extends BaseController
public function __construct(
\Atlas\Pdo\Connection $atlas,
\Friendica\Directory\Models\Server $serverModel,
\Friendica\Directory\Models\Profile $profileModel,
\Friendica\Directory\Views\Widget\AccountTypeTabs $accountTypeTabs,
\Friendica\Directory\Views\PhpRenderer $renderer,
@ -44,6 +49,7 @@ class Directory extends BaseController
)
{
$this->atlas = $atlas;
$this->serverModel = $serverModel;
$this->profileModel = $profileModel;
$this->accountTypeTabs = $accountTypeTabs;
$this->renderer = $renderer;
@ -58,16 +64,22 @@ class Directory extends BaseController
$pager = new Pager($this->l10n, $request, 20);
$condition = '';
$sql_where = '';
$values = [];
if (!empty($args['account_type'])) {
$condition = '`account_type` = :account_type';
$sql_where = '`account_type` = :account_type';
$values = ['account_type' => $args['account_type']];
}
$profiles = $this->profileModel->getListForDisplay($pager->getItemsPerPage(), $pager->getStart(), $condition, $values);
$profiles = $this->profileModel->getListForDisplay(
$this->serverModel->getSubscribeUrlByProfile($request->getQueryParam('zrl', '')),
$pager->getItemsPerPage(),
$pager->getStart(),
$sql_where,
$values,
);
$count = $this->profileModel->getCountForDisplay($condition, $values);
$count = $this->profileModel->getCountForDisplay($sql_where, $values);
$vars = [
'title' => $this->l10n->gettext('People'),
@ -82,7 +94,6 @@ class Directory extends BaseController
$content = $this->renderer->fetch('directory.phtml', $vars);
// Render index view
return ['content' => $content];
}
}

View File

@ -13,6 +13,10 @@ class Search extends BaseController
* @var \Atlas\Pdo\Connection
*/
private $atlas;
/**
* @var \Friendica\Directory\Models\Server
*/
private $serverModel;
/**
* @var \Friendica\Directory\Models\Profile
*/
@ -32,6 +36,7 @@ class Search extends BaseController
public function __construct(
\Atlas\Pdo\Connection $atlas,
\Friendica\Directory\Models\Server $serverModel,
\Friendica\Directory\Models\Profile $profileModel,
\Friendica\Directory\Views\Widget\AccountTypeTabs $accountTypeTabs,
\Friendica\Directory\Views\PhpRenderer $renderer,
@ -39,6 +44,7 @@ class Search extends BaseController
)
{
$this->atlas = $atlas;
$this->serverModel = $serverModel;
$this->profileModel = $profileModel;
$this->accountTypeTabs = $accountTypeTabs;
$this->renderer = $renderer;
@ -89,7 +95,13 @@ AND `account_type` = :account_type';
$values['account_type'] = $account_type;
}
$profiles = $this->profileModel->getListForDisplay($pager->getItemsPerPage(), $pager->getStart(), $sql_where, $values);
$profiles = $this->profileModel->getListForDisplay(
$this->serverModel->getSubscribeUrlByProfile($request->getQueryParam('zrl', '')),
$pager->getItemsPerPage(),
$pager->getStart(),
$sql_where,
$values,
);
$count = $this->profileModel->getCountForDisplay($sql_where, $values);
@ -106,7 +118,6 @@ AND `account_type` = :account_type';
$content = $this->renderer->fetch('search.phtml', $vars);
// Render index view
return ['content' => $content, 'noNavSearch' => true];
}
}

View File

@ -74,7 +74,7 @@ class Profile extends \Friendica\Directory\Model
];
}
public function getListForDisplay(int $limit = 30, int $start = 0, string $condition = '', array $values = []): array
public function getListForDisplay(string $subscribeUrl = null, int $limit = 30, int $start = 0, string $condition = '', array $values = []): array
{
if ($condition) {
$condition = 'AND ' . $condition;
@ -86,8 +86,8 @@ class Profile extends \Friendica\Directory\Model
]);
$stmt = 'SELECT p.`id`, p.`name`, p.`username`, p.`addr`, p.`account_type`, p.`language`,
p.`pdesc`, p.`locality`, p.`region`, p.`country`, p.`profile_url`, p.`dfrn_request`,
p.`photo`, p.`tags`, p.`last_activity`
p.`pdesc`, p.`locality`, p.`region`, p.`country`, p.`profile_url`,
p.`photo`, p.`tags`, p.`last_activity`, s.`version`
FROM `profile` p
JOIN `server` s ON s.`id` = p.`server_id` AND s.`available` AND NOT s.`hidden`
WHERE p.`available`
@ -98,6 +98,12 @@ class Profile extends \Friendica\Directory\Model
LIMIT :start, :limit';
$profiles = $this->atlas->fetchAll($stmt, $values);
array_walk($profiles, function (array &$profile) use ($subscribeUrl) {
$profile['remote_follow'] = version_compare($profile['version'], '2020.03', '>=') ? str_replace('/profile/', '/remote_follow/', $profile['profile_url']) : null;
$profile['subscribe'] = $subscribeUrl ? str_replace('{uri}', urlencode($profile['profile_url']), $subscribeUrl): null;
unset($profile['version']);
});
return $profiles;
}

View File

@ -41,4 +41,20 @@ class Server extends \Friendica\Directory\Model
'alias' => strtolower($server_alias)
]);
}
/**
* Returns the complete subscribe URL of the given profile URL if we have it for the related server
*
* @param string $profile_url
* @return mixed|null
*/
public function getSubscribeUrlByProfile(string $profile_url)
{
if (preg_match('#^(.+)/profile/#', $profile_url, $matches)) {
$server = $this->getByUrlAlias($matches[1]);
return $server['subscribe_url'] ?? null;
}
return null;
}
}

View File

@ -9,7 +9,6 @@ use Friendica\Directory\Utils\Network;
*/
class Profile
{
const PROFILE_MISSING_REQUEST = 1;
const PROFILE_MISSING_CONFIRM = 2;
const PROFILE_MISSING_NOTIFY = 4;
const PROFILE_MISSING_POLL = 8;
@ -177,9 +176,6 @@ class Profile
// This is most likely a problem with the site configuration. Ignore.
if ($error = self::validateParams($params)) {
$this->logger->warning('Poll aborted, parameters invalid.', ['params' => $params]);
if ($error & Profile::PROFILE_MISSING_REQUEST) {
$this->logger->notice('dfrn-request parameter is empty.');
}
if ($error & Profile::PROFILE_MISSING_CONFIRM) {
$this->logger->notice('dfrn-confirm parameter is empty.');
}
@ -232,7 +228,6 @@ class Profile
'region' => $params['region'] ?? '',
'country' => $params['country-name'] ?? '',
'profile_url' => $profile_uri,
'dfrn_request' => $params['dfrn-request'] ?? null,
'photo' => $params['photo'],
'tags' => implode(' ', $tags),
'addr' => $addr,
@ -254,7 +249,6 @@ class Profile
`region` = :region,
`country` = :country,
`profile_url` = :profile_url,
`dfrn_request` = :dfrn_request,
`photo` = :photo,
`tags` = :tags,
`addr` = :addr,
@ -274,7 +268,6 @@ class Profile
`region` = :region,
`country` = :country,
`profile_url` = :profile_url,
`dfrn_request` = :dfrn_request,
`photo` = :photo,
`tags` = :tags,
`addr` = :addr,
@ -361,9 +354,6 @@ class Profile
private static function validateParams(array $params): int
{
$errors = 0;
if (empty($params['dfrn-request'])) {
$errors &= self::PROFILE_MISSING_REQUEST;
}
if (empty($params['dfrn-confirm'])) {
$errors &= self::PROFILE_MISSING_CONFIRM;
}

View File

@ -147,6 +147,10 @@ class Server
$addons = $probe_result['data']['plugins'];
}
if ($probe_result['data']['admin']['profile']) {
$subscribe = $this->getSubscribeUrl($probe_result['data']['url'], $probe_result['data']['admin']['profile']);
}
$this->atlas->perform(
'UPDATE `server`
SET `available` = 1,
@ -161,6 +165,7 @@ class Server
`admin_name` = :admin_name,
`admin_profile` = :admin_profile,
`noscrape_url` = :noscrape_url,
`subscribe_url` = :subscribe_url,
`ssl_state` = :ssl_state
WHERE `id` = :server_id',
[
@ -175,6 +180,7 @@ class Server
'admin_name' => $probe_result['data']['admin']['name'],
'admin_profile' => $probe_result['data']['admin']['profile'],
'noscrape_url' => $probe_result['data']['no_scrape_url'] ?? null,
'subscribe_url' => $subscribe ?? null,
'ssl_state' => $probe_result['ssl_state']
]
);
@ -452,4 +458,38 @@ class Server
}
}
}
public function getSubscribeUrl($base_url, $profile)
{
$xrdRequest = new WebRequest($base_url . '/xrd');
$xrdRequest->addRequestHeader('Accept', 'application/jrd+json');
$xrdJsonData = $xrdRequest->get(['uri' => $profile]);
$this->logger->debug('WebRequest: ' . $xrdRequest->getLastFetchedUrl() . ' Status: ' . $xrdRequest->getLastStatus());
if ($xrdRequest->getLastStatus() != 200) {
$this->logger->info('Unsuccessful XRD request: ' . $xrdRequest->getLastFetchedUrl());
return null;
}
try {
$xrdData = json_decode($xrdJsonData);
} catch (\Throwable $e) {
$this->logger->notice('Invalid JSON string for XRD URL: ' . $xrdRequest->getLastFetchedUrl());
return null;
}
if (!isset($xrdData->links)) {
$this->logger->notice('Invalid JSON structure for XRD URL: ' . $xrdRequest->getLastFetchedUrl());
return null;
}
foreach ($xrdData->links as $link) {
if ($link->rel == 'http://ostatus.org/schema/1.0/subscribe') {
return $link->template ?? null;
}
}
return null;
}
}

View File

@ -10,7 +10,6 @@ class MatchSearch extends BaseRoute
public function __invoke(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args): \Slim\Http\Response
{
return (new \Friendica\Directory\Controllers\Api\MatchSearch(
$this->container->atlas,
$this->container->get(\Friendica\Directory\Models\Profile::class),
$this->container->l10n
))->render($request, $response, $args);

View File

@ -10,7 +10,6 @@ class Search extends BaseRoute
public function __invoke(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args): \Slim\Http\Response
{
return (new \Friendica\Directory\Controllers\Api\Search(
$this->container->atlas,
$this->container->get(\Friendica\Directory\Models\Profile::class),
$this->container->l10n
))->render($request, $response, $args);

View File

@ -13,6 +13,7 @@ class Directory extends BaseRoute
$this->controller = new \Friendica\Directory\Controllers\Web\Directory(
$this->container->atlas,
$this->container->get(\Friendica\Directory\Models\Server::class),
$this->container->get(\Friendica\Directory\Models\Profile::class),
$this->container->get(\Friendica\Directory\Views\Widget\AccountTypeTabs::class),
$this->container->renderer,

View File

@ -13,6 +13,7 @@ class Search extends BaseRoute
$this->controller = new \Friendica\Directory\Controllers\Web\Search(
$this->container->atlas,
$this->container->get(\Friendica\Directory\Models\Server::class),
$this->container->get(\Friendica\Directory\Models\Profile::class),
$this->container->get(\Friendica\Directory\Views\Widget\AccountTypeTabs::class),
$this->container->renderer,

Binary file not shown.

View File

@ -0,0 +1,362 @@
#
# Translators:
# Anton <dev@atjn.dk>, 2022
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-16T04:17:37+00:00\n"
"PO-Revision-Date: 2018-11-16 20:30+0000\n"
"Last-Translator: Anton <dev@atjn.dk>, 2022\n"
"Language-Team: Danish (Denmark) (https://www.transifex.com/Friendica/teams/12172/da_DK/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: da_DK\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2\n"
#: src\classes\Content\Pager.php:168 src\classes\Content\Pager.php:216
msgid "Previous"
msgstr "Forrige"
#: src\classes\Content\Pager.php:173 src\classes\Content\Pager.php:273
msgid "Next"
msgstr "Næste"
#: src\classes\Content\Pager.php:211
msgid "First"
msgstr "Første"
#: src\classes\Content\Pager.php:278
msgid "Last"
msgstr "Sidste"
#: src\classes\Controllers\Web\Directory.php:73
msgid "People"
msgstr "Mennesker"
#: src\classes\Controllers\Web\Search.php:64
msgctxt "field"
msgid "Language"
msgstr "Sprog"
#: src\classes\Controllers\Web\Search.php:65
msgctxt "field"
msgid "Locality"
msgstr "Lokalitet"
#: src\classes\Controllers\Web\Search.php:66
msgctxt "field"
msgid "Region"
msgstr "Region"
#: src\classes\Controllers\Web\Search.php:67
msgctxt "field"
msgid "Country"
msgstr "Land"
#: src\classes\Controllers\Web\Servers.php:90
msgid "Public Servers"
msgstr "Offentlige servere"
#: src\templates\layout.phtml:4 src\templates\layout.phtml:18
msgid "Friendica Directory"
msgstr "Friendica adressebog"
#: src\templates\layout.phtml:23 src\templates\layout.phtml:25
#: src\templates\layout.phtml:43 src\templates\layout.phtml:45
#: src\templates\search.phtml:4 src\templates\search.phtml:12
msgid "Search terms"
msgstr "Søgetermer"
#: src\templates\layout.phtml:24 src\templates\layout.phtml:45
#: src\templates\search.phtml:11
msgctxt "noun"
msgid "Search"
msgstr "Søg"
#: src\templates\layout.phtml:27 src\templates\layout.phtml:47
#: src\templates\search.phtml:14
msgctxt "verb"
msgid "Search"
msgstr "Søg"
#: src\templates\layout.phtml:33
msgid "Toggle navigation"
msgstr "Skift navigation"
#: src\templates\layout.phtml:55
msgid "Directory"
msgstr "Adressebog"
#: src\templates\layout.phtml:60
msgid "Public servers"
msgstr "Offentlige servere"
#: src\templates\search.phtml:19
msgid "%d result for \"%s\""
msgid_plural "%d results for \"%s\""
msgstr[0] "%d resultat for \"%s\""
msgstr[1] "%d resultater for \"%s\""
#: src\templates\servers.phtml:2
msgid "Top servers pagination"
msgstr "Top servere sideopdeling"
#: src\templates\servers.phtml:12
msgid "Bottom servers pagination"
msgstr "Bundservere sideopdeling"
#: src\templates\sub\profile.phtml:5
msgid "Filter by locality"
msgstr "Filtrer efter lokalitet"
#: src\templates\sub\profile.phtml:11
msgid "Filter by region"
msgstr "Filtrer efter region"
#: src\templates\sub\profile.phtml:17
msgid "Filter by country"
msgstr "Filtrer efter land"
#: src\templates\sub\profile.phtml:31
msgctxt "verb"
msgid "Follow"
msgstr "Følg"
#: src\templates\layout.phtml:65 src\templates\sub\profile.phtml:47
msgid "Language"
msgstr "Sprog"
#: src\templates\sub\profile.phtml:50
msgid "Filter by language"
msgstr "Filtrer efter sprog"
#: src\templates\sub\profile.phtml:56
msgid "Location"
msgstr "Placering"
#: src\templates\sub\profile.phtml:69
msgid "Search Tag"
msgstr "Søgetag"
#: src\templates\sub\profiles.phtml:1
msgid "Account type tabs"
msgstr "Kontotypefaner"
#: src\templates\sub\profiles.phtml:4 src\templates\sub\profiles.phtml:7
msgid "Top %s pagination"
msgstr "Top %s sideopdeling"
#: src\templates\sub\profiles.phtml:13 src\templates\sub\profiles.phtml:16
msgid "Bottom %s pagination"
msgstr "Bund %s sideopdeling"
#: src\templates\statistics.phtml:66 src\templates\sub\server.phtml:15
msgid "Stable Version"
msgstr "Stabil version"
#: src\templates\statistics.phtml:68 src\templates\sub\server.phtml:17
msgid "Develop Version"
msgstr "Udviklingsversion"
#: src\templates\sub\server.phtml:19
msgid "Outdated Version"
msgstr "Forældet version"
#: src\templates\sub\server.phtml:72
msgid "Admin"
msgstr "Admin"
#: src\templates\sub\server.phtml:79
msgid "No description provided"
msgstr "Ingen beskrivelse givet"
#: src\templates\sub\server.phtml:82
msgid "Visit Server"
msgstr "Besøg server"
#: src\templates\widget\popularcountries.phtml:2
msgid "Popular Countries"
msgstr "Populære lande"
#: src\templates\widget\popularlanguages.phtml:2
msgid "Popular Languages"
msgstr "Populære sprog"
#: src\templates\widget\populartags.phtml:2
msgid "Popular Tags"
msgstr "Populære tags"
#: src\templates\sub\server.phtml:44 src\templates\sub\server.phtml:45
msgid "Default Language"
msgstr "Standard sprog"
#: src\templates\sub\server.phtml:49
msgid "Known Users"
msgstr "Kendte brugere"
#: src\classes\Views\Widget\AccountTypeTabs.php:48
msgctxt "account-type"
msgid "All"
msgstr "Alle"
#: src\classes\Views\Widget\AccountTypeTabs.php:56
msgctxt "account-type"
msgid "People (%d)"
msgid_plural "People (%d)"
msgstr[0] "Mennesker (%d)"
msgstr[1] "Mennesker (%d)"
#: src\classes\Views\Widget\AccountTypeTabs.php:59
msgctxt "account-type"
msgid "Forum (%d)"
msgid_plural "Forums (%d)"
msgstr[0] "Forummer (%d)"
msgstr[1] "Forummer (%d)"
#: src\templates\layout.phtml:97
msgid "Stats"
msgstr "Statistik"
#: src\templates\statistics.phtml:4
msgid "Directory statistics"
msgstr "Adressebog statistik"
#: src\templates\statistics.phtml:5
msgid "Profiles"
msgstr "Profiler"
#: src\templates\statistics.phtml:6
msgid ""
"This directory knows about <strong>%s distinct potential profile "
"URLs</strong>."
msgstr ""
"Denne adressebog kender til <strong>%s særskilte potentielle profil-"
"URL'er</strong>."
#: src\templates\statistics.phtml:16 src\templates\statistics.phtml:46
msgid "Languages"
msgstr "Sprog"
#: src\templates\statistics.phtml:17
msgid ""
"Out of <strong>%s</strong> profiles reporting their language there are:"
msgstr ""
"Ud af <strong>%s</strong> profiler som rapporterer deres sprog, er der:"
#: src\templates\statistics.phtml:27
msgid "Servers"
msgstr "Servere"
#: src\templates\statistics.phtml:28
msgid ""
"This directory knows about <strong>%s distinct potential server "
"URLs</strong>."
msgstr ""
"Denne adressebog kender til <strong>%s særskilte potentielle server-"
"URL'er</strong>."
#: src\templates\statistics.phtml:29
msgid ""
"Out of those, there are <strong>%s domains (%s)</strong> that have been a "
"Friendica server at least once."
msgstr ""
"Ud af dem er der <strong>%s domæner (%s)</strong> som har været en Friendica"
" server mindst én gang."
#: src\templates\statistics.phtml:33
msgid "Out of those, there are:"
msgstr "Ud af dem er der:"
#: src\templates\statistics.phtml:47
msgid "Out of <strong>%s</strong> servers reporting their language there are:"
msgstr ""
"Ud af <strong>%s</strong> servere som rapporterer deres sprog, er der:"
#: src\templates\statistics.phtml:57
msgid "Versions"
msgstr "Versioner"
#: src\templates\statistics.phtml:58
msgid "Out of <strong>%s</strong> servers reporting their version there are:"
msgstr ""
"Ud af <strong>%s</strong> servere som rapporterer deres version, er der:"
#: src\templates\statistics.phtml:7
msgid ""
"Out of those, there are <strong>%s profiles (%s)</strong> that opted in the "
"public directory at least once."
msgstr ""
"Ud af dem er der <strong>%s profiler (%s)</strong> som tilvalgte den "
"offentlige adressebog mindst én gang."
#: src\templates\statistics.phtml:35
msgid "<strong>%s available servers (%s)</strong>"
msgstr "<strong>%s tilgængelige servere (%s)</strong>"
#: src\templates\layout.phtml:91
msgid "Friendica Directory version %s"
msgstr "Friendica adressebogsversion %s"
#: src\templates\layout.phtml:94
msgid "Source Code on GitHub"
msgstr "Kildekode på GitHub"
#: src\templates\statistics.phtml:11
msgid ""
"Out of those, there currently are <strong>%s available profiles "
"(%s)</strong>. <a href=\"%s\">Check them out!</a>"
msgstr ""
"Ud af dem er der i øjeblikket <strong>%s tilgængelige profiler "
"(%s)</strong>. <a href=\"%s\">Tjek dem ud!</a>"
#: src\templates\statistics.phtml:39
msgid ""
"<strong>%s public servers (%s)</strong> currently open for registration. <a "
"href=\"%s\">Check them out!</a>"
msgstr ""
"<strong>%s offentlige servere (%s)</strong> åben for registrering lige nu. "
"<a href=\"%s\">Tjek dem ud!</a>"
#: src\classes\Views\Widget\AccountTypeTabs.php:57
msgctxt "account-type"
msgid "News (%d)"
msgid_plural "News (%d)"
msgstr[0] "Nyheder (%d)"
msgstr[1] "Nyheder (%d)"
#: src\classes\Views\Widget\AccountTypeTabs.php:58
msgctxt "account-type"
msgid "Organization (%d)"
msgid_plural "Organizations (%d)"
msgstr[0] "Organisationer (%d)"
msgstr[1] "Organisationer (%d)"
#: src\templates\sub\server.phtml:40
msgid "Health Score"
msgstr "Sundhedsscore"
#: src\templates\sub\server.phtml:52
msgid "%s User"
msgid_plural "%s Users"
msgstr[0] "%s bruger"
msgstr[1] "%s brugere"
#: src\templates\sub\server.phtml:54
msgid "None"
msgstr "Ingen"
#: src\templates\sub\server.phtml:59 src\templates\sub\server.phtml:63
msgid "Registration Policy"
msgstr "Registreringspolitik"
#: src\templates\sub\server.phtml:60
msgid "By Approval"
msgstr "Ved godkendelse"
#: src\templates\sub\server.phtml:64
msgid "Open"
msgstr "Åben"

Binary file not shown.

View File

@ -1,7 +1,5 @@
#
# Translators:
# Karol Kosek, 2018
# Waldemar Stoczkowski, 2020
# Piotr Strębski <strebski@gmail.com>, 2022
#
msgid ""
@ -21,23 +19,23 @@ msgstr ""
#: src\classes\Content\Pager.php:168 src\classes\Content\Pager.php:216
msgid "Previous"
msgstr "Poprzedni"
msgstr "Poprzednia"
#: src\classes\Content\Pager.php:173 src\classes\Content\Pager.php:273
msgid "Next"
msgstr "Następny"
msgstr "Następna"
#: src\classes\Content\Pager.php:211
msgid "First"
msgstr "Pierwszy"
msgstr "Pierwsza"
#: src\classes\Content\Pager.php:278
msgid "Last"
msgstr "Ostatni"
msgstr "Ostatnia"
#: src\classes\Controllers\Web\Directory.php:73
msgid "People"
msgstr "Przyjaciele"
msgstr "Ludzie"
#: src\classes\Controllers\Web\Search.php:64
msgctxt "field"
@ -71,7 +69,7 @@ msgstr "Katalog Friendica"
#: src\templates\layout.phtml:43 src\templates\layout.phtml:45
#: src\templates\search.phtml:4 src\templates\search.phtml:12
msgid "Search terms"
msgstr "Wyszukiwane hasła"
msgstr "Wyszukiwanie hasła"
#: src\templates\layout.phtml:24 src\templates\layout.phtml:45
#: src\templates\search.phtml:11
@ -91,7 +89,7 @@ msgstr "Przełącz nawigację"
#: src\templates\layout.phtml:55
msgid "Directory"
msgstr "Katalogi"
msgstr "Katalog"
#: src\templates\layout.phtml:60
msgid "Public servers"
@ -107,15 +105,15 @@ msgstr[3] "%d wyników dla \"%s\""
#: src\templates\servers.phtml:2
msgid "Top servers pagination"
msgstr "Topowa paginacja serwerów"
msgstr "Górna paginacja serwerów"
#: src\templates\servers.phtml:12
msgid "Bottom servers pagination"
msgstr "Dolny podział na serwery"
msgstr "Dolna paginacja serwerów"
#: src\templates\sub\profile.phtml:5
msgid "Filter by locality"
msgstr "Filtruj według lokalizacji"
msgstr "Filtruj według położenia"
#: src\templates\sub\profile.phtml:11
msgid "Filter by region"
@ -128,7 +126,7 @@ msgstr "Filtruj według kraju"
#: src\templates\sub\profile.phtml:31
msgctxt "verb"
msgid "Follow"
msgstr "Śledzenie"
msgstr "Obserwuj"
#: src\templates\layout.phtml:65 src\templates\sub\profile.phtml:47
msgid "Language"
@ -140,7 +138,7 @@ msgstr "Filtruj według języka"
#: src\templates\sub\profile.phtml:56
msgid "Location"
msgstr "Lokalizacja"
msgstr "Położenie"
#: src\templates\sub\profile.phtml:69
msgid "Search Tag"
@ -148,15 +146,15 @@ msgstr "Wyszukaj znacznik"
#: src\templates\sub\profiles.phtml:1
msgid "Account type tabs"
msgstr "Konta typu karty"
msgstr "Karty rodzajów kont"
#: src\templates\sub\profiles.phtml:4 src\templates\sub\profiles.phtml:7
msgid "Top %s pagination"
msgstr "Górna %s paginacja"
msgstr "Górna paginacja %s"
#: src\templates\sub\profiles.phtml:13 src\templates\sub\profiles.phtml:16
msgid "Bottom %s pagination"
msgstr "Dolna %s paginacja"
msgstr "Dolna paginacja %s"
#: src\templates\statistics.phtml:66 src\templates\sub\server.phtml:15
msgid "Stable Version"
@ -164,7 +162,7 @@ msgstr "Wersja stabilna"
#: src\templates\statistics.phtml:68 src\templates\sub\server.phtml:17
msgid "Develop Version"
msgstr "Rozwój wersji"
msgstr "Wersja rozwojowa"
#: src\templates\sub\server.phtml:19
msgid "Outdated Version"
@ -172,7 +170,7 @@ msgstr "Przestarzała wersja"
#: src\templates\sub\server.phtml:72
msgid "Admin"
msgstr "Admin"
msgstr "Administrator"
#: src\templates\sub\server.phtml:79
msgid "No description provided"
@ -214,16 +212,16 @@ msgid_plural "People (%d)"
msgstr[0] "Osoba (%d)"
msgstr[1] "Osoby (%d)"
msgstr[2] "Osób (%d)"
msgstr[3] "Osoby (%d)"
msgstr[3] "Osób (%d)"
#: src\classes\Views\Widget\AccountTypeTabs.php:59
msgctxt "account-type"
msgid "Forum (%d)"
msgid_plural "Forums (%d)"
msgstr[0] "Forum (%d)"
msgstr[1] "Forów (%d)"
msgstr[1] "Fora (%d)"
msgstr[2] "Forów (%d)"
msgstr[3] "Fora (%d)"
msgstr[3] "Forów (%d)"
#: src\templates\layout.phtml:97
msgid "Stats"
@ -242,7 +240,7 @@ msgid ""
"This directory knows about <strong>%s distinct potential profile "
"URLs</strong>."
msgstr ""
"Ten katalog zna <strong>%s różne adresy URL potencjalnych adresów</strong>."
"Ten katalog zna <strong>%s różne adresy URL potencjalnych profilów</strong>."
#: src\templates\statistics.phtml:16 src\templates\statistics.phtml:46
msgid "Languages"
@ -270,7 +268,7 @@ msgid ""
"Out of those, there are <strong>%s domains (%s)</strong> that have been a "
"Friendica server at least once."
msgstr ""
"Spośród nich są <strong>%s domeny (%s)</strong> które były serwerem "
"Spośród nich są <strong>%s domeny (%s)</strong>, które były serwerem "
"Friendica co najmniej raz."
#: src\templates\statistics.phtml:33
@ -341,7 +339,7 @@ msgid_plural "Organizations (%d)"
msgstr[0] "Organizacja (%d)"
msgstr[1] "Organizacje (%d)"
msgstr[2] "Organizacji (%d)"
msgstr[3] "Organizacje (%d)"
msgstr[3] "Organizacji (%d)"
#: src\templates\sub\server.phtml:40
msgid "Health Score"
@ -353,7 +351,7 @@ msgid_plural "%s Users"
msgstr[0] "%s użytkownik"
msgstr[1] "%s użytkowników"
msgstr[2] "%s użytkowników"
msgstr[3] "%s użytkownicy"
msgstr[3] "%s użytkowników"
#: src\templates\sub\server.phtml:54
msgid "None"
@ -369,4 +367,4 @@ msgstr "Przez zatwierdzenie"
#: src\templates\sub\server.phtml:64
msgid "Open"
msgstr "Otwarte"
msgstr "Otwarta"

View File

@ -19,7 +19,7 @@ $settings = [
'displayErrorDetails' => false, // set to false in production
'addContentLengthHeader' => false, // Allow the web server to send the content-length header
'i18n' => [
'locales' => ['en_US', 'fr_FR', 'cs_CZ', 'de_DE', 'pl_PL', 'ja_JP', 'en_GB', 'it_IT', 'fr_FR', 'et_EE', 'nl_NL', 'th_TH', 'zh_CN', 'ar', 'gd', 'hu', 'sv'],
'locales' => ['en_US', 'fr_FR', 'cs_CZ', 'de_DE', 'pl_PL', 'ja_JP', 'en_GB', 'it_IT', 'fr_FR', 'et_EE', 'nl_NL', 'th_TH', 'zh_CN', 'ar', 'gd', 'hu', 'sv', 'da_DK'],
'default' => 'en_US',
'path' => __DIR__ . '/lang'
],

View File

@ -0,0 +1,3 @@
BEGIN;
ALTER TABLE `server` DROP `subscribe_url`;
COMMIT;

View File

@ -0,0 +1,3 @@
BEGIN;
ALTER TABLE `profile` ADD `dfrn_request` VARCHAR(250) DEFAULT NULL AFTER `profile_url`;
COMMIT;

View File

@ -0,0 +1,3 @@
BEGIN;
ALTER TABLE `server` ADD `subscribe_url` VARCHAR(250) NULL AFTER `noscrape_url`;
COMMIT;

View File

@ -0,0 +1,3 @@
BEGIN;
ALTER TABLE `profile` DROP `dfrn_request`;
COMMIT;

View File

@ -26,12 +26,22 @@ if (!empty($profile['country'])) {
</a>
<div class="media-body">
<h5 class="name">
<?php if ($profile['dfrn_request']): ?>
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['dfrn_request'])); ?>" class="card-link btn btn-primary float-right">
<?php if ($profile['subscribe']): ?>
<a href="<?php echo $this->escapeHtmlAttr($profile['subscribe']); ?>" class="card-link btn btn-primary float-right" target="_blank" rel="noopener noreferrer">
<i class="fa fa-external-link-alt"></i> <?php echo $this->p__('verb', 'Follow')?>
</a>
<?php endif; ?>
<?php echo $this->escapeHtml($profile['name']) ?>
<?php elseif ($profile['remote_follow']): ?>
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['remote_follow'])); ?>" class="card-link btn btn-primary float-right" target="_blank" rel="noopener noreferrer">
<i class="fa fa-external-link-alt"></i> <?php echo $this->p__('verb', 'Follow')?>
</a>
<?php else: ?>
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['profile_url'])); ?>" class="card-link btn btn-primary float-right" target="_blank" rel="noopener noreferrer">
<i class="fa fa-external-link-alt"></i> <?php echo $this->p__('verb', 'Follow')?>
</a>
<?php endif; ?>
<a href="<?php echo $this->escapeHtmlAttr($profile['profile_url']) ?>">
<?php echo $this->escapeHtml($profile['name']) ?>
</a>
</h5>
<p class="url">
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['profile_url'])) ?>">
@ -42,7 +52,7 @@ if (!empty($profile['country'])) {
</div>
</div>
<p class="description d-md-none"><?php echo $this->escapeHtml($profile['pdesc']) ?></p>
<?php if ($profile['language']):?>
<?php if ($profile['language']):?>
<div class="language">
<i class="fa fa-language" alt="<?php echo $this->__('Language')?>" title="<?php echo $this->__('Language')?>"></i>
<?php echo $this->e(Friendica\Directory\Utils\L10n::localeToLanguageString($profile['language'])) ?>
@ -50,26 +60,26 @@ if (!empty($profile['country'])) {
<i class="fa fa-filter" title="<?php echo $this->__('Filter by language')?>"></i>
</a>
</div>
<?php endif;?>
<?php endif;?>
<div class="location">
<?php if (count($parts)): ?>
<?php if (count($parts)): ?>
<i class="fa fa-globe" alt="<?php echo $this->__('Location')?>" title="<?php echo $this->__('Location')?>"></i>
<?php echo implode(', ', $parts); ?>
<?php endif ?>
<?php echo implode(', ', $parts); ?>
<?php endif ?>
</div>
<?php if ($profile['tags']): ?>
<?php if ($profile['tags']): ?>
<div class="tags">
<?php
$tags = array_map('trim', explode(' ', $profile['tags']));
foreach ($tags as $tag):?>
<?php
$tags = array_map('trim', explode(' ', $profile['tags']));
foreach ($tags as $tag):?>
<span class="badge">
<?php echo $this->escapeHtml($tag) ?>
<a href="<?php echo $this->escapeHtmlAttr($this->r('search', [], ['q' => $tag])) ?>">
<i class="fa fa-tag" title="<?php echo $this->__('Search Tag')?>"></i>
</a>
</span>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php endif; ?>
</figure>