LazUtils, Translations unit: when reading PO file, '\t' sequences are converted to TABs (code #9). Now for symmetry TABs are converted back to '\t' when writing PO files.

git-svn-id: trunk@60369 -
This commit is contained in:
maxim 2019-02-08 23:45:45 +00:00
parent c91b1321e0
commit c1e3ea24a0

View File

@ -304,7 +304,7 @@ var
begin
NewLength:=length(s);
for SrcPos:=1 to length(s) do
if s[SrcPos] in ['"','\'] then inc(NewLength);
if s[SrcPos] in ['"','\',#9] then inc(NewLength);
if NewLength=length(s) then begin
Result:=s;
end else begin
@ -319,6 +319,13 @@ begin
Result[DestPos]:=s[SrcPos];
inc(DestPos);
end;
#9:
begin
Result[DestPos]:='\';
inc(DestPos);
Result[DestPos]:='t';
inc(DestPos);
end;
else
Result[DestPos]:=s[SrcPos];
inc(DestPos);