Changeset 46
- Timestamp:
- Dec 3, 2021, 11:47:11 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Languages/vCardStudio.cs.po
r45 r46 12 12 "X-Generator: Poedit 3.0\n" 13 13 14 #: tcore.aabout.caption 15 msgid "About..." 16 msgstr "O aplikaci..." 17 18 #: tcore.aexit.caption 19 msgid "Exit" 20 msgstr "Ukončit" 21 22 #: tcore.afileclose.caption 23 msgid "Close" 24 msgstr "Zavřít" 25 26 #: tcore.afilemerge.caption 27 msgid "Merge..." 28 msgstr "Sloučit..." 29 30 #: tcore.afilenew.caption 31 msgid "New" 32 msgstr "Nový" 33 34 #: tcore.afileopen.caption 35 msgid "Open..." 36 msgstr "Otevřít..." 37 38 #: tcore.afileopenrecent.caption 39 msgctxt "tcore.afileopenrecent.caption" 40 msgid "Open recent" 41 msgstr "Otevřít nedávné" 42 43 #: tcore.afilesave.caption 44 msgid "Save" 45 msgstr "Uložit" 46 47 #: tcore.afilesaveas.caption 48 msgid "Save as..." 49 msgstr "Uložit jako..." 50 51 #: tcore.afindduplicate.caption 52 msgctxt "tcore.afindduplicate.caption" 53 msgid "Find duplicities" 54 msgstr "Najít duplikáty" 55 56 #: tcore.agenerate.caption 57 msgctxt "tcore.agenerate.caption" 58 msgid "Generate contacts" 59 msgstr "Generovat kontakty" 60 61 #: tcore.ahomepage.caption 62 msgid "Home page" 63 msgstr "Domovská stránka" 64 65 #: tcore.applicationinfo1.description 66 msgid "vCard files management tool" 67 msgstr "Nástroj pro správu souborů vCard" 68 69 #: tcore.asettings.caption 70 msgctxt "tcore.asettings.caption" 71 msgid "Settings" 72 msgstr "Nastavení" 73 14 74 #: tformcontact.aphotoload.caption 15 75 msgid "Load from file" -
trunk/Languages/vCardStudio.po
r45 r46 1 1 msgid "" 2 2 msgstr "Content-Type: text/plain; charset=UTF-8" 3 4 #: tcore.aabout.caption 5 msgid "About..." 6 msgstr "" 7 8 #: tcore.aexit.caption 9 msgid "Exit" 10 msgstr "" 11 12 #: tcore.afileclose.caption 13 msgid "Close" 14 msgstr "" 15 16 #: tcore.afilemerge.caption 17 msgid "Merge..." 18 msgstr "" 19 20 #: tcore.afilenew.caption 21 msgid "New" 22 msgstr "" 23 24 #: tcore.afileopen.caption 25 msgid "Open..." 26 msgstr "" 27 28 #: tcore.afileopenrecent.caption 29 msgctxt "tcore.afileopenrecent.caption" 30 msgid "Open recent" 31 msgstr "" 32 33 #: tcore.afilesave.caption 34 msgid "Save" 35 msgstr "" 36 37 #: tcore.afilesaveas.caption 38 msgid "Save as..." 39 msgstr "" 40 41 #: tcore.afindduplicate.caption 42 msgctxt "tcore.afindduplicate.caption" 43 msgid "Find duplicities" 44 msgstr "" 45 46 #: tcore.agenerate.caption 47 msgctxt "tcore.agenerate.caption" 48 msgid "Generate contacts" 49 msgstr "" 50 51 #: tcore.ahomepage.caption 52 msgid "Home page" 53 msgstr "" 54 55 #: tcore.applicationinfo1.description 56 msgid "vCard files management tool" 57 msgstr "" 58 59 #: tcore.asettings.caption 60 msgctxt "tcore.asettings.caption" 61 msgid "Settings" 62 msgstr "" 3 63 4 64 #: tformcontact.aphotoload.caption -
trunk/UContact.pas
r45 r46 691 691 NameText: string; 692 692 Value2: string; 693 Text: string; 694 LineIndex: Integer; 695 OutText: string; 696 LinePrefix: string; 697 const 698 MaxLineLength = 73; 693 699 begin 694 700 inherited; … … 705 711 if Encoding <> '' then begin 706 712 Value2 := GetEncodedValue; 707 NameText := NameText + '; ' + Encoding;713 NameText := NameText + ';ENCODING=' + Encoding; 708 714 end else Value2 := Value; 709 715 if Pos(LineEnding, Value2) > 0 then begin … … 715 721 Add(''); 716 722 end else begin 717 Add(NameText + ':' + Value2); 723 OutText := NameText + ':' + Value2; 724 LineIndex := 0; 725 LinePrefix := ''; 726 while True do begin 727 if Length(OutText) > MaxLineLength then begin 728 if (LineIndex > 0) and (LinePrefix = '') then LinePrefix := ' '; 729 Add(LinePrefix + Copy(OutText, 1, MaxLineLength)); 730 System.Delete(OutText, 1, MaxLineLength); 731 Inc(LineIndex); 732 Continue; 733 end else begin 734 Add(LinePrefix + OutText); 735 Break; 736 end; 737 end; 738 if LinePrefix <> '' then Add(''); 718 739 end; 719 740 end; -
trunk/UQuotedPrintable.pas
r45 r46 29 29 Keeper: Boolean; 30 30 Abort: Boolean; 31 BufStream: TMemoryStream;31 InStream: TMemoryStream; 32 32 OutStream: TMemoryStream; 33 33 begin 34 34 Result := ''; 35 BufStream := TMemoryStream.Create;35 InStream := TMemoryStream.Create; 36 36 OutStream := TMemoryStream.Create; 37 37 try 38 38 if Text <> '' then begin 39 BufStream.Write(Text[1], Length(Text));40 BufStream.Position := 0;39 InStream.Write(Text[1], Length(Text)); 40 InStream.Position := 0; 41 41 end; 42 42 Abort := False; … … 48 48 { Skip any CR/LF's to get to the encoded stuff } 49 49 while True do begin 50 if BufStream.Read(Char(InBuf[0]), 1) = 0then50 if InStream.Read(Char(InBuf[0]), 1) = 0then 51 51 Exit; 52 52 if ((InBuf[0] <> $0D) and (InBuf[0] <> $0A)) then begin … … 70 70 if (I > High(InBuf)) then 71 71 raise Exception.Create(SLineLengthErr); 72 if BufStream.Read(Char(InBuf[I]), 1) = 0 then72 if InStream.Read(Char(InBuf[I]), 1) = 0 then 73 73 Break; 74 74 case InBuf[I] of … … 195 195 SetLength(Result, OutStream.Size); 196 196 OutStream.Position := 0; 197 OutStream.Read(Result[1], Length(Result)); 197 if OutStream.Size > 0 then 198 OutStream.Read(Result[1], Length(Result)); 198 199 finally 199 200 OutStream.Free; 200 BufStream.Free;201 InStream.Free; 201 202 end; 202 203 end; 203 204 204 205 function EncodeQuotedPrintable(Text: string): string; 206 var 207 O, W: Integer; 208 WordBuf, OutBuf: array[0..80] of AnsiChar; 209 CurChar: AnsiChar; 210 Abort: Boolean; 211 InStream: TStream; 212 OutStream: TMemoryStream; 213 214 procedure SendLine; 215 begin 216 if (OutBuf[O - 1] = #9) or (OutBuf[O - 1] = #32) then begin 217 OutBuf[O] := '='; 218 Inc(O); 219 end; 220 OutStream.Write(OutBuf, O); 221 FillChar(OutBuf, SizeOf(OutBuf), #0); 222 O := 0; 223 end; 224 225 procedure AddWordToOutBuf; 226 var 227 J : Integer; 228 begin 229 if (O + W) > 74 then SendLine; 230 for J := 0 to (W - 1) do begin 231 OutBuf[O] := WordBuf[J]; 232 Inc(O); 233 end; 234 W := 0; 235 end; 236 237 procedure AddHexToWord(B : Byte); 238 const 239 HexDigits : array[0..$F] of AnsiChar = '0123456789ABCDEF'; 240 begin 241 if W > 73 then AddWordToOutBuf; 242 WordBuf[W] := '='; 243 WordBuf[W + 1] := HexDigits[B shr 4]; 244 WordBuf[W + 2] := HexDigits[B and $F]; 245 Inc(W, 3) 246 end; 247 205 248 begin 206 Result := Text; 249 Result := ''; 250 InStream := TMemoryStream.Create; 251 OutStream := TMemoryStream.Create; 252 try 253 if Text <> '' then begin 254 InStream.Write(Text[1], Length(Text)); 255 InStream.Position := 0; 256 end; 257 258 Abort := False; 259 O := 0; 260 W := 0; 261 FillChar(OutBuf, SizeOf(OutBuf), #0); 262 while (InStream.Read(CurChar, 1) = 1) and not Abort do begin 263 if (Ord(CurChar) in [33..60, 62..126]) then begin 264 WordBuf[W] := CurChar; 265 Inc(W); 266 if W > 74 then AddWordToOutBuf; 267 end else if (CurChar = ' ') or (CurChar = #9) then begin 268 WordBuf[W] := CurChar; 269 Inc(W); 270 AddWordToOutBuf; 271 end else if (CurChar = #13) then begin 272 AddWordToOutBuf; 273 SendLine; 274 end else if (CurChar = #10) then begin 275 { Do nothing } 276 end else begin 277 AddHexToWord(Byte(CurChar)); 278 end; 279 end; 280 AddWordToOutBuf; 281 OutStream.Write(OutBuf, O); 282 SetLength(Result, OutStream.Size); 283 OutStream.Position := 0; 284 if OutStream.Size > 0 then 285 OutStream.Read(Result[1], Length(Result)); 286 finally 287 OutStream.Free; 288 InStream.Free; 289 end; 207 290 end; 208 291
Note:
See TracChangeset
for help on using the changeset viewer.