From 0638e23f7a857ed5e1cfc20e0152cf83b2cc1541 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Fri, 1 Oct 2021 16:45:34 +0200 Subject: [PATCH] Mark string translatable in View logs and update messages.po --- src/Module/Admin/Logs/View.php | 27 ++++++- view/lang/C/messages.po | 74 +++++++++++++++++-- view/templates/admin/logs/view.tpl | 18 ++--- view/theme/frio/templates/admin/logs/view.tpl | 48 ++++++------ 4 files changed, 123 insertions(+), 44 deletions(-) diff --git a/src/Module/Admin/Logs/View.php b/src/Module/Admin/Logs/View.php index bc9a769c6..a11108238 100644 --- a/src/Module/Admin/Logs/View.php +++ b/src/Module/Admin/Logs/View.php @@ -25,7 +25,6 @@ use Friendica\DI; use Friendica\Core\Renderer; use Friendica\Core\Theme; use Friendica\Module\BaseAdmin; -use Friendica\Model\Log\ParsedLogIterator; use Psr\Log\LogLevel; class View extends BaseAdmin @@ -81,13 +80,35 @@ class View extends BaseAdmin } } return Renderer::replaceMacros($t, [ - '$title' => DI::l10n()->t('Administration'), - '$page' => DI::l10n()->t('View Logs'), + '$title' => DI::l10n()->t('Administration'), + '$page' => DI::l10n()->t('View Logs'), + '$l10n' => [ + 'Search' => DI::l10n()->t('Search'), + 'Search_in_logs' => DI::l10n()->t('Search in logs'), + 'Show_all' => DI::l10n()->t('Show all'), + 'Date' => DI::l10n()->t('Date'), + 'Level' => DI::l10n()->t('Level'), + 'Context' => DI::l10n()->t('Context'), + 'Message' => DI::l10n()->t('Message'), + 'ALL' => DI::l10n()->t('ALL'), + 'View_details' => DI::l10n()->t('View details'), + 'Click_to_view_details' => DI::l10n()->t('Click to view details'), + 'Event_details' => DI::l10n()->t('Event details'), + 'Data' => DI::l10n()->t('Data'), + 'Source' => DI::l10n()->t('Source'), + 'File' => DI::l10n()->t('File'), + 'Line' => DI::l10n()->t('Line'), + 'Function' => DI::l10n()->t('Function'), + 'UID' => DI::l10n()->t('UID'), + 'Process_ID' => DI::l10n()->t('Process ID'), + 'Close' => DI::l10n()->t('Close'), + ], '$data' => $data, '$q' => $search, '$filters' => $filters, '$filtersvalues' => $filters_valid_values, '$error' => $error, + '$baseurl' => DI::baseUrl()->get(true), '$logname' => DI::config()->get('system', 'logfile'), ]); } diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 8adf175ee..59799c01e 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2021.12-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-01 13:53+0200\n" +"POT-Creation-Date: 2021-10-01 16:40+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -559,6 +559,7 @@ msgstr "" #: mod/editpost.php:134 src/Content/Conversation.php:380 #: src/Content/Widget/VCard.php:107 src/Model/Profile.php:459 +#: src/Module/Admin/Logs/View.php:93 msgid "Message" msgstr "" @@ -588,7 +589,7 @@ msgstr "" msgid "Create New Event" msgstr "" -#: mod/events.php:536 +#: mod/events.php:536 src/Module/Admin/Logs/View.php:97 msgid "Event details" msgstr "" @@ -3165,7 +3166,7 @@ msgid "Addon applications, utilities, games" msgstr "" #: src/Content/Nav.php:230 src/Content/Text/HTML.php:891 -#: src/Module/Search/Index.php:99 +#: src/Module/Admin/Logs/View.php:87 src/Module/Search/Index.php:99 msgid "Search" msgstr "" @@ -5483,7 +5484,7 @@ msgstr "" msgid "Implicit Mention" msgstr "" -#: src/Module/Admin/Item/Source.php:73 +#: src/Module/Admin/Item/Source.php:73 src/Module/Admin/Logs/View.php:99 #: src/Module/Debug/ActivityPubConversion.php:62 msgid "Source" msgstr "" @@ -5559,6 +5560,67 @@ msgstr "" msgid "View Logs" msgstr "" +#: src/Module/Admin/Logs/View.php:88 +msgid "Search in logs" +msgstr "" + +#: src/Module/Admin/Logs/View.php:89 +#: src/Module/Notifications/Notifications.php:138 +msgid "Show all" +msgstr "" + +#: src/Module/Admin/Logs/View.php:90 +msgid "Date" +msgstr "" + +#: src/Module/Admin/Logs/View.php:91 +msgid "Level" +msgstr "" + +#: src/Module/Admin/Logs/View.php:92 +msgid "Context" +msgstr "" + +#: src/Module/Admin/Logs/View.php:94 +msgid "ALL" +msgstr "" + +#: src/Module/Admin/Logs/View.php:95 +msgid "View details" +msgstr "" + +#: src/Module/Admin/Logs/View.php:96 +msgid "Click to view details" +msgstr "" + +#: src/Module/Admin/Logs/View.php:98 +msgid "Data" +msgstr "" + +#: src/Module/Admin/Logs/View.php:100 +msgid "File" +msgstr "" + +#: src/Module/Admin/Logs/View.php:101 +msgid "Line" +msgstr "" + +#: src/Module/Admin/Logs/View.php:102 +msgid "Function" +msgstr "" + +#: src/Module/Admin/Logs/View.php:103 +msgid "UID" +msgstr "" + +#: src/Module/Admin/Logs/View.php:104 +msgid "Process ID" +msgstr "" + +#: src/Module/Admin/Logs/View.php:105 +msgid "Close" +msgstr "" + #: src/Module/Admin/Queue.php:50 msgid "Inspect Deferred Worker Queue" msgstr "" @@ -8693,10 +8755,6 @@ msgstr "" msgid "Show unread" msgstr "" -#: src/Module/Notifications/Notifications.php:138 -msgid "Show all" -msgstr "" - #: src/Module/OAuth/Acknowledge.php:44 msgid "Authorize application connection" msgstr "" diff --git a/view/templates/admin/logs/view.tpl b/view/templates/admin/logs/view.tpl index e15a4a01b..97b5c0625 100644 --- a/view/templates/admin/logs/view.tpl +++ b/view/templates/admin/logs/view.tpl @@ -9,16 +9,16 @@ {{else}}

- - - clear + + + {{$l10n.Show_all}}

- + - + {{foreach $data as $row}} + title="{{$l10n.Click_to_view_details}}"> - + {{foreach $row->getData() as $k=>$v}} @@ -63,7 +63,7 @@ {{/foreach}} - + {{foreach $row->getSource() as $k=>$v}} diff --git a/view/theme/frio/templates/admin/logs/view.tpl b/view/theme/frio/templates/admin/logs/view.tpl index 1e1123fbd..cab888268 100755 --- a/view/theme/frio/templates/admin/logs/view.tpl +++ b/view/theme/frio/templates/admin/logs/view.tpl @@ -8,33 +8,33 @@ {{else}} -
+
-
Date{{$l10n.Date}} Message{{$l10n.Message}}
- + - + {{foreach $data as $row}}
Date{{$l10n.Date}} Message{{$l10n.Message}}