[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: localisation in system wide daemons



Am 2006-12-22 09:37:35, schrieb Javier Fernández-Sanguino Peña:
> IMHO, either that software should be modified to support i18n text or the
> admin would have to choose wether he prefers to *understand* the logfile or
> to be able to parse it with automatic programs (I believe you are talking
> about tools such as logcheck or log-analysis [1][2]). 
> 
> In any case, it would not be too difficult to adjust programas that parse
> logs to be able to parse translated messages. Take in account that all
> translated text messages would be available in a message catalog (typically a
> PO file).

Sorry, but "gettext" does not support reverse lookups

> msgstr "media error (bad sector): status="
> msgstr "error en el medio (sector defectuoso): estado="

But you can look-up only for the englisch string and get the translated
back

Now imagine you have 100 *.mo files and each with 100 strings

The loganalyzer must read ALL 100 *.mo files and parse all 100 strings
in it and then compare it with the message in the logfile...

> a.- be able to use software that generates reports from logfiles with english
> messages, and not being able to understand the logfiles themselves and
> (probably) not the reports either (if the reporting software is not i18nised)

If a non-native english speaker want to analyze logfiles, the loganalyzer
should do the translation...

The log analyzer should be configurable if it get a string like

----8<--------------------------------------------------------------
Dec 27 12:25:01 michelle1 init: Re-reading inittab
Dec 27 12:25:01 michelle1 last message repeated 2 times
Dec 27 12:28:08 michelle1 uptimed: milestone: 9 days, 00:00:00 (Neun Tage)
Dec 27 12:28:08 michelle1 sSMTP[11044]: Unable to set AuthUser="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@tamay-dogan.net" 
Dec 27 12:28:08 michelle1 sSMTP[11044]: Unable to set AuthPass="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 
Dec 27 12:28:08 michelle1 sSMTP[11044]: Server didn't accept AUTH LOGIN (535 Authentication rejected)
Dec 27 12:30:01 michelle1 init: Re-reading inittab
Dec 27 12:30:01 michelle1 last message repeated 2 times
<snip>
Dec 27 21:20:01 michelle1 init: Re-reading inittab
Dec 27 21:20:01 michelle1 last message repeated 2 times
Dec 27 21:21:23 michelle1 rpc.statd[724]: Received erroneous SM_UNMON request from michelle1.private for 192.168.0.69
Dec 27 21:25:03 michelle1 init: Re-reading inittab
Dec 27 21:25:03 michelle1 last message repeated 2 times
<snip>
Dec 28 00:30:25 michelle1 /usr/sbin/gpm[664]: select(): Interrupted system call
----8<--------------------------------------------------------------

So if the loganalyzer read " sSMTP[" it should use the "ssmtp.mo"
file and if it read " rpc.statd" from "nfs-common.mo".

I have seenm there is apossibility to get all english strings from
an mo file so if you have a message like 

Dec 27 12:28:08 michelle1 sSMTP[11044]: Unable to set AuthUser="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@tamay-dogan.net" 

the loganalyzer can cut it to

sSMTP[11044]: Unable to set AuthUser="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@tamay-dogan.net" 

detect the "sSMTP" program and do a Fuzzy-Search in the ssmtp.mo for
"Unable to set " which will probably work since the original String
seems to be

msgid "Unable to set %s=\"%s\"\n"

if it would be localized.

> What would you chose?
> 
> Regards
> 
> Javier

Thanks, Greetings and nice Day
    Michelle Konzack
    Systemadministrator
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


Reply to: