[MPlayer-dev-eng] route help/help_mp*.h commits to cvslog

Uoti Urpala uoti.urpala at pp1.inet.fi
Tue May 16 06:34:19 CEST 2006


On Tue, 2006-05-16 at 04:18 +0200, Sebastian Krämer wrote:
> So what about a format string checker? Any suggestion about how that 
> could be implemented?

Here's a simple checker written in Python. It takes a base helpfile name
(using help_mp-en.h probably makes most sense) and one or more other
files to compare against. It tries to detect conflicting formats, extra
strings that are not in the base file and missing strings (reporting is
optional as some files have a lot of those).

A sample run (the 'Missing:' line would not be there without -missing):

$ ~/misc/python/mphelp_formatcheck.py -missing help_mp-en.h help_mp-de.h
***** help_mp-de.h
Mismatch:  MSGTR_SKIN_WARNING2
[skin] warning: in config file line %d:\nwidget (%s) found but no \"subsection\" found before
[Skin] Warnung: in Skin-Konfigurationsdatei in Zeile %d:\nWidget (%s) gefunden, aber davor wurde \"subsection\" nicht gefunden (%s)
Extra:  MSGTR_OSDnone MSGTR_LIBVO_SVGA_IfItWorksForYouIWouldLineToKnow MSGTR_OSDDVDNAV MSGTR_OSDunknown
Missing:  MSGTR_MPDEMUX_AUDIO_UnknownFormat MSGTR_MPDEMUX_DEMUXERS_FillBufferError MSGTR_MPDEMUX_XMMS_FoundPlugin MSGTR_MPDEMUX_XMMS_ClosingPlugin MSGTR_MPDEMUX_NUV_NoVideoBlocksInFile MSGTR_LIBVO_SVGA_IfItWorksForYouIWouldLikeToKnow



BTW personally I'd prefer a translation system where the code would have
the English message and the translated messages would be looked up based
on that. The current system makes it less than obvious what the message
says or what the arguments should be when reading the code, and also has
the drawback of requiring an extra step when you want to find out where
in the code a particular message in output was printed from.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mphelp_formatcheck.py
Type: text/x-python
Size: 1572 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060516/18cf42ae/attachment.py>


More information about the MPlayer-dev-eng mailing list