From c0814a2072ed9f12b40394da661c003758a75290 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Sat, 22 Jan 2005 09:38:48 +0000
Subject: [PATCH] - Patch #15957 by Goba: reintroduce translateable watchdog
 types.

---
 modules/watchdog.module          | 6 +++---
 modules/watchdog/watchdog.module | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/watchdog.module b/modules/watchdog.module
index 2a20d5e7d92e..cec70158c882 100644
--- a/modules/watchdog.module
+++ b/modules/watchdog.module
@@ -71,7 +71,7 @@ function watchdog_overview() {
   $names['all'] = t('all messages');
   $queries['all'] = '';
   foreach (_watchdog_get_message_types() as $type) {
-    $names[$type] = t('%type messages', array('%type' => $type));
+    $names[$type] = t('%type messages', array('%type' => t($type)));
     $queries[$type] = "WHERE type = '". db_escape_string($type) ."'";
   }
 
@@ -103,7 +103,7 @@ function watchdog_overview() {
       array(
         // Cells
         $icons[$watchdog->severity],
-        $watchdog->type,
+        t($watchdog->type),
         format_date($watchdog->timestamp, 'small'),
         truncate_utf8($watchdog->message, 64),
         format_name($watchdog),
@@ -139,7 +139,7 @@ function watchdog_event($id) {
   $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d', $id);
   if ($watchdog = db_fetch_object($result)) {
     $output .= '<table border="1" cellpadding="2" cellspacing="2">';
-    $output .= ' <tr><th>'. t('Type') ."</th><td>$watchdog->type</td></tr>";
+    $output .= ' <tr><th>'. t('Type') .'</th><td>' . t($watchdog->type) . '</td></tr>';
     $output .= ' <tr><th>'. t('Date') .'</th><td>'. format_date($watchdog->timestamp, 'large') .'</td></tr>';
     $output .= ' <tr><th>'. t('User') .'</th><td>'. format_name($watchdog) .'</td></tr>';
     $output .= ' <tr><th>'. t('Location') ."</th><td>". l($watchdog->location, $watchdog->location) ."</td></tr>";
diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module
index 2a20d5e7d92e..cec70158c882 100644
--- a/modules/watchdog/watchdog.module
+++ b/modules/watchdog/watchdog.module
@@ -71,7 +71,7 @@ function watchdog_overview() {
   $names['all'] = t('all messages');
   $queries['all'] = '';
   foreach (_watchdog_get_message_types() as $type) {
-    $names[$type] = t('%type messages', array('%type' => $type));
+    $names[$type] = t('%type messages', array('%type' => t($type)));
     $queries[$type] = "WHERE type = '". db_escape_string($type) ."'";
   }
 
@@ -103,7 +103,7 @@ function watchdog_overview() {
       array(
         // Cells
         $icons[$watchdog->severity],
-        $watchdog->type,
+        t($watchdog->type),
         format_date($watchdog->timestamp, 'small'),
         truncate_utf8($watchdog->message, 64),
         format_name($watchdog),
@@ -139,7 +139,7 @@ function watchdog_event($id) {
   $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d', $id);
   if ($watchdog = db_fetch_object($result)) {
     $output .= '<table border="1" cellpadding="2" cellspacing="2">';
-    $output .= ' <tr><th>'. t('Type') ."</th><td>$watchdog->type</td></tr>";
+    $output .= ' <tr><th>'. t('Type') .'</th><td>' . t($watchdog->type) . '</td></tr>';
     $output .= ' <tr><th>'. t('Date') .'</th><td>'. format_date($watchdog->timestamp, 'large') .'</td></tr>';
     $output .= ' <tr><th>'. t('User') .'</th><td>'. format_name($watchdog) .'</td></tr>';
     $output .= ' <tr><th>'. t('Location') ."</th><td>". l($watchdog->location, $watchdog->location) ."</td></tr>";
-- 
GitLab