On 18 August 2016, Luc Hermitte <hermi...@free.fr> wrote: > > On 18 August 2016, Luc Hermitte <hermi...@free.fr> wrote: > > > Another point on the qflist topic is bugging me. IIRC, when an > > > error is detected, the type flag is set to 'E'. But how is error > > > detection done? Is it when the message 'error:' is detected? What > > > about when the locale is in another language like 'fr_FR'? In > > > this case, the error messages start with "erreur: ", warnings with > > > "attention: ". I guess similar issues may happen in all other > > > languages. > > > > > > Has anybody an idea how to solve error/warning detection when the > > > system is not in English? (My ultimate objective is to fill the > > > error and message counters displayed by the airline plugin in the > > > qf window status line) > > > > Set LC_MESSAGES to C before running your program: > > > > https://goo.gl/tMPUdV > > > > Less than ideal, but it makes parsing possible. > > Of course, I'm aware of this solution -- which I use regularly as I > can't stand the translation of compilation errors. > > What I was hoping, is a end-user friendly solution: one that implies > as few tweaks as possible to fully take advantage of my plugin.
Well, let me put it like this: (1) To parse something you need to make assumptions about the syntax of the text you're trying to parse; (2) Translations break most (if not all) assumptions about the syntax of the translated text. You could, of course, try to "undo" the translation before parsing error messages, perhaps based on the .po files of the application producing the errors. This would stand some chances to work for applications that create error through a centralized set of functions, and would break horribly for applications that produce ad-hoc errors. And then there are exceptions, and stack traces from third-party libraries. But if you manage to do it, it would be user-friendly. :) /lcd -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.