Anyway. What i'd like to say is that current implementation is working
with both 2.2.4 and 2.4.0 (or later) versions of the compiler. And
supports translated messages correctly.

Yes, i think that this modification can be tagged to a new release of compiler and ide.

About translate messages working correctly on prior versions, i cannot confirm. If i change compiler messages by loading another errorxx.msg in IDE or use a different errorxx.msg to compile the compiler itself, the first thing i´ve noticed is that QuickFixItems stop working,
and message icons on message view form do not show correctly.

That´s because Quickfixitems and MessageView are comparing const strings in english only.

Excerpts:

 Result:=(Line.Parts<>nil)
         and (System.Pos(') Fatal: Can''t find unit ',Line.Msg)>0);

if REMatches(Msg.Msg,'Can''t find unit ([a-z_0-9]+) used by ([a-z_0-9]+)','I') then begin

------

const
 cHint         = 'Hint: User defined:';
 cNote         = 'Note: User defined:';
 cWarning      = 'Warning: User defined:';
 clMsgHint     = clBlue;
 clMsgNote     = clGreen;
 clMsgWarning  = clRed;
 cLeftSpacer   = 0;
...
 if not (cdsSelected in State)
 then begin
   TheText := Node.Text;
   if Pos(cNote, TheText) > 0 then
     ChangeFontColor(clMsgNote)
   else if Pos(cHint, TheText) > 0 then
     ChangeFontColor(clMsgHint)
   else if Pos(cWarning, TheText) > 0 then
     ChangeFontColor(clMsgWarning);
 end;

So, after changing TOutputFilter, there are much to do before using a custom language correctly.

Regards,
Marcelo


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to