Merge remote-tracking branch 'upstream/2019.09-rc' into performance

This commit is contained in:
Michael 2019-09-03 15:02:16 +00:00
commit 33006d8455
9 changed files with 3716 additions and 3554 deletions

View File

@ -1,6 +1,6 @@
Version 2019.09-dev (UNRELEASED)
Friendica Core:
Update to the translations (CS, DE, FR, JA, NL) [translation teams]
Update to the translations (CS, DE, FR, JA, NL, PL) [translation teams]
Update to the themes (frio, vier) [JeroenED, MrPetovan, tobiasd, vinzv]
Update to the documentation [guzzisti, vinzv]
Enhanced the log output of the background process [annando]
@ -49,7 +49,7 @@ Version 2019.09-dev (UNRELEASED)
3816, 4815, 6384, 6675, 7235, 7293, 7314, 7317, 7337, 7338, 7346,
7350, 7367, 7383, 7396, 7397, 7401, 7406, 7408, 7426, 7428, 7456,
7442, 7457, 7468, 7471, 7473, 7488, 7497, 7498, 7501, 7507, 7522,
7527, 7536, 7542, 7545
7527, 7536, 7542, 7545, 7576, 7586
Version 2019.06 (2019-06-23)
Friendica Core:

View File

@ -31,10 +31,11 @@ class L10n extends BaseObject
*
* If called repeatedly, it won't save the translation strings again, just load the new ones.
*
* @param string $lang Language code
*
* @throws \Exception
* @see popLang()
* @brief Stores the current language strings and load a different language.
* @param string $lang Language code
* @throws \Exception
*/
public static function pushLang($lang)
{
@ -63,6 +64,7 @@ class L10n extends BaseObject
*
* @param string $s
* @param array $vars Variables to interpolate in the translation string
*
* @return string
*/
public static function t($s, ...$vars)
@ -86,6 +88,7 @@ class L10n extends BaseObject
* @param string $singular
* @param string $plural
* @param int $count
*
* @return string
* @throws \Exception
*/
@ -114,6 +117,7 @@ class L10n extends BaseObject
* @brief Translate days and months names.
*
* @param string $s String with day or month name.
*
* @return string Translated string.
*/
public static function getDay($s)
@ -125,10 +129,23 @@ class L10n extends BaseObject
* @brief Translate short days and months names.
*
* @param string $s String with short day or month name.
*
* @return string Translated string.
*/
public static function getDayShort($s)
{
return self::getClass(L10nClass::class)->getDayShort($s);
}
/**
* Load poke verbs
*
* @return array index is present tense verb
* value is array containing past tense verb, translation of present, translation of past
* @hook poke_verbs pokes array
*/
public static function getPokeVerbs()
{
return self::getClass(L10nClass::class)->getPokeVerbs();
}
}

View File

@ -44,15 +44,19 @@ class Search extends BaseObject
if ((filter_var($user, FILTER_VALIDATE_EMAIL) && Network::isEmailDomainValid($user)) ||
(substr(Strings::normaliseLink($user), 0, 7) == "http://")) {
/// @todo Possibly use "getIdForURL" instead?
$user_data = Probe::uri($user);
if (empty($user_data)) {
return $emptyResultList;
}
if (!(in_array($user_data["network"], Protocol::FEDERATED))) {
if (!in_array($user_data["network"], Protocol::FEDERATED)) {
return $emptyResultList;
}
// Ensure that we do have a contact entry
Contact::getIdForURL(defaults($user_data, 'url', ''));
$contactDetails = Contact::getDetailsByURL(defaults($user_data, 'url', ''), local_user());
$itemUrl = defaults($contactDetails, 'addr', defaults($user_data, 'url', ''));
@ -63,7 +67,7 @@ class Search extends BaseObject
defaults($user_data, 'url', ''),
defaults($user_data, 'photo', ''),
defaults($user_data, 'network', ''),
defaults($contactDetails, 'cid', 0),
defaults($contactDetails, 'id', 0),
0,
defaults($user_data, 'tags', '')
);

View File

@ -111,7 +111,7 @@ class ItemDeliveryData
* @return bool
* @throws \Exception
*/
public static function incrementQueueCount($item_id, $increment)
public static function incrementQueueCount(int $item_id, int $increment = 1)
{
return DBA::e('UPDATE `item-delivery-data` SET `queue_count` = `queue_count` + ? WHERE `iid` = ?', $increment, $item_id);
}

View File

@ -55,7 +55,7 @@ class Diaspora
*
* @param array $contact of the relay contact
*/
public static function markRelayForArchival($contact)
public static function markRelayForArchival(array $contact)
{
if (!empty($contact['contact-type']) && ($contact['contact-type'] == Contact::TYPE_RELAY)) {
// This is already the relay contact, we don't need to fetch it
@ -175,7 +175,7 @@ class Diaspora
* @return array with the contact
* @throws \Exception
*/
private static function getRelayContact($server_url, $fields = ['batch', 'id', 'name', 'network', 'protocol', 'archive', 'blocked'])
private static function getRelayContact(string $server_url, array $fields = ['batch', 'id', 'name', 'network', 'protocol', 'archive', 'blocked'])
{
// Fetch the relay contact
$condition = ['uid' => 0, 'nurl' => Strings::normaliseLink($server_url),

View File

@ -211,7 +211,13 @@ class Delivery extends BaseObject
return;
}
private static function setFailedQueue($cmd, $id)
/**
* Increased the "failed" counter in the item delivery data
*
* @param string $cmd Command
* @param integer $id Item id
*/
private static function setFailedQueue(string $cmd, int $id)
{
if (!in_array($cmd, [Delivery::POST, Delivery::POKE])) {
return;

View File

@ -4,14 +4,14 @@
#
# Translators:
# Antron Samurai <rock_spring_fu@yahoo.co.jp>, 2018
# Ozero Dien <rgfx0020+misc@gmail.com>, 2019
# ozero dien <rgfx0020+misc@gmail.com>, 2019
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-06 16:52+0200\n"
"PO-Revision-Date: 2019-08-29 13:02+0000\n"
"Last-Translator: Ozero Dien <rgfx0020+misc@gmail.com>\n"
"Last-Translator: ozero dien <rgfx0020+misc@gmail.com>\n"
"Language-Team: Japanese (http://www.transifex.com/Friendica/friendica/language/ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff