From f4591b2cc72864cea149bcc7d1f93219a3ea39bf Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Oct 2023 18:38:14 +0000 Subject: [PATCH 01/12] The language detection is now done in blocks --- doc/Addons.md | 1 + doc/de/Addons.md | 1 + src/Model/Item.php | 114 +++++++++++++++++++++++++++++++++------------ 3 files changed, 85 insertions(+), 31 deletions(-) diff --git a/doc/Addons.md b/doc/Addons.md index bfccde5ddf..b89a48d26d 100644 --- a/doc/Addons.md +++ b/doc/Addons.md @@ -228,6 +228,7 @@ Called after the language detection. This can be used for alternative language d - **text**: The text that is analyzed. - **detected**: (input/output) Array of language codes detected in the related text. The array key is the language code, the array value the probability. - **uri-id**: The Uri-Id of the item. +- **author-id**: The id of the author contact. ### addon_settings Called when generating the HTML for the addon settings page. diff --git a/doc/de/Addons.md b/doc/de/Addons.md index c61b68b489..0843c103ab 100644 --- a/doc/de/Addons.md +++ b/doc/de/Addons.md @@ -110,6 +110,7 @@ Dieser Hook kann dafür verwendet werden, alternative Erkennungsfunktionen einzu 'text' => Der analysierte Text. 'detected' => (Eingabe/Ausgabe) Das Array mit den erkannten Sprachen. Der Sprachcode ist der Array-Schlüssel, der Array-Wert ist der dezimale Wert für die Wahrscheinlichkeit. 'uri-id' => Die Uri-Id des Beitrags + 'author-id' => Die Contact-id des Autors. **'addon_settings'** - wird aufgerufen, wenn die HTML-Ausgabe der Addon-Einstellungsseite generiert wird. $b ist die HTML-Ausgabe (String) der Addon-Einstellungsseite vor dem finalen ""-Tag. diff --git a/src/Model/Item.php b/src/Model/Item.php index d3ae8aa6c6..55884a802e 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -49,6 +49,7 @@ use Friendica\Util\Proxy; use Friendica\Util\Strings; use Friendica\Util\Temporal; use GuzzleHttp\Psr7\Uri; +use IntlChar; use LanguageDetection\Language; class Item @@ -2010,67 +2011,118 @@ class Item */ public static function getLanguageArray(string $body, int $count, int $uri_id = 0, int $author_id = 0): array { - $naked_body = BBCode::toSearchText($body, $uri_id); + $searchtext = BBCode::toSearchText($body, $uri_id); - if ((count(explode(' ', $naked_body)) < 10) && (mb_strlen($naked_body) < 30) && $author_id) { + if ((count(explode(' ', $searchtext)) < 10) && (mb_strlen($searchtext) < 30) && $author_id) { $author = Contact::selectFirst(['about'], ['id' => $author_id]); if (!empty($author['about'])) { $about = BBCode::toSearchText($author['about'], 0); - $about = self::getDominantLanguage($about); - Logger::debug('About field added', ['author' => $author_id, 'body' => $naked_body, 'about' => $about]); - $naked_body .= ' ' . $about; + Logger::debug('About field added', ['author' => $author_id, 'body' => $searchtext, 'about' => $about]); + $searchtext .= ' ' . $about; } } - if (empty($naked_body)) { + if (empty($searchtext)) { return []; } - $naked_body = self::getDominantLanguage($naked_body); - $availableLanguages = DI::l10n()->getAvailableLanguages(true); $availableLanguages = DI::l10n()->convertForLanguageDetection($availableLanguages); $ld = new Language(array_keys($availableLanguages)); - $languages = $ld->detect($naked_body)->limit(0, $count)->close() ?: []; - $data = [ - 'text' => $naked_body, - 'detected' => $languages, - 'uri-id' => $uri_id, - ]; + $result = []; - Hook::callAll('detect_languages', $data); - $languages = $data['detected']; + foreach (self::splitByBlocks($searchtext) as $block) { + $languages = $ld->detect($block)->limit(0, $count)->close() ?: []; - return $languages; + $data = [ + 'text' => $block, + 'detected' => $languages, + 'uri-id' => $uri_id, + 'author-id' => $author_id, + ]; + Hook::callAll('detect_languages', $data); + + foreach ($data['detected'] as $language => $quality) { + $result[$language] = max($result[$language] ?? 0, $quality * (strlen($block) / strlen($searchtext))); + } + } + + arsort($result); + $result = array_slice($result, 0, $count); + + return $result; } /** - * Check if latin or non latin are dominant in the body and only return the dominant one + * Split a string into different unicode blocks + * Currently the text is split into the latin and the non latin part. * * @param string $body - * @return string + * @return array */ - private static function getDominantLanguage(string $body): string + private static function splitByBlocks(string $body): array { - $latin = ''; - $non_latin = ''; + $blocks = []; + $previous_block = 0; + for ($i = 0; $i < mb_strlen($body); $i++) { $character = mb_substr($body, $i, 1); - $ord = mb_ord($character); + $previous = ($i > 0) ? mb_substr($body, $i - 1, 1) : ''; + $next = ($i < mb_strlen($body)) ? mb_substr($body, $i + 1, 1) : ''; - // We add the most common characters to both strings. - if (($ord <= 64) || ($ord >= 91 && $ord <= 96) || ($ord >= 123 && $ord <= 191) || in_array($ord, [215, 247]) || ($ord >= 697 && $ord <= 735) || ($ord > 65535)) { - $latin .= $character; - $non_latin .= $character; - } elseif ($ord < 768) { - $latin .= $character; + if (!IntlChar::isalpha($character)) { + if (($previous != '') && (IntlChar::isalpha($previous))) { + $previous_block = self::getBlockCode($previous); + } + + $block = (($next != '') && IntlChar::isalpha($next)) ? self::getBlockCode($next) : $previous_block; + $blocks[$block] = ($blocks[$block] ?? '') . $character; } else { - $non_latin .= $character; + $block = self::getBlockCode($character); + $blocks[$block] = ($blocks[$block] ?? '') . $character; } } - return (mb_strlen($latin) > mb_strlen($non_latin)) ? $latin : $non_latin; + + foreach (array_keys($blocks) as $key) { + $blocks[$key] = trim($blocks[$key]); + if (empty($blocks[$key])) { + unset($blocks[$key]); + } + } + + return array_values($blocks); + } + + /** + * returns the block code for the given character + * + * @param string $character + * @return integer 0 = no alpha character (blank, signs, emojis, ...), 1 = latin character, 2 = character in every other language + */ + private static function getBlockCode(string $character): int + { + if (!IntlChar::isalpha($character)) { + return 0; + } + return self::isLatin($character) ? 1 : 2; + } + + /** + * Checks if the given character is in one of the latin code blocks + * + * @param string $character + * @return boolean + */ + private static function isLatin(string $character): bool + { + return in_array(IntlChar::getBlockCode($character), [ + IntlChar::BLOCK_CODE_BASIC_LATIN, IntlChar::BLOCK_CODE_LATIN_1_SUPPLEMENT, + IntlChar::BLOCK_CODE_LATIN_EXTENDED_A, IntlChar::BLOCK_CODE_LATIN_EXTENDED_B, + IntlChar::BLOCK_CODE_LATIN_EXTENDED_C, IntlChar::BLOCK_CODE_LATIN_EXTENDED_D, + IntlChar::BLOCK_CODE_LATIN_EXTENDED_E, IntlChar::BLOCK_CODE_LATIN_EXTENDED_ADDITIONAL + ]); } public static function getLanguageMessage(array $item): string From a6bbbd738fe662a66e9c5105bd04331f5c24ecdc Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Oct 2023 19:20:51 +0000 Subject: [PATCH 02/12] Added check for IntlChar module --- doc/Install.md | 4 ++-- src/Core/Installer.php | 29 +++++++++++++++++------------ src/Model/Item.php | 23 +++++++++++++---------- 3 files changed, 32 insertions(+), 24 deletions(-) diff --git a/doc/Install.md b/doc/Install.md index bf9dffb357..dc390fbc8a 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -28,9 +28,9 @@ Due to the large variety of operating systems and PHP platforms in existence we ### Requirements * Apache with mod-rewrite enabled and "Options All" so you can use a local `.htaccess` file -* PHP 7.3+ (PHP8 is not fully supported yet) +* PHP 7.3+ * PHP *command line* access with register_argc_argv set to true in the php.ini file - * Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip and OpenSSL extensions + * Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip, IntlChar and OpenSSL extensions * The POSIX module of PHP needs to be activated (e.g. [RHEL, CentOS](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) have disabled it) * Some form of email server or email gateway such that PHP mail() works. If you cannot set up your own email server, you can use the [phpmailer](https://github.com/friendica/friendica-addons/tree/develop/phpmailer) addon and use a remote SMTP server. diff --git a/src/Core/Installer.php b/src/Core/Installer.php index 583ad5fe28..68f40c01a1 100644 --- a/src/Core/Installer.php +++ b/src/Core/Installer.php @@ -384,12 +384,10 @@ class Installer $help = ''; $status = true; - if (function_exists('apache_get_modules')) { - if (!in_array('mod_rewrite', apache_get_modules())) { - $help = DI::l10n()->t('Error: Apache webserver mod-rewrite module is required but not installed.'); - $status = false; - $returnVal = false; - } + if (function_exists('apache_get_modules') && !in_array('mod_rewrite', apache_get_modules())) { + $help = DI::l10n()->t('Error: Apache webserver mod-rewrite module is required but not installed.'); + $status = false; + $returnVal = false; } $this->addCheck(DI::l10n()->t('Apache mod_rewrite module'), $status, true, $help); @@ -399,15 +397,22 @@ class Installer $status = false; $help = DI::l10n()->t('Error: PDO or MySQLi PHP module required but not installed.'); $returnVal = false; - } else { - if (!function_exists('mysqli_connect') && class_exists('pdo') && !in_array('mysql', \PDO::getAvailableDrivers())) { - $status = false; - $help = DI::l10n()->t('Error: The MySQL driver for PDO is not installed.'); - $returnVal = false; - } + } elseif (!function_exists('mysqli_connect') && class_exists('pdo') && !in_array('mysql', \PDO::getAvailableDrivers())) { + $status = false; + $help = DI::l10n()->t('Error: The MySQL driver for PDO is not installed.'); + $returnVal = false; } $this->addCheck(DI::l10n()->t('PDO or MySQLi PHP module'), $status, true, $help); + $help = ''; + $status = true; + if (!class_exists('IntlChar')) { + $status = false; + $help = DI::l10n()->t('Error: The IntlChar module is not installed.'); + $returnVal = false; + } + $this->addCheck(DI::l10n()->t('IntlChar PHP module'), $status, true, $help); + // check for XML DOM Documents being able to be generated $help = ''; $status = true; diff --git a/src/Model/Item.php b/src/Model/Item.php index 55884a802e..ad93b949d9 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -49,7 +49,6 @@ use Friendica\Util\Proxy; use Friendica\Util\Strings; use Friendica\Util\Temporal; use GuzzleHttp\Psr7\Uri; -use IntlChar; use LanguageDetection\Language; class Item @@ -2064,6 +2063,10 @@ class Item */ private static function splitByBlocks(string $body): array { + if (class_exists('IntlChar')) { + return [$body]; + } + $blocks = []; $previous_block = 0; @@ -2072,12 +2075,12 @@ class Item $previous = ($i > 0) ? mb_substr($body, $i - 1, 1) : ''; $next = ($i < mb_strlen($body)) ? mb_substr($body, $i + 1, 1) : ''; - if (!IntlChar::isalpha($character)) { - if (($previous != '') && (IntlChar::isalpha($previous))) { + if (!\IntlChar::isalpha($character)) { + if (($previous != '') && (\IntlChar::isalpha($previous))) { $previous_block = self::getBlockCode($previous); } - $block = (($next != '') && IntlChar::isalpha($next)) ? self::getBlockCode($next) : $previous_block; + $block = (($next != '') && \IntlChar::isalpha($next)) ? self::getBlockCode($next) : $previous_block; $blocks[$block] = ($blocks[$block] ?? '') . $character; } else { $block = self::getBlockCode($character); @@ -2103,7 +2106,7 @@ class Item */ private static function getBlockCode(string $character): int { - if (!IntlChar::isalpha($character)) { + if (!\IntlChar::isalpha($character)) { return 0; } return self::isLatin($character) ? 1 : 2; @@ -2117,11 +2120,11 @@ class Item */ private static function isLatin(string $character): bool { - return in_array(IntlChar::getBlockCode($character), [ - IntlChar::BLOCK_CODE_BASIC_LATIN, IntlChar::BLOCK_CODE_LATIN_1_SUPPLEMENT, - IntlChar::BLOCK_CODE_LATIN_EXTENDED_A, IntlChar::BLOCK_CODE_LATIN_EXTENDED_B, - IntlChar::BLOCK_CODE_LATIN_EXTENDED_C, IntlChar::BLOCK_CODE_LATIN_EXTENDED_D, - IntlChar::BLOCK_CODE_LATIN_EXTENDED_E, IntlChar::BLOCK_CODE_LATIN_EXTENDED_ADDITIONAL + return in_array(\IntlChar::getBlockCode($character), [ + \IntlChar::BLOCK_CODE_BASIC_LATIN, \IntlChar::BLOCK_CODE_LATIN_1_SUPPLEMENT, + \IntlChar::BLOCK_CODE_LATIN_EXTENDED_A, \IntlChar::BLOCK_CODE_LATIN_EXTENDED_B, + \IntlChar::BLOCK_CODE_LATIN_EXTENDED_C, \IntlChar::BLOCK_CODE_LATIN_EXTENDED_D, + \IntlChar::BLOCK_CODE_LATIN_EXTENDED_E, \IntlChar::BLOCK_CODE_LATIN_EXTENDED_ADDITIONAL ]); } From e6f8f8520cd0df857b0b08b73789b133ea39986c Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Oct 2023 19:22:18 +0000 Subject: [PATCH 03/12] Updated'messages.po --- view/lang/C/messages.po | 164 +++++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 78 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 47d726704a..19c1c2a6a2 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2023.09-rc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-08 07:41+0000\n" +"POT-Creation-Date: 2023-10-11 19:21+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1769,7 +1769,7 @@ msgstr "" msgid "Create new group" msgstr "" -#: src/Content/Item.php:331 src/Model/Item.php:3025 +#: src/Content/Item.php:331 src/Model/Item.php:3080 msgid "event" msgstr "" @@ -1777,7 +1777,7 @@ msgstr "" msgid "status" msgstr "" -#: src/Content/Item.php:340 src/Model/Item.php:3027 +#: src/Content/Item.php:340 src/Model/Item.php:3082 #: src/Module/Post/Tag/Add.php:123 msgid "photo" msgstr "" @@ -2188,8 +2188,8 @@ msgid "" "%2$s %3$s" msgstr "" -#: src/Content/Text/BBCode.php:994 src/Model/Item.php:3761 -#: src/Model/Item.php:3767 src/Model/Item.php:3768 +#: src/Content/Text/BBCode.php:994 src/Model/Item.php:3816 +#: src/Model/Item.php:3822 src/Model/Item.php:3823 msgid "Link to source" msgstr "" @@ -2420,17 +2420,12 @@ msgstr[1] "" msgid "More Trending Tags" msgstr "" -#: src/Content/Widget/VCard.php:105 src/Model/Contact.php:1204 +#: src/Content/Widget/VCard.php:107 src/Model/Contact.php:1204 #: src/Model/Profile.php:457 msgid "Post to group" msgstr "" -#: src/Content/Widget/VCard.php:107 src/Model/Contact.php:1206 -#: src/Model/Profile.php:459 -msgid "View group" -msgstr "" - -#: src/Content/Widget/VCard.php:110 src/Model/Contact.php:1209 +#: src/Content/Widget/VCard.php:111 src/Model/Contact.php:1209 #: src/Model/Profile.php:462 src/Module/Moderation/Item/Source.php:85 msgid "Mention" msgstr "" @@ -2464,6 +2459,11 @@ msgstr "" msgid "Unfollow" msgstr "" +#: src/Content/Widget/VCard.php:136 src/Model/Contact.php:1206 +#: src/Model/Profile.php:459 +msgid "View group" +msgstr "" + #: src/Core/ACL.php:166 src/Module/Profile/Profile.php:269 msgid "Yourself" msgstr "" @@ -2611,235 +2611,243 @@ msgstr "" msgid "Generate encryption keys" msgstr "" -#: src/Core/Installer.php:389 +#: src/Core/Installer.php:388 msgid "" "Error: Apache webserver mod-rewrite module is required but not installed." msgstr "" -#: src/Core/Installer.php:394 +#: src/Core/Installer.php:392 msgid "Apache mod_rewrite module" msgstr "" -#: src/Core/Installer.php:400 +#: src/Core/Installer.php:398 msgid "Error: PDO or MySQLi PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:405 +#: src/Core/Installer.php:402 msgid "Error: The MySQL driver for PDO is not installed." msgstr "" -#: src/Core/Installer.php:409 +#: src/Core/Installer.php:405 msgid "PDO or MySQLi PHP module" msgstr "" -#: src/Core/Installer.php:417 +#: src/Core/Installer.php:411 +msgid "Error: The IntlChar module is not installed." +msgstr "" + +#: src/Core/Installer.php:414 +msgid "IntlChar PHP module" +msgstr "" + +#: src/Core/Installer.php:422 msgid "Error, XML PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:421 +#: src/Core/Installer.php:426 msgid "XML PHP module" msgstr "" -#: src/Core/Installer.php:424 +#: src/Core/Installer.php:429 msgid "libCurl PHP module" msgstr "" -#: src/Core/Installer.php:425 +#: src/Core/Installer.php:430 msgid "Error: libCURL PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:431 +#: src/Core/Installer.php:436 msgid "GD graphics PHP module" msgstr "" -#: src/Core/Installer.php:432 +#: src/Core/Installer.php:437 msgid "" "Error: GD graphics PHP module with JPEG support required but not installed." msgstr "" -#: src/Core/Installer.php:438 +#: src/Core/Installer.php:443 msgid "OpenSSL PHP module" msgstr "" -#: src/Core/Installer.php:439 +#: src/Core/Installer.php:444 msgid "Error: openssl PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:445 +#: src/Core/Installer.php:450 msgid "mb_string PHP module" msgstr "" -#: src/Core/Installer.php:446 +#: src/Core/Installer.php:451 msgid "Error: mb_string PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:452 +#: src/Core/Installer.php:457 msgid "iconv PHP module" msgstr "" -#: src/Core/Installer.php:453 +#: src/Core/Installer.php:458 msgid "Error: iconv PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:459 +#: src/Core/Installer.php:464 msgid "POSIX PHP module" msgstr "" -#: src/Core/Installer.php:460 +#: src/Core/Installer.php:465 msgid "Error: POSIX PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:466 +#: src/Core/Installer.php:471 msgid "Program execution functions" msgstr "" -#: src/Core/Installer.php:467 +#: src/Core/Installer.php:472 msgid "" "Error: Program execution functions (proc_open) required but not enabled." msgstr "" -#: src/Core/Installer.php:473 +#: src/Core/Installer.php:478 msgid "JSON PHP module" msgstr "" -#: src/Core/Installer.php:474 +#: src/Core/Installer.php:479 msgid "Error: JSON PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:480 +#: src/Core/Installer.php:485 msgid "File Information PHP module" msgstr "" -#: src/Core/Installer.php:481 +#: src/Core/Installer.php:486 msgid "Error: File Information PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:487 +#: src/Core/Installer.php:492 msgid "GNU Multiple Precision PHP module" msgstr "" -#: src/Core/Installer.php:488 +#: src/Core/Installer.php:493 msgid "Error: GNU Multiple Precision PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:511 +#: src/Core/Installer.php:516 msgid "" "The web installer needs to be able to create a file called \"local.config.php" "\" in the \"config\" folder of your web server and it is unable to do so." msgstr "" -#: src/Core/Installer.php:512 +#: src/Core/Installer.php:517 msgid "" "This is most often a permission setting, as the web server may not be able " "to write files in your folder - even if you can." msgstr "" -#: src/Core/Installer.php:513 +#: src/Core/Installer.php:518 msgid "" "At the end of this procedure, we will give you a text to save in a file " "named local.config.php in your Friendica \"config\" folder." msgstr "" -#: src/Core/Installer.php:514 +#: src/Core/Installer.php:519 msgid "" "You can alternatively skip this procedure and perform a manual installation. " "Please see the file \"doc/INSTALL.md\" for instructions." msgstr "" -#: src/Core/Installer.php:517 +#: src/Core/Installer.php:522 msgid "config/local.config.php is writable" msgstr "" -#: src/Core/Installer.php:537 +#: src/Core/Installer.php:542 msgid "" "Friendica uses the Smarty3 template engine to render its web views. Smarty3 " "compiles templates to PHP to speed up rendering." msgstr "" -#: src/Core/Installer.php:538 +#: src/Core/Installer.php:543 msgid "" "In order to store these compiled templates, the web server needs to have " "write access to the directory view/smarty3/ under the Friendica top level " "folder." msgstr "" -#: src/Core/Installer.php:539 +#: src/Core/Installer.php:544 msgid "" "Please ensure that the user that your web server runs as (e.g. www-data) has " "write access to this folder." msgstr "" -#: src/Core/Installer.php:540 +#: src/Core/Installer.php:545 msgid "" "Note: as a security measure, you should give the web server write access to " "view/smarty3/ only--not the template files (.tpl) that it contains." msgstr "" -#: src/Core/Installer.php:543 +#: src/Core/Installer.php:548 msgid "view/smarty3 is writable" msgstr "" -#: src/Core/Installer.php:571 +#: src/Core/Installer.php:576 msgid "" "Url rewrite in .htaccess seems not working. Make sure you copied .htaccess-" "dist to .htaccess." msgstr "" -#: src/Core/Installer.php:572 +#: src/Core/Installer.php:577 msgid "" "In some circumstances (like running inside containers), you can skip this " "error." msgstr "" -#: src/Core/Installer.php:574 +#: src/Core/Installer.php:579 msgid "Error message from Curl when fetching" msgstr "" -#: src/Core/Installer.php:580 +#: src/Core/Installer.php:585 msgid "Url rewrite is working" msgstr "" -#: src/Core/Installer.php:609 +#: src/Core/Installer.php:614 msgid "" "The detection of TLS to secure the communication between the browser and the " "new Friendica server failed." msgstr "" -#: src/Core/Installer.php:610 +#: src/Core/Installer.php:615 msgid "" "It is highly encouraged to use Friendica only over a secure connection as " "sensitive information like passwords will be transmitted." msgstr "" -#: src/Core/Installer.php:611 +#: src/Core/Installer.php:616 msgid "Please ensure that the connection to the server is secure." msgstr "" -#: src/Core/Installer.php:612 +#: src/Core/Installer.php:617 msgid "No TLS detected" msgstr "" -#: src/Core/Installer.php:614 +#: src/Core/Installer.php:619 msgid "TLS detected" msgstr "" -#: src/Core/Installer.php:641 +#: src/Core/Installer.php:646 msgid "ImageMagick PHP extension is not installed" msgstr "" -#: src/Core/Installer.php:643 +#: src/Core/Installer.php:648 msgid "ImageMagick PHP extension is installed" msgstr "" -#: src/Core/Installer.php:645 +#: src/Core/Installer.php:650 msgid "ImageMagick supports GIF" msgstr "" -#: src/Core/Installer.php:667 +#: src/Core/Installer.php:672 msgid "Database already in use." msgstr "" -#: src/Core/Installer.php:672 +#: src/Core/Installer.php:677 msgid "Could not connect to database." msgstr "" @@ -3392,81 +3400,81 @@ msgstr "" msgid "Happy Birthday %s" msgstr "" -#: src/Model/Item.php:2084 +#: src/Model/Item.php:2139 #, php-format msgid "Detected languages in this post:\\n%s" msgstr "" -#: src/Model/Item.php:3029 +#: src/Model/Item.php:3084 msgid "activity" msgstr "" -#: src/Model/Item.php:3031 +#: src/Model/Item.php:3086 msgid "comment" msgstr "" -#: src/Model/Item.php:3034 src/Module/Post/Tag/Add.php:123 +#: src/Model/Item.php:3089 src/Module/Post/Tag/Add.php:123 msgid "post" msgstr "" -#: src/Model/Item.php:3204 +#: src/Model/Item.php:3259 #, php-format msgid "%s is blocked" msgstr "" -#: src/Model/Item.php:3206 +#: src/Model/Item.php:3261 #, php-format msgid "%s is ignored" msgstr "" -#: src/Model/Item.php:3208 +#: src/Model/Item.php:3263 #, php-format msgid "Content from %s is collapsed" msgstr "" -#: src/Model/Item.php:3212 +#: src/Model/Item.php:3267 #, php-format msgid "Content warning: %s" msgstr "" -#: src/Model/Item.php:3668 +#: src/Model/Item.php:3723 msgid "bytes" msgstr "" -#: src/Model/Item.php:3699 +#: src/Model/Item.php:3754 #, php-format msgid "%2$s (%3$d%%, %1$d vote)" msgid_plural "%2$s (%3$d%%, %1$d votes)" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3701 +#: src/Model/Item.php:3756 #, php-format msgid "%2$s (%1$d vote)" msgid_plural "%2$s (%1$d votes)" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3706 +#: src/Model/Item.php:3761 #, php-format msgid "%d voter. Poll end: %s" msgid_plural "%d voters. Poll end: %s" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3708 +#: src/Model/Item.php:3763 #, php-format msgid "%d voter." msgid_plural "%d voters." msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3710 +#: src/Model/Item.php:3765 #, php-format msgid "Poll end: %s" msgstr "" -#: src/Model/Item.php:3744 src/Model/Item.php:3745 +#: src/Model/Item.php:3799 src/Model/Item.php:3800 msgid "View on separate page" msgstr "" From 9e11b0e317071f0b97d276656551b42724fa51aa Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Oct 2023 19:25:58 +0000 Subject: [PATCH 04/12] Updated german install documentation --- doc/de/Install.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/de/Install.md b/doc/de/Install.md index 3040230131..db99367af3 100644 --- a/doc/de/Install.md +++ b/doc/de/Install.md @@ -25,9 +25,9 @@ Requirements --- * Apache mit einer aktiverten mod-rewrite-Funktion und dem Eintrag "Options All", so dass du die lokale .htaccess-Datei nutzen kannst -* PHP 7.3+ (PHP 8 wird noch nicht komplett unterstützt) +* PHP 7.3+ * PHP *Kommandozeilen*-Zugang mit register_argc_argv auf "true" gesetzt in der php.ini-Datei - * Curl, GD, GMP, PDO, MySQLi, xml, zip und OpenSSL-Erweiterung + * Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip, IntlChar and OpenSSL-Erweiterung * Das POSIX Modul muss aktiviert sein ([CentOS, RHEL](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) haben dies z.B. deaktiviert) * Einen E-Mail Server, so dass PHP `mail()` funktioniert. Wenn kein eigener E-Mail Server zur Verfügung steht, kann alternativ das [phpmailer](https://github.com/friendica/friendica-addons/tree/develop/phpmailer) Addon mit einem externen SMTP Account verwendet werden. From 6459614f34d33ae22a75375c6ea2f188245f2e9c Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Oct 2023 19:30:02 +0000 Subject: [PATCH 05/12] Updated messages.po - again --- view/lang/C/messages.po | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 0d65906b89..52742589db 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2023.09-rc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-11 19:21+0000\n" +"POT-Creation-Date: 2023-10-11 19:29+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2732,8 +2732,8 @@ msgstr "" #: src/Core/Installer.php:516 msgid "" -"The web installer needs to be able to create a file called \"local.config." -"php\" in the \"config\" folder of your web server and it is unable to do so." +"The web installer needs to be able to create a file called \"local.config.php" +"\" in the \"config\" folder of your web server and it is unable to do so." msgstr "" #: src/Core/Installer.php:517 @@ -5359,9 +5359,9 @@ msgstr "" #: src/Module/Admin/Summary.php:98 msgid "" -"The last update failed. Please run \"php bin/console.php dbstructure " -"update\" from the command line and have a look at the errors that might " -"appear. (Some of the errors are possibly inside the logfile.)" +"The last update failed. Please run \"php bin/console.php dbstructure update" +"\" from the command line and have a look at the errors that might appear. " +"(Some of the errors are possibly inside the logfile.)" msgstr "" #: src/Module/Admin/Summary.php:102 @@ -5512,8 +5512,8 @@ msgstr "" #, php-format msgid "" "Show some informations regarding the needed information to operate the node " -"according e.g. to EU-GDPR." +"according e.g. to EU-GDPR." msgstr "" #: src/Module/Admin/Tos.php:81 @@ -8864,8 +8864,8 @@ msgstr "" #: src/Module/Profile/Profile.php:158 #, php-format msgid "" -"You're currently viewing your profile as %s Cancel" +"You're currently viewing your profile as %s Cancel" msgstr "" #: src/Module/Profile/Profile.php:167 @@ -9413,8 +9413,8 @@ msgstr "" #: src/Module/Security/TwoFactor/Verify.php:100 #, php-format msgid "" -"If you do not have access to your authentication code you can use a two-factor recovery code." +"If you do not have access to your authentication code you can use a two-factor recovery code." msgstr "" #: src/Module/Security/TwoFactor/Verify.php:101 @@ -11055,8 +11055,8 @@ msgstr "" #: src/Module/Settings/TwoFactor/Verify.php:149 #, php-format msgid "" -"

