On Fri, Feb 04, 2005 at 09:51:48PM +0100, Denis Barbier wrote:
On Fri, Feb 04, 2005 at 08:51:20PM +0100, Jordi Vilalta wrote:
[...]
> Now I have some questions about how you want to show the messages:
>
> Should we attach "po4a::module_name" in front of all the messages?
> And "po4a" for all that comes from the main program?
>
> If the message is more than one line long, how should the other lines
> begin? with the same stamp (1), spaces (2) or nothing (3)?
>
> (1)
> po4a::man: this is a test message, this is a test message, this is a
> po4a::man: test message.
IIRC this is the current implementation, but I for one do not like it.
> (2)
> po4a::man: this is a test message, this is a test message, this is a
> test message.
>
> (3)
> po4a::man: this is a test message, this is a test message, this is a
> test message.
If the madule name is short, I prefer 2 > 3 > 1.
When it is long, either 3 > 2 > 1 or 2 > 3 > 1.
If we manage to get 2, I like it the best. I dunno, it looks hard to do and
thus cool. ;) 3 is good, too, if we have to.
> For the errors, we should begin the messages with
"file:line: " (the
> gcc-like syntax). Should this appear just on the first line or in all the
> lines of the message?
>
> Should these error messages also contain the module stamp commented above,
> or we suppose that people already knows what module comes it from? If
> affirmative, it should appear just in the first line (1) or in all (2)?
>
> (1)
> file.doc:4: po4a::man: this is an example error, this is an example
> file.doc:4: error, this is an example error
>
> (2)
> file.doc:4: po4a::man: this is an example error, this is an example
> file.doc:4: po4a::man: error, this is an example error
As with module name, I believe that repeating filename and line numbers
is not necessary and make error messages less readable.
> You can also propose other styles. Thanks for your patience ;)
Maybe
file.doc:4: po4a::man
this is an example error, this is an example error, this is an
example error
file:line: (po4a::module)
toto tutu toto tutu toto tutu toto tutu toto tutu toto
toto tutu toto tutu toto tutu toto tutu toto tutu toto
?
It has the advantage of being easily readable. The best would be to use the
following value as indentation offset: >>max(length("$file:$line:
",10))<<
It would ensure that things keep readable when dealing with the file
../../../../../toto/tutu/tata/titotu/blabla/parts/sections/paragraphs/paragraph32.xml
But as usual. If you're the one coding, you're the one imposing your vision
of the world ;)
Thanks for your time, Mt.