From 0b31128663505bcacc79f873052b18966a476012 Mon Sep 17 00:00:00 2001 From: Jack Wilkinson Date: Fri, 14 Feb 2025 19:29:29 +0000 Subject: [PATCH 1/2] Added support for translations to the event log details partial --- .../controllers/eventlogs/_field_details.php | 80 ++++++++++--------- modules/system/lang/en/lang.php | 22 +++++ 2 files changed, 63 insertions(+), 39 deletions(-) diff --git a/modules/system/controllers/eventlogs/_field_details.php b/modules/system/controllers/eventlogs/_field_details.php index 5fc8ff618d..2120664a7a 100644 --- a/modules/system/controllers/eventlogs/_field_details.php +++ b/modules/system/controllers/eventlogs/_field_details.php @@ -12,7 +12,7 @@ function phpSyntaxHighlight(string $str): string { $regexes = [ - 'control' => '/\b(for|foreach|while|class |extends|yield from|yield|echo|fn|implements|try|catch|finally|throw|new|instanceof|parent|function|return|unset|static|public|protected|private|count|global|if|else|else if|intval|int|array)\b/', + 'control' => '/\b(for|foreach|while|class |extends|yield from|yield|echo|fn|implements|try|catch|finally|throw|new|instanceof| parent|final|function|return|unset|static|public|protected|private|count|global|if|else|else if|intval|int|array)\b/', 'bool' => '/(\bnull\b|\btrue\b|\bfalse\b)/', 'string' => [ 'pattern' => '/(\221[^\221]*\221|\222[^\222]*\222)/', @@ -278,45 +278,45 @@ function getOrderedExceptionList(array $value): array - - + + - + - - + + - - + +
HTTP Method
Url - - + +
User Agent
Client IP
-
- - +
+ +
-
- - +
+ +
-
- +
+
-
- +
+
@@ -325,8 +325,8 @@ function getOrderedExceptionList(array $value): array
@@ -334,25 +334,25 @@ function getOrderedExceptionList(array $value): array
$exception): ?>
-

-

+

+

-
- - +
+ +
-
- - +
+ +
- - at line + + at line
@@ -365,19 +365,21 @@ function getOrderedExceptionList(array $value): array
- Stack Trace ( frames) + e(count($exception['trace']))]) ?>
$frame): ?>
- # - in - at line + # + in + + at line + - with argument 1 ? 's' : '' ?>: (, ', $frame['arguments']) ?>) + with argument 1 ? 's' : '' ?>: (, ', array_map('e', $frame['arguments'])) ?>) - In App +
@@ -396,7 +398,7 @@ function getOrderedExceptionList(array $value): array
diff --git a/modules/system/lang/en/lang.php b/modules/system/lang/en/lang.php index 8c5eb30013..9e5e8ea606 100644 --- a/modules/system/lang/en/lang.php +++ b/modules/system/lang/en/lang.php @@ -398,6 +398,28 @@ 'message' => 'Message', 'level' => 'Level', 'preview_title' => 'Event', + 'details' => [ + 'http_method' => 'HTTP Method', + 'url' => 'URL', + 'user_agent' => 'User Agent', + 'client_ip' => 'Client IP', + 'context' => 'Context', + 'environment' => 'Environment', + 'backend' => 'Backend', + 'testing' => 'Testing', + 'exception_context' => 'Exception context', + 'exception_app_env' => 'Exception environment', + 'exception_encountered_backend' => 'Exception encountered in Backend', + 'exception_encountered_unit_test' => 'Exception encountered in unit test', + 'oldest_first' => 'Oldest first', + 'newest_first' => 'Newest first', + 'exception_index' => 'Exception index', + 'exception' => 'Exception', + 'exception_code' => 'Exception code', + 'code' => 'Code', + 'stack_trace' => 'Stack Trace (:count frames)', + 'in_app' => 'In App', + ] ], 'request_log' => [ 'hint' => 'This log displays a list of browser requests that may require attention. For example, if a visitor opens a CMS page that cannot be found, a record is created with the status code 404.', From b1febb21433e3c239a6f2fa847cbcbe81983a9c7 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Fri, 14 Feb 2025 16:12:58 -0600 Subject: [PATCH 2/2] Update modules/system/lang/en/lang.php --- modules/system/lang/en/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/lang/en/lang.php b/modules/system/lang/en/lang.php index 9e5e8ea606..04708b7ccd 100644 --- a/modules/system/lang/en/lang.php +++ b/modules/system/lang/en/lang.php @@ -419,7 +419,7 @@ 'code' => 'Code', 'stack_trace' => 'Stack Trace (:count frames)', 'in_app' => 'In App', - ] + ], ], 'request_log' => [ 'hint' => 'This log displays a list of browser requests that may require attention. For example, if a visitor opens a CMS page that cannot be found, a record is created with the status code 404.',