From: Hypolite Petovan Date: Tue, 6 Jun 2023 12:41:16 +0000 (-0400) Subject: [frio] On this date option in the archives X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3e3f48e5ec2f265035692ccc4ae355c86421bab5;p=friendica.git [frio] On this date option in the archives --- diff --git a/src/Content/Widget.php b/src/Content/Widget.php index ae3a950132..6b44a62eb7 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -470,8 +470,11 @@ class Widget if ($dthen) { // Set the start and end date to the beginning of the month + $cutoffday = $dthen; + $thisday = substr($dnow, 4); $dnow = substr($dnow, 0, 8) . '01'; $dthen = substr($dthen, 0, 8) . '01'; + /* * Starting with the current month, get the first and last days of every @@ -491,6 +494,7 @@ class Widget $ret[$dyear][] = [$str, $end_month, $start_month]; $dnow = DateTimeFormat::utc($dnow . ' -1 month', 'Y-m-d'); + } } @@ -510,7 +514,10 @@ class Widget '$url' => $url, '$dates' => $ret, '$showless' => DI::l10n()->t('show less'), - '$showmore' => DI::l10n()->t('show more') + '$showmore' => DI::l10n()->t('show more'), + '$onthisdate' => DI::l10n()->t('On this date'), + '$thisday' => $thisday, + '$cutoffday' => $cutoffday ]); return $o; diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 3388f43bb7..7ec266268b 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2023.09-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-05 08:44-0400\n" +"POT-Creation-Date: 2023-06-05 22:08-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1597,7 +1597,7 @@ msgid "" msgstr "" #: src/Content/GroupManager.php:151 src/Content/Nav.php:276 -#: src/Content/Text/HTML.php:877 src/Content/Widget.php:533 +#: src/Content/Text/HTML.php:877 src/Content/Widget.php:540 msgid "Groups" msgstr "" @@ -1605,12 +1605,12 @@ msgstr "" msgid "External link to group" msgstr "" -#: src/Content/GroupManager.php:157 src/Content/Widget.php:512 +#: src/Content/GroupManager.php:157 src/Content/Widget.php:516 msgid "show less" msgstr "" #: src/Content/GroupManager.php:158 src/Content/Widget.php:414 -#: src/Content/Widget.php:513 +#: src/Content/Widget.php:517 msgid "show more" msgstr "" @@ -2185,27 +2185,31 @@ msgid_plural "%d contacts in common" msgstr[0] "" msgstr[1] "" -#: src/Content/Widget.php:506 +#: src/Content/Widget.php:510 msgid "Archives" msgstr "" -#: src/Content/Widget.php:530 +#: src/Content/Widget.php:518 +msgid "On this date" +msgstr "" + +#: src/Content/Widget.php:537 msgid "Persons" msgstr "" -#: src/Content/Widget.php:531 +#: src/Content/Widget.php:538 msgid "Organisations" msgstr "" -#: src/Content/Widget.php:532 src/Model/Contact.php:1651 +#: src/Content/Widget.php:539 src/Model/Contact.php:1651 msgid "News" msgstr "" -#: src/Content/Widget.php:536 src/Module/Settings/Account.php:453 +#: src/Content/Widget.php:543 src/Module/Settings/Account.php:453 msgid "Account Types" msgstr "" -#: src/Content/Widget.php:537 src/Module/Moderation/BaseUsers.php:69 +#: src/Content/Widget.php:544 src/Module/Moderation/BaseUsers.php:69 msgid "All" msgstr "" diff --git a/view/templates/widget/posted_date.tpl b/view/templates/widget/posted_date.tpl index ad40bcb022..a488cc8065 100644 --- a/view/templates/widget/posted_date.tpl +++ b/view/templates/widget/posted_date.tpl @@ -31,10 +31,16 @@ function showHideDates() {