From 67c84e59d39ab1fd07bd1c4d7ecc1dd5a091b57e Mon Sep 17 00:00:00 2001 From: stc4000 Date: Mon, 25 Nov 2024 13:05:26 +0000 Subject: [PATCH 1/4] Danish translated at 100.0% (3781 of 3781 strings) --- resources/lang/da/messages.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/lang/da/messages.po b/resources/lang/da/messages.po index be946c1f67..e0c189daad 100644 --- a/resources/lang/da/messages.po +++ b/resources/lang/da/messages.po @@ -3,8 +3,8 @@ msgstr "" "Project-Id-Version: webtrees\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-03-19 13:12+0000\n" -"PO-Revision-Date: 2024-10-07 12:22+0000\n" -"Last-Translator: Greg Roach \n" +"PO-Revision-Date: 2024-11-26 04:15+0000\n" +"Last-Translator: stc4000 \n" "Language-Team: Danish \n" "Language: da\n" @@ -25,7 +25,7 @@ msgstr "" #: resources/xml/reports/ahnentafel_report.xml:333 #: resources/xml/reports/ahnentafel_report.xml:358 msgid " but the details are unknown" -msgstr " men nærmere detaljer er ukendte" +msgstr " men detaljerne er ukendte" #: resources/xml/reports/ahnentafel_report.xml:160 #: resources/xml/reports/ahnentafel_report.xml:188 @@ -14765,7 +14765,7 @@ msgstr "Der er ingen hændelser for denne person." #: app/Module/IndividualListModule.php:220 #, php-format msgid "There are no individuals with the surname “%s”" -msgstr "" +msgstr "Der findes ingen personer med efternavnet “%s”" #: app/Http/RequestHandlers/ManageMediaData.php:327 msgid "There are no links to this media object." @@ -17178,7 +17178,7 @@ msgstr "fortsæt" #: app/Elements/GeneatiqueAct.php:40 msgctxt "NOUN" msgid "copy" -msgstr "" +msgstr "kopi" #. I18N: A button label. #: resources/views/admin/trees-create.phtml:57 @@ -17360,7 +17360,7 @@ msgstr "eksportfil" #: app/Elements/GeneatiqueAct.php:42 msgctxt "NOUN" msgid "extract" -msgstr "" +msgstr "uddrag" #: app/Http/RequestHandlers/TreePreferencesPage.php:113 #: resources/xml/reports/fact_sources.xml:6 @@ -19862,7 +19862,7 @@ msgstr "af" #: app/Elements/GeneatiqueAct.php:38 msgid "online" -msgstr "" +msgstr "online" #: app/Services/RelationshipService.php:354 msgid "parent" @@ -19918,7 +19918,7 @@ msgstr "procent" #: app/Elements/GeneatiqueAct.php:41 msgid "photocopy" -msgstr "" +msgstr "fotokopi" #. I18N: https://en.wikipedia.org/wiki/Plain_text #: app/Http/RequestHandlers/TreePreferencesPage.php:106 From cdec4d7fc0e9f944d3787a8110c21e109ff0c4f7 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Tue, 26 Nov 2024 22:45:37 +0000 Subject: [PATCH 2/4] Fix: #5061 - some subtags not removed from links to private records --- app/GedcomRecord.php | 29 ++++++++++++----------------- phpstan-baseline.neon | 8 +++++++- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php index fad54552d9..c2e1d1653c 100644 --- a/app/GedcomRecord.php +++ b/app/GedcomRecord.php @@ -312,23 +312,18 @@ public function privatizeGedcom(int $access_level): string } // Remove links to missing and private records - $patterns = [ - '/\n1 ' . Gedcom::REGEX_TAG . ' @(' . Gedcom::REGEX_XREF . ')@(?:\n[2-9].*)*/', - '/\n2 ' . Gedcom::REGEX_TAG . ' @(' . Gedcom::REGEX_XREF . ')@(?:\n[3-9].*)*/', - '/\n3 ' . Gedcom::REGEX_TAG . ' @(' . Gedcom::REGEX_XREF . ')@(?:\n[4-9].*)*/', - '/\n4 ' . Gedcom::REGEX_TAG . ' @(' . Gedcom::REGEX_XREF . ')@(?:\n[5-9].*)*/', - ]; - - foreach ($patterns as $pattern) { - preg_match_all($pattern, $gedcom, $matches, PREG_SET_ORDER); - - foreach ($matches as $match) { - $xref = $match[1]; - $record = Registry::gedcomRecordFactory()->make($xref, $this->tree); - - if ($record === null || !$record->canShow($access_level)) { - $gedcom = str_replace($match[0], '', $gedcom); - } + $pattern = '/\n(\d) ' . Gedcom::REGEX_TAG . ' @(' . Gedcom::REGEX_XREF . ')@/'; + preg_match_all($pattern, $gedcom, $matches, PREG_SET_ORDER); + + foreach ($matches as $match) { + $xref = $match[2]; + $record = Registry::gedcomRecordFactory()->make($xref, $this->tree); + + if ($record === null || !$record->canShow($access_level)) { + $level = $match[1]; + $next = 1 + (int) $level; + $pattern = '/\n' . $level . ' ' . Gedcom::REGEX_TAG . ' @' . $xref . '@(\n[' . $next . '-9].*)*/'; + $gedcom = preg_replace($pattern, '', $gedcom); } } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6d83cb1238..6dfa07771d 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1110,6 +1110,12 @@ parameters: count: 1 path: app/GedcomRecord.php + - + message: '#^Method Fisharebest\\Webtrees\\GedcomRecord\:\:privatizeGedcom\(\) should return string but returns string\|null\.$#' + identifier: return.type + count: 1 + path: app/GedcomRecord.php + - message: '#^Parameter \#1 \$array of function array_shift expects array, list\\|false given\.$#' identifier: argument.type @@ -1149,7 +1155,7 @@ parameters: - message: '#^Parameter \#3 \$subject of function preg_replace expects array\\|string, string\|null given\.$#' identifier: argument.type - count: 1 + count: 2 path: app/GedcomRecord.php - From be7b921bc7dbb3fd634004ac8684ab4b3e7671c3 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Tue, 26 Nov 2024 23:10:26 +0000 Subject: [PATCH 3/4] Fix: automatically expand notes option fails to expand notes --- app/Elements/NoteStructure.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Elements/NoteStructure.php b/app/Elements/NoteStructure.php index 9b34b93402..125acf48e1 100644 --- a/app/Elements/NoteStructure.php +++ b/app/Elements/NoteStructure.php @@ -138,7 +138,7 @@ public function labelValue(string $value, Tree $tree): string ' ' . '' . $label . ': ' . $first_line . '' . - '
' . + '
' . $html . '
'; } From f9645b3ce5dbccc963c9bf32193c8600d2e0c78d Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Tue, 26 Nov 2024 23:32:03 +0000 Subject: [PATCH 4/4] Fix: #5059 surnames should link to indivdiual list, not family list --- app/Module/FamilyListModule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Module/FamilyListModule.php b/app/Module/FamilyListModule.php index 89a397f2ef..445c77fb99 100644 --- a/app/Module/FamilyListModule.php +++ b/app/Module/FamilyListModule.php @@ -21,7 +21,7 @@ use Fisharebest\Webtrees\I18N; -class FamilyListModule extends IndividualListModule +class FamilyListModule extends AbstractIndividualListModule { public function title(): string {