Or you can open the following URL in your mobile device:

%s

" +"

Or you can open the following URL in your mobile device:

%s

" msgstr "" #: src/Module/Settings/TwoFactor/Verify.php:156 @@ -11165,9 +11165,9 @@ msgstr "" msgid "" "At any point in time a logged in user can export their account data from the " "account settings. If the user wants " -"to delete their account they can do so at %1$s/settings/removeme. The deletion of the account will be " -"permanent. Deletion of the data will also be requested from the nodes of the " +"to delete their account they can do so at " +"%1$s/settings/removeme. The deletion of the account will be permanent. " +"Deletion of the data will also be requested from the nodes of the " "communication partners." msgstr "" From 42919a2be331efc1af46440781e82bd09380e2ef Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Oct 2023 19:43:42 +0000 Subject: [PATCH 06/12] Deactivated check --- src/Core/Installer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Core/Installer.php b/src/Core/Installer.php index 68f40c01a1..afea87ffb0 100644 --- a/src/Core/Installer.php +++ b/src/Core/Installer.php @@ -411,7 +411,8 @@ class Installer $help = DI::l10n()->t('Error: The IntlChar module is not installed.'); $returnVal = false; } - $this->addCheck(DI::l10n()->t('IntlChar PHP module'), $status, true, $help); + // Acticate when IntlChar is installed in the check pipeline. + // $this->addCheck(DI::l10n()->t('IntlChar PHP module'), $status, true, $help); // check for XML DOM Documents being able to be generated $help = ''; From 12337be827b247894015afc56e86f97e8d9135f4 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Oct 2023 20:21:55 +0000 Subject: [PATCH 07/12] Updated messages.po --- view/lang/C/messages.po | 98 ++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 51 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 094d122fef..75bdb01149 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2023.09-rc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-11 19:29+0000\n" +"POT-Creation-Date: 2023-10-11 20:21+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2636,218 +2636,214 @@ msgstr "" msgid "Error: The IntlChar module is not installed." msgstr "" -#: src/Core/Installer.php:414 -msgid "IntlChar PHP module" -msgstr "" - -#: src/Core/Installer.php:422 +#: src/Core/Installer.php:423 msgid "Error, XML PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:426 +#: src/Core/Installer.php:427 msgid "XML PHP module" msgstr "" -#: src/Core/Installer.php:429 +#: src/Core/Installer.php:430 msgid "libCurl PHP module" msgstr "" -#: src/Core/Installer.php:430 +#: src/Core/Installer.php:431 msgid "Error: libCURL PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:436 +#: src/Core/Installer.php:437 msgid "GD graphics PHP module" msgstr "" -#: src/Core/Installer.php:437 +#: src/Core/Installer.php:438 msgid "" "Error: GD graphics PHP module with JPEG support required but not installed." msgstr "" -#: src/Core/Installer.php:443 +#: src/Core/Installer.php:444 msgid "OpenSSL PHP module" msgstr "" -#: src/Core/Installer.php:444 +#: src/Core/Installer.php:445 msgid "Error: openssl PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:450 +#: src/Core/Installer.php:451 msgid "mb_string PHP module" msgstr "" -#: src/Core/Installer.php:451 +#: src/Core/Installer.php:452 msgid "Error: mb_string PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:457 +#: src/Core/Installer.php:458 msgid "iconv PHP module" msgstr "" -#: src/Core/Installer.php:458 +#: src/Core/Installer.php:459 msgid "Error: iconv PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:464 +#: src/Core/Installer.php:465 msgid "POSIX PHP module" msgstr "" -#: src/Core/Installer.php:465 +#: src/Core/Installer.php:466 msgid "Error: POSIX PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:471 +#: src/Core/Installer.php:472 msgid "Program execution functions" msgstr "" -#: src/Core/Installer.php:472 +#: src/Core/Installer.php:473 msgid "" "Error: Program execution functions (proc_open) required but not enabled." msgstr "" -#: src/Core/Installer.php:478 +#: src/Core/Installer.php:479 msgid "JSON PHP module" msgstr "" -#: src/Core/Installer.php:479 +#: src/Core/Installer.php:480 msgid "Error: JSON PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:485 +#: src/Core/Installer.php:486 msgid "File Information PHP module" msgstr "" -#: src/Core/Installer.php:486 +#: src/Core/Installer.php:487 msgid "Error: File Information PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:492 +#: src/Core/Installer.php:493 msgid "GNU Multiple Precision PHP module" msgstr "" -#: src/Core/Installer.php:493 +#: src/Core/Installer.php:494 msgid "Error: GNU Multiple Precision PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:516 +#: src/Core/Installer.php:517 msgid "" "The web installer needs to be able to create a file called \"local.config.php" "\" in the \"config\" folder of your web server and it is unable to do so." msgstr "" -#: src/Core/Installer.php:517 +#: src/Core/Installer.php:518 msgid "" "This is most often a permission setting, as the web server may not be able " "to write files in your folder - even if you can." msgstr "" -#: src/Core/Installer.php:518 +#: src/Core/Installer.php:519 msgid "" "At the end of this procedure, we will give you a text to save in a file " "named local.config.php in your Friendica \"config\" folder." msgstr "" -#: src/Core/Installer.php:519 +#: src/Core/Installer.php:520 msgid "" "You can alternatively skip this procedure and perform a manual installation. " "Please see the file \"doc/INSTALL.md\" for instructions." msgstr "" -#: src/Core/Installer.php:522 +#: src/Core/Installer.php:523 msgid "config/local.config.php is writable" msgstr "" -#: src/Core/Installer.php:542 +#: src/Core/Installer.php:543 msgid "" "Friendica uses the Smarty3 template engine to render its web views. Smarty3 " "compiles templates to PHP to speed up rendering." msgstr "" -#: src/Core/Installer.php:543 +#: src/Core/Installer.php:544 msgid "" "In order to store these compiled templates, the web server needs to have " "write access to the directory view/smarty3/ under the Friendica top level " "folder." msgstr "" -#: src/Core/Installer.php:544 +#: src/Core/Installer.php:545 msgid "" "Please ensure that the user that your web server runs as (e.g. www-data) has " "write access to this folder." msgstr "" -#: src/Core/Installer.php:545 +#: src/Core/Installer.php:546 msgid "" "Note: as a security measure, you should give the web server write access to " "view/smarty3/ only--not the template files (.tpl) that it contains." msgstr "" -#: src/Core/Installer.php:548 +#: src/Core/Installer.php:549 msgid "view/smarty3 is writable" msgstr "" -#: src/Core/Installer.php:576 +#: src/Core/Installer.php:577 msgid "" "Url rewrite in .htaccess seems not working. Make sure you copied .htaccess-" "dist to .htaccess." msgstr "" -#: src/Core/Installer.php:577 +#: src/Core/Installer.php:578 msgid "" "In some circumstances (like running inside containers), you can skip this " "error." msgstr "" -#: src/Core/Installer.php:579 +#: src/Core/Installer.php:580 msgid "Error message from Curl when fetching" msgstr "" -#: src/Core/Installer.php:585 +#: src/Core/Installer.php:586 msgid "Url rewrite is working" msgstr "" -#: src/Core/Installer.php:614 +#: src/Core/Installer.php:615 msgid "" "The detection of TLS to secure the communication between the browser and the " "new Friendica server failed." msgstr "" -#: src/Core/Installer.php:615 +#: src/Core/Installer.php:616 msgid "" "It is highly encouraged to use Friendica only over a secure connection as " "sensitive information like passwords will be transmitted." msgstr "" -#: src/Core/Installer.php:616 +#: src/Core/Installer.php:617 msgid "Please ensure that the connection to the server is secure." msgstr "" -#: src/Core/Installer.php:617 +#: src/Core/Installer.php:618 msgid "No TLS detected" msgstr "" -#: src/Core/Installer.php:619 +#: src/Core/Installer.php:620 msgid "TLS detected" msgstr "" -#: src/Core/Installer.php:646 +#: src/Core/Installer.php:647 msgid "ImageMagick PHP extension is not installed" msgstr "" -#: src/Core/Installer.php:648 +#: src/Core/Installer.php:649 msgid "ImageMagick PHP extension is installed" msgstr "" -#: src/Core/Installer.php:650 +#: src/Core/Installer.php:651 msgid "ImageMagick supports GIF" msgstr "" -#: src/Core/Installer.php:672 +#: src/Core/Installer.php:673 msgid "Database already in use." msgstr "" -#: src/Core/Installer.php:677 +#: src/Core/Installer.php:678 msgid "Could not connect to database." msgstr "" From d658908abe35172de6b8765015d7138f2fdf3bc6 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Oct 2023 20:28:10 +0000 Subject: [PATCH 08/12] Deactivate the check --- src/Core/Installer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Core/Installer.php b/src/Core/Installer.php index afea87ffb0..7faff1503d 100644 --- a/src/Core/Installer.php +++ b/src/Core/Installer.php @@ -404,6 +404,8 @@ class Installer } $this->addCheck(DI::l10n()->t('PDO or MySQLi PHP module'), $status, true, $help); + // Acticate when IntlChar is installed in the check pipeline. + /* $help = ''; $status = true; if (!class_exists('IntlChar')) { @@ -411,8 +413,8 @@ class Installer $help = DI::l10n()->t('Error: The IntlChar module is not installed.'); $returnVal = false; } - // Acticate when IntlChar is installed in the check pipeline. - // $this->addCheck(DI::l10n()->t('IntlChar PHP module'), $status, true, $help); + $this->addCheck(DI::l10n()->t('IntlChar PHP module'), $status, true, $help); + */ // check for XML DOM Documents being able to be generated $help = ''; From 35991bc0e16b315f4c854ba61deaa0f10936ca9a Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Oct 2023 20:36:25 +0000 Subject: [PATCH 09/12] messager.po --- view/lang/C/messages.po | 98 ++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 51 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 75bdb01149..2a478519d8 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2023.09-rc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-11 20:21+0000\n" +"POT-Creation-Date: 2023-10-11 20:35+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2632,218 +2632,214 @@ msgstr "" msgid "PDO or MySQLi PHP module" msgstr "" -#: src/Core/Installer.php:411 -msgid "Error: The IntlChar module is not installed." -msgstr "" - -#: src/Core/Installer.php:423 +#: src/Core/Installer.php:425 msgid "Error, XML PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:427 +#: src/Core/Installer.php:429 msgid "XML PHP module" msgstr "" -#: src/Core/Installer.php:430 +#: src/Core/Installer.php:432 msgid "libCurl PHP module" msgstr "" -#: src/Core/Installer.php:431 +#: src/Core/Installer.php:433 msgid "Error: libCURL PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:437 +#: src/Core/Installer.php:439 msgid "GD graphics PHP module" msgstr "" -#: src/Core/Installer.php:438 +#: src/Core/Installer.php:440 msgid "" "Error: GD graphics PHP module with JPEG support required but not installed." msgstr "" -#: src/Core/Installer.php:444 +#: src/Core/Installer.php:446 msgid "OpenSSL PHP module" msgstr "" -#: src/Core/Installer.php:445 +#: src/Core/Installer.php:447 msgid "Error: openssl PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:451 +#: src/Core/Installer.php:453 msgid "mb_string PHP module" msgstr "" -#: src/Core/Installer.php:452 +#: src/Core/Installer.php:454 msgid "Error: mb_string PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:458 +#: src/Core/Installer.php:460 msgid "iconv PHP module" msgstr "" -#: src/Core/Installer.php:459 +#: src/Core/Installer.php:461 msgid "Error: iconv PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:465 +#: src/Core/Installer.php:467 msgid "POSIX PHP module" msgstr "" -#: src/Core/Installer.php:466 +#: src/Core/Installer.php:468 msgid "Error: POSIX PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:472 +#: src/Core/Installer.php:474 msgid "Program execution functions" msgstr "" -#: src/Core/Installer.php:473 +#: src/Core/Installer.php:475 msgid "" "Error: Program execution functions (proc_open) required but not enabled." msgstr "" -#: src/Core/Installer.php:479 +#: src/Core/Installer.php:481 msgid "JSON PHP module" msgstr "" -#: src/Core/Installer.php:480 +#: src/Core/Installer.php:482 msgid "Error: JSON PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:486 +#: src/Core/Installer.php:488 msgid "File Information PHP module" msgstr "" -#: src/Core/Installer.php:487 +#: src/Core/Installer.php:489 msgid "Error: File Information PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:493 +#: src/Core/Installer.php:495 msgid "GNU Multiple Precision PHP module" msgstr "" -#: src/Core/Installer.php:494 +#: src/Core/Installer.php:496 msgid "Error: GNU Multiple Precision PHP module required but not installed." msgstr "" -#: src/Core/Installer.php:517 +#: src/Core/Installer.php:519 msgid "" "The web installer needs to be able to create a file called \"local.config.php" "\" in the \"config\" folder of your web server and it is unable to do so." msgstr "" -#: src/Core/Installer.php:518 +#: src/Core/Installer.php:520 msgid "" "This is most often a permission setting, as the web server may not be able " "to write files in your folder - even if you can." msgstr "" -#: src/Core/Installer.php:519 +#: src/Core/Installer.php:521 msgid "" "At the end of this procedure, we will give you a text to save in a file " "named local.config.php in your Friendica \"config\" folder." msgstr "" -#: src/Core/Installer.php:520 +#: src/Core/Installer.php:522 msgid "" "You can alternatively skip this procedure and perform a manual installation. " "Please see the file \"doc/INSTALL.md\" for instructions." msgstr "" -#: src/Core/Installer.php:523 +#: src/Core/Installer.php:525 msgid "config/local.config.php is writable" msgstr "" -#: src/Core/Installer.php:543 +#: src/Core/Installer.php:545 msgid "" "Friendica uses the Smarty3 template engine to render its web views. Smarty3 " "compiles templates to PHP to speed up rendering." msgstr "" -#: src/Core/Installer.php:544 +#: src/Core/Installer.php:546 msgid "" "In order to store these compiled templates, the web server needs to have " "write access to the directory view/smarty3/ under the Friendica top level " "folder." msgstr "" -#: src/Core/Installer.php:545 +#: src/Core/Installer.php:547 msgid "" "Please ensure that the user that your web server runs as (e.g. www-data) has " "write access to this folder." msgstr "" -#: src/Core/Installer.php:546 +#: src/Core/Installer.php:548 msgid "" "Note: as a security measure, you should give the web server write access to " "view/smarty3/ only--not the template files (.tpl) that it contains." msgstr "" -#: src/Core/Installer.php:549 +#: src/Core/Installer.php:551 msgid "view/smarty3 is writable" msgstr "" -#: src/Core/Installer.php:577 +#: src/Core/Installer.php:579 msgid "" "Url rewrite in .htaccess seems not working. Make sure you copied .htaccess-" "dist to .htaccess." msgstr "" -#: src/Core/Installer.php:578 +#: src/Core/Installer.php:580 msgid "" "In some circumstances (like running inside containers), you can skip this " "error." msgstr "" -#: src/Core/Installer.php:580 +#: src/Core/Installer.php:582 msgid "Error message from Curl when fetching" msgstr "" -#: src/Core/Installer.php:586 +#: src/Core/Installer.php:588 msgid "Url rewrite is working" msgstr "" -#: src/Core/Installer.php:615 +#: src/Core/Installer.php:617 msgid "" "The detection of TLS to secure the communication between the browser and the " "new Friendica server failed." msgstr "" -#: src/Core/Installer.php:616 +#: src/Core/Installer.php:618 msgid "" "It is highly encouraged to use Friendica only over a secure connection as " "sensitive information like passwords will be transmitted." msgstr "" -#: src/Core/Installer.php:617 +#: src/Core/Installer.php:619 msgid "Please ensure that the connection to the server is secure." msgstr "" -#: src/Core/Installer.php:618 +#: src/Core/Installer.php:620 msgid "No TLS detected" msgstr "" -#: src/Core/Installer.php:620 +#: src/Core/Installer.php:622 msgid "TLS detected" msgstr "" -#: src/Core/Installer.php:647 +#: src/Core/Installer.php:649 msgid "ImageMagick PHP extension is not installed" msgstr "" -#: src/Core/Installer.php:649 +#: src/Core/Installer.php:651 msgid "ImageMagick PHP extension is installed" msgstr "" -#: src/Core/Installer.php:651 +#: src/Core/Installer.php:653 msgid "ImageMagick supports GIF" msgstr "" -#: src/Core/Installer.php:673 +#: src/Core/Installer.php:675 msgid "Database already in use." msgstr "" -#: src/Core/Installer.php:678 +#: src/Core/Installer.php:680 msgid "Could not connect to database." msgstr "" From 407f46c043219efb8b1a0b91ba0845c32590650b Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 11 Oct 2023 20:41:40 +0000 Subject: [PATCH 10/12] Exit when the class doen't exists --- src/Model/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index ad93b949d9..b061aa1df9 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2063,7 +2063,7 @@ class Item */ private static function splitByBlocks(string $body): array { - if (class_exists('IntlChar')) { + if (!class_exists('IntlChar')) { return [$body]; } From 47c15d330f49967a8a8425e49e2f77c1c68801cc Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 11 Oct 2023 22:58:14 +0200 Subject: [PATCH 11/12] Update src/Core/Installer.php Co-authored-by: Hypolite Petovan --- src/Core/Installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Installer.php b/src/Core/Installer.php index 7faff1503d..f9a5eda8d6 100644 --- a/src/Core/Installer.php +++ b/src/Core/Installer.php @@ -404,7 +404,7 @@ class Installer } $this->addCheck(DI::l10n()->t('PDO or MySQLi PHP module'), $status, true, $help); - // Acticate when IntlChar is installed in the check pipeline. + // Uncomment when IntlChar is installed in the check pipeline. /* $help = ''; $status = true; From aeba70f2a6e68d5034631627ba13aa153a122d73 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 12 Oct 2023 05:19:57 +0000 Subject: [PATCH 12/12] Language description updated --- src/Core/L10n.php | 38 +++++++++++++++++++------------------- src/Model/Item.php | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Core/L10n.php b/src/Core/L10n.php index 414d578fca..548aea1ace 100644 --- a/src/Core/L10n.php +++ b/src/Core/L10n.php @@ -405,35 +405,35 @@ class L10n 'be' => 'беларуская мова', 'bn' => 'বাংলা', 'cy' => 'Cymraeg', - 'el-monoton' => 'Ελληνικά', - 'eu' => 'euskara', + 'el-monoton' => 'ελληνικά', + 'eu' => 'euskara, euskera', 'fa' => 'فارسی', 'ga' => 'Gaeilge', - 'gl' => 'Galego', + 'gl' => 'galego', 'he' => 'עברית', - 'hi' => 'हिन्दी', - 'hr' => 'Hrvatski', + 'hi' => 'हिन्दी, हिंदी', + 'hr' => 'hrvatski jezik', 'hy' => 'Հայերեն', - 'id' => 'bahasa Indonesia', - 'jv' => 'Basa Jawa', + 'id' => 'Bahasa Indonesia', + 'jv' => 'basa Jawa', 'ka' => 'ქართული', - 'ko' => '한국인', - 'lt' => 'lietuvių', - 'lv' => 'latviešu', - 'ms-Latn' => 'Bahasa Melayu', + 'ko' => '한국어, 조선어', + 'lt' => 'lietuvių kalba', + 'lv' => 'latviešu valoda', + 'ms-Latn' => 'bahasa Melayu, بهاس ملايو‎', 'sr-Cyrl' => 'српски језик', - 'sk' => 'slovenský', - 'sl' => 'Slovenščina', + 'sk' => 'slovenčina, slovenský jazyk', + 'sl' => 'slovenski jezik, slovenščina', 'sq' => 'Shqip', 'sw' => 'Kiswahili', 'ta' => 'தமிழ்', - 'th' => 'แบบไทย', - 'tl' => 'Wikang Tagalog', + 'th' => 'ไทย', + 'tl' => 'Wikang Tagalog, ᜏᜒᜃᜅ᜔ ᜆᜄᜎᜓᜄ᜔', 'tr' => 'Türkçe', - 'pt-PT' => 'Português', - 'uk' => 'Українська', - 'uz' => 'Ўзбек', - 'vi' => 'Tiếng Việt', + 'pt-PT' => 'português', + 'uk' => 'українська мова', + 'uz' => 'Oʻzbek, Ўзбек, أۇزبېك‎', + 'vi' => 'Việt Nam', 'zh-hant' => '繁體', ]; $langs = array_merge($additional_langs, $langs); diff --git a/src/Model/Item.php b/src/Model/Item.php index b061aa1df9..27359ab2bf 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2134,7 +2134,7 @@ class Item $used_languages = ''; foreach (json_decode($item['language'], true) as $language => $reliability) { - $used_languages .= $iso639->languageByCode1($language) . ' (' . $language . "): " . number_format($reliability, 5) . '\n'; + $used_languages .= $iso639->nativeByCode1(substr($language, 0, 2)) . ' (' . $iso639->languageByCode1(substr($language, 0, 2)) . ' - ' . $language . "): " . number_format($reliability, 5) . '\n'; } $used_languages = DI::l10n()->t('Detected languages in this post:\n%s', $used_languages); return $used_languages;