I've had a problem with multi-line translations not working and realised
that an extra '\n' was appended to the last line of the msgid in the PO
file causing the translation lookup to fail.  I'm assuming that this is
a bug, but thought I'd ask here first.

I've attached a simple patch.

Henry
Index: components/lazutils/translations.pas
===================================================================
--- components/lazutils/translations.pas	(revision 60247)
+++ components/lazutils/translations.pas	(working copy)
@@ -1428,7 +1428,9 @@
       for i:=0 to FHelperList.Count-1 do begin
         s := FHelperList[i];
         if (AProp<>'') and (AProp<>'#') then begin
-          s := '"' + s + '\n"';
+          if i < FHelperList.Count - 1 then
+            s := s + '\n';
+          s := '"' + s + '"';
           if AProp='#| msgid' then
             s := '#| ' + s;
         end else
-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to