Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
watchdog.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2005 at 10:57 UTC
Updated:
11 Apr 2007 at 13:57 UTC
Here's a problem: administrative log messages are displayed in the language of the user that generated them, rather than the language of the administrator viewing them.
Comments
Comment #1
Wesley Tanaka commentedComment #2
chx commentedFixing this would be almost impossible. t() is used to translate static or quasi static messages. While some of the messages we send into watchdog are of this kind, the error handler also dumps stuff into the table.
Comment #3
Wesley Tanaka commentedWouldn't it be as simple as storing the parameters for t() in the database, instead of the output?
Comment #4
Zen commentedThis is a (very valid) feature request. Not a bug.
Thanks
-K
Comment #5
Wesley Tanaka commentedWithout some kind of specification, the distinction between "bug" and "feature" is rather academic.
I think it would be reasonable to assume that, if Drupal had a specification, one of the things that might be specified was that drupal administration pages should not be producing content in (say) Swahili if the administrator cannot read that language.
Perhaps it would be worded something like this:
"Administration pages should be presented in a language comprehensible to the administrator."
...but more pleasant sounding.
As it is, it's possible for an administrator to not understand the errors in their log.
If your operating system started producing some of its system log messages in ancient greek, I'd consider that to be a "bug", and not "expected behavior."
Comment #6
chx commentedAgain. The PHP error handler also dumps stuff into this table. That knows nada about t. If your Apache / PHP emits English error messages then that's what you get. Also the watchdog overview would be a bit slow if we would need to unserialize every Drupal-made watchdog entry.
Finally. It's a bug if existing functionality is broken. It's a feature if it's non-existing functionality. THis is clearly the second.
Comment #7
Wesley Tanaka commentedKároly, that's a red herring. The messages that show up in other languages are the ones that explicitly translated by drupal. I'm not talking about PHP and Apache errors. Those "can't" be translated (and as you point out they aren't translated currently). I'm talking about the messages that *do* get translated -- translated into a language I as an admin of a Drupal site can't read.
But this does point out that the title isn't as specific as it could be, so I'm changing it.
Consider how many watchdog listings a drupal site will serve compared to any other page view. I bet you on most sites, there are an average of 0 (zero) views of that log page per day. Drupal (I believe) already does a lot of (de)serialization anyway. If I remember correctly, there's a serialized column in the user table that gets loaded on every logged in user page view.
Yes. I feel that it's a bug if I can't read my admin logs. If PHP produced errors once in a while in some language you didn't understand, wouldn't you consider that a bug?
Comment #8
mr700 commentedThe current behavior is inconsistent:
New user: root ..." and "Нов потребител: mr700 ..."I think this is a bug because if my linux box (syslogd) starts logging anything but English (in /var/log/messages) it would be a bug and all programs that parse them will break.
Shouldn't all watchdog messages be (at least stored) in English? If the user wants to see the logs in another language (his account's language) this can still be done easy just by excluding php error messages (by type). Benefits of this behavior:
t()sComment #9
magico commented1. Create a drupal site
2. Add another localization language (eg. portuguese)
3. Create an user (eg. OtherUser) , and change their language to portuguese
4. Navigate, modify, create content with that "OtherUser"
5. In the watchdog log your messages will be in english, "OtherUser" messages will be in portuguese
We can:
1. Maintain the watchdog showing messages as they are inserted
2. We can only insert messages in english
3. We can insert messages in the several languages provided by the locale module
4. We can create a system that allows dynamic translation of the messages whenever they will be show in the log
I think the option 2 is the most simple and obvious.
Comment #10
mr700 commentedIn the future someone might want to write watchdog parser/analyzer...
Comment #11
magico commentedDuplicate of #76588.