mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 18:39:52 +02:00
LazUtils, Translations unit: when reading resource string files, do not escape TAB character with its code representation ('#9'), it is handled just fine both by our translation system and Poedit
git-svn-id: trunk@60411 -
This commit is contained in:
parent
cdbf14375f
commit
7e998b13d9
@ -1245,11 +1245,11 @@ var
|
|||||||
end;
|
end;
|
||||||
Value := AdjustLineBreaks(Value);
|
Value := AdjustLineBreaks(Value);
|
||||||
end;
|
end;
|
||||||
// po requires special characters as #number
|
// escape special characters as #number, do not confuse translators
|
||||||
p:=1;
|
p:=1;
|
||||||
while p<=length(Value) do begin
|
while p<=length(Value) do begin
|
||||||
j := UTF8CodepointSize(pchar(@Value[p]));
|
j := UTF8CodepointSize(pchar(@Value[p]));
|
||||||
if (j=1) and (Value[p] in [#0..#9,#11,#12,#14..#31,#127..#255]) then
|
if (j=1) and (Value[p] in [#0..#8,#11,#12,#14..#31,#127..#255]) then
|
||||||
Value := copy(Value,1,p-1)+'#'+IntToStr(ord(Value[p]))+copy(Value,p+1,length(Value))
|
Value := copy(Value,1,p-1)+'#'+IntToStr(ord(Value[p]))+copy(Value,p+1,length(Value))
|
||||||
else
|
else
|
||||||
inc(p,j);
|
inc(p,j);
|
||||||
|
Loading…
Reference in New Issue
Block a user