[MPlayer-DOCS] Levels of MSGTR messages in help_mp-*.h

Ivo ivop at euronet.nl
Tue Sep 7 03:38:57 CEST 2004


Hi all,

Recently I introduced a separate section of MSGTR_* defines for video output 
drivers. Currently, only vo_jpeg uses these. A lot of these messages could 
be re-used by other vo drivers. Now I was wondering about the following:

Currently it says (for example):

#define MSGTR_VO_JPEG_CantCreateFile "Unable to create output file."

Should we:

1.) Rename that define and change the vo_jpeg.c code, like:

#define MSGTR_VO_CantCreateFile "Unable to create output file."

and have all other vo's use that, if necessary. Might need another rename 
later on (see below).

2.) Create a meta-define and have other vo's use that for their sub-define, 
like:

#define MSGTR_VO_CantCreateFile "Unable to create output file."
...
#define MSGTR_VO_JPEG_CantCreateFile MSGTR_VO_CantCreateFile
...
#define MSGTR_VO_GIF89a_CantCreateFile MSGTR_VO_CantCreateFile

This would not need any code of vo_jpeg.c to be changed.

In both cases, the translators have to do some shuffling around, but that's 
also the reason I ask it now, because it are only a few messages yet.

It's also worth to mention that this example (and maybe some other messages) 
might be used at even a higher level, or in a completely different scope 
(like a muxer used by mencoder if it can't create its output file).

I think I prefer the second option, because it doesn't need any code 
changes. It allows for certain messages to "propagate up" and it is still 
clear which messages are used by, in this example, vo_jpeg. Also, other 
developers can find similar messages more easily. That was one of the 
reasons why I started the separate section in the first place. Other 
sections should be created too IMHO, like MSGTR_AO_*, MSGTR_VF_* et cetera. 
The only disadvantage I see is a little overhead, but I think that's 
acceptable. It does not bloat the final code.

What do you think? Diego? :-)

--Ivo




More information about the MPlayer-DOCS mailing list