epubcheck icon indicating copy to clipboard operation
epubcheck copied to clipboard

Decouple the MessageId enum from translation key

Open kalaspuffar opened this issue 8 years ago • 3 comments

During the implementation of pull request #806, I should show the same message for two different cases. In the case of a v2 epub the message should be a WARNING and in case of v3, it should be INFO.

When doing this I got to the conclusion that decoupling the translation keys from the MessageId enums could give us the opportunity to reuse messages with different error levels and we could also move messages around so they could be grouped into similar messages. In my case, I created a new message for PKG in the number 24. It's the same as 17 and maybe the number 18 would be more appropriate because they handle the same thing and could be grouped even if the message differs slightly.

As the implementation is today it would be large refactoring to insert a new message close to another older message.

kalaspuffar avatar Nov 16 '17 08:11 kalaspuffar

Hi Daniel,

thanks for your suggestion. I've never stumbled upon this requirement before, but I think Romain did. @rdeltour didn't you implement some kind of severity switch somewhere before? There's something in my head which tells me we spoke about it before, but I may be wrong.

tofi86 avatar Nov 21 '17 22:11 tofi86

While I think this is a good idea in general, I hestitate to shout "go on and implement it" as it would most likely super-break the (already little broken) PR #650 which I would have liked to merge in 4.1 but am missing time to review at the moment... :-/

tofi86 avatar Nov 21 '17 22:11 tofi86

I agree with Tobias. We should wait for #650 and then maybe think about a more ambitious and global messaging API overhaul, which this should be part of.

After 4.1 sounds safer.

rdeltour avatar Nov 28 '17 12:11 rdeltour