- Timestamp:
- May 8, 2016, 10:56:38 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AcronymDecoder.lpi
r22 r25 167 167 <IsPartOfProject Value="True"/> 168 168 <ComponentName Value="FormImportFormat"/> 169 <HasResources Value="True"/> 169 170 <ResourceBaseClass Value="Form"/> 170 171 </Unit12> -
trunk/Example acronyms.adp
r24 r25 839 839 </Acronym> 840 840 </Acronyms> 841 841 <ImportFormats> 842 842 <ImportFormat> 843 843 <Id>1</Id> 844 844 <Name>Mediawiki acronyms</Name> 845 <BlockStartString/> 846 <BlockEndString/> 845 847 <AcronymStartString><li><b></AcronymStartString> 846 848 <AcronymEndString></b></AcronymEndString> … … 853 855 <Id>2</Id> 854 856 <Name>MediaWiki Lingo</Name> 857 <BlockStartString/> 858 <BlockEndString/> 855 859 <AcronymStartString>mw-lingo-tooltip-abbr"></AcronymStartString> 856 860 <AcronymEndString></span></AcronymEndString> … … 863 867 <Id>3</Id> 864 868 <Name>MediaWiki 2</Name> 869 <BlockStartString></ul></BlockStartString> 870 <BlockEndString><table style</BlockEndString> 865 871 <AcronymStartString><li></AcronymStartString> 866 872 <AcronymEndString>—</AcronymEndString> -
trunk/Forms/UFormImportFormat.lfm
r22 r25 7 7 ClientHeight = 433 8 8 ClientWidth = 664 9 LCLVersion = '1. 6.0.4'9 LCLVersion = '1.7' 10 10 object ButtonOk: TButton 11 11 Left = 560 … … 28 28 object Label1: TLabel 29 29 Left = 20 30 Height = 2 430 Height = 22 31 31 Top = 16 32 Width = 5632 Width = 49 33 33 Caption = 'Name:' 34 34 ParentColor = False … … 36 36 object EditName: TEdit 37 37 Left = 179 38 Height = 3 438 Height = 32 39 39 Top = 11 40 40 Width = 461 … … 44 44 object Label2: TLabel 45 45 Left = 20 46 Height = 2 447 Top = 5348 Width = 1 2646 Height = 22 47 Top = 133 48 Width = 112 49 49 Caption = 'Acronym start:' 50 50 ParentColor = False … … 52 52 object EditAcronymStart: TEdit 53 53 Left = 179 54 Height = 3 455 Top = 4854 Height = 32 55 Top = 128 56 56 Width = 461 57 57 Anchors = [akTop, akLeft, akRight] … … 60 60 object Label3: TLabel 61 61 Left = 20 62 Height = 2 463 Top = 9364 Width = 1 1862 Height = 22 63 Top = 173 64 Width = 105 65 65 Caption = 'Acronym end:' 66 66 ParentColor = False … … 68 68 object EditAcronymEnd: TEdit 69 69 Left = 179 70 Height = 3 471 Top = 8870 Height = 32 71 Top = 168 72 72 Width = 461 73 73 Anchors = [akTop, akLeft, akRight] … … 76 76 object Label4: TLabel 77 77 Left = 20 78 Height = 2 479 Top = 13380 Width = 1 2478 Height = 22 79 Top = 213 80 Width = 111 81 81 Caption = 'Meaning start:' 82 82 ParentColor = False … … 84 84 object EditMeaningStart: TEdit 85 85 Left = 179 86 Height = 3 487 Top = 12886 Height = 32 87 Top = 208 88 88 Width = 461 89 89 Anchors = [akTop, akLeft, akRight] … … 92 92 object Label5: TLabel 93 93 Left = 20 94 Height = 2 495 Top = 17396 Width = 1 1694 Height = 22 95 Top = 253 96 Width = 104 97 97 Caption = 'Meaning end:' 98 98 ParentColor = False … … 100 100 object EditMeaningEnd: TEdit 101 101 Left = 179 102 Height = 3 4103 Top = 168102 Height = 32 103 Top = 248 104 104 Width = 461 105 105 Anchors = [akTop, akLeft, akRight] … … 108 108 object Label6: TLabel 109 109 Left = 20 110 Height = 2 4111 Top = 2 13112 Width = 1 48110 Height = 22 111 Top = 293 112 Width = 132 113 113 Caption = 'Description start:' 114 114 ParentColor = False … … 116 116 object EditDescriptionStart: TEdit 117 117 Left = 179 118 Height = 3 4119 Top = 2 08118 Height = 32 119 Top = 288 120 120 Width = 461 121 121 Anchors = [akTop, akLeft, akRight] … … 124 124 object Label7: TLabel 125 125 Left = 20 126 Height = 2 4127 Top = 253128 Width = 1 40126 Height = 22 127 Top = 333 128 Width = 125 129 129 Caption = 'Description end:' 130 130 ParentColor = False … … 132 132 object EditDescriptionEnd: TEdit 133 133 Left = 179 134 Height = 3 4135 Top = 248134 Height = 32 135 Top = 328 136 136 Width = 461 137 137 Anchors = [akTop, akLeft, akRight] 138 138 TabOrder = 8 139 139 end 140 object Label8: TLabel 141 Left = 24 142 Height = 22 143 Top = 53 144 Width = 85 145 Caption = 'Block start:' 146 ParentColor = False 147 end 148 object EditBlockStart: TEdit 149 Left = 179 150 Height = 32 151 Top = 48 152 Width = 461 153 Anchors = [akTop, akLeft, akRight] 154 TabOrder = 9 155 end 156 object Label9: TLabel 157 Left = 24 158 Height = 22 159 Top = 93 160 Width = 78 161 Caption = 'Block end:' 162 ParentColor = False 163 end 164 object EditBlockEnd: TEdit 165 Left = 179 166 Height = 32 167 Top = 88 168 Width = 461 169 Anchors = [akTop, akLeft, akRight] 170 TabOrder = 10 171 end 140 172 end -
trunk/Forms/UFormImportFormat.lrt
r22 r25 9 9 TFORMIMPORTFORMAT.LABEL6.CAPTION=Description start: 10 10 TFORMIMPORTFORMAT.LABEL7.CAPTION=Description end: 11 TFORMIMPORTFORMAT.LABEL8.CAPTION=Block start: 12 TFORMIMPORTFORMAT.LABEL9.CAPTION=Block end: -
trunk/Forms/UFormImportFormat.pas
r22 r25 16 16 ButtonOk: TButton; 17 17 ButtonCancel: TButton; 18 EditBlockEnd: TEdit; 19 EditBlockStart: TEdit; 18 20 EditName: TEdit; 19 21 EditAcronymStart: TEdit; … … 30 32 Label6: TLabel; 31 33 Label7: TLabel; 34 Label8: TLabel; 35 Label9: TLabel; 32 36 private 33 37 { private declarations } … … 49 53 begin 50 54 EditName.Text := ImportFormat.Name; 55 EditBlockStart.Text := ImportFormat.Block.StartString; 56 EditBlockEnd.Text := ImportFormat.Block.EndString; 51 57 EditAcronymStart.Text := ImportFormat.Acronym.StartString; 52 58 EditAcronymEnd.Text := ImportFormat.Acronym.EndString; … … 60 66 begin 61 67 ImportFormat.Name := EditName.Text; 68 ImportFormat.Block.StartString := EditBlockStart.Text; 69 ImportFormat.Block.EndString := EditBlockEnd.Text; 62 70 ImportFormat.Acronym.StartString := EditAcronymStart.Text; 63 71 ImportFormat.Acronym.EndString := EditAcronymEnd.Text; -
trunk/Languages/AcronymDecoder.cs.po
r23 r25 229 229 msgstr "Konec popisu:" 230 230 231 #: tformimportformat.label8.caption 232 msgid "Block start:" 233 msgstr "Začátek bloku:" 234 235 #: tformimportformat.label9.caption 236 msgid "Block end:" 237 msgstr "Konec bloku:" 238 231 239 #: tformimportformats.aadd.caption 232 240 msgctxt "tformimportformats.aadd.caption" … … 561 569 msgid "modified" 562 570 msgstr "upraveno" 563 -
trunk/Languages/AcronymDecoder.po
r23 r25 219 219 msgstr "" 220 220 221 #: tformimportformat.label8.caption 222 msgid "Block start:" 223 msgstr "" 224 225 #: tformimportformat.label9.caption 226 msgid "Block end:" 227 msgstr "" 228 221 229 #: tformimportformats.aadd.caption 222 230 msgctxt "TFORMIMPORTFORMATS.AADD.CAPTION" -
trunk/UAcronym.pas
r24 r25 120 120 Id: Integer; 121 121 Name: string; 122 Block: TImportPattern; 122 123 Acronym: TImportPattern; 123 124 Meaning: TImportPattern; … … 233 234 begin 234 235 Name := Source.Name; 236 Block.StartString := Source.Block.StartString; 237 Block.EndString := Source.Block.EndString; 235 238 Acronym.StartString := Source.Acronym.StartString; 236 239 Acronym.EndString := Source.Acronym.EndString; … … 245 248 WriteInteger(Node, 'Id', Id); 246 249 WriteString(Node, 'Name', Name); 250 WriteString(Node, 'BlockStartString', Block.StartString); 251 WriteString(Node, 'BlockEndString', Block.EndString); 247 252 WriteString(Node, 'AcronymStartString', Acronym.StartString); 248 253 WriteString(Node, 'AcronymEndString', Acronym.EndString); … … 257 262 Id := ReadInteger(Node, 'Id', 0); 258 263 Name := ReadString(Node, 'Name', ''); 264 Block.StartString := ReadString(Node, 'BlockStartString', ''); 265 Block.EndString := ReadString(Node, 'BlockEndString', ''); 259 266 Acronym.StartString := ReadString(Node, 'AcronymStartString', ''); 260 267 Acronym.EndString := ReadString(Node, 'AcronymEndString', ''); … … 385 392 NewAcronym: TAcronymEntry; 386 393 P: Integer; 394 NewName: string; 387 395 begin 388 396 Stream := TMemoryStream.Create; … … 393 401 SetLength(S, Stream.Size); 394 402 Stream.Read(S[1], Length(S)); 403 if Format.Block.StartString <> '' then begin 404 P := Pos(Format.Block.StartString, S); 405 if P > 0 then 406 Delete(S, 1, P + Length(Format.Block.StartString) - 1); 407 end; 408 if Format.Block.EndString <> '' then begin 409 P := Pos(Format.Block.EndString, S); 410 if P > 0 then 411 Delete(S, P, Length(S)); 412 end; 413 395 414 repeat 396 415 P := Pos(Format.Acronym.StartString, S); … … 399 418 Delete(S, 1, P + Length(Format.Acronym.StartString) - 1); 400 419 P := Pos(Format.Acronym.EndString, S); 401 NewAcronym.Name := Trim(StripHTML(Copy(S, 1, P - 1))); 420 NewName := Trim(StripHTML(Copy(S, 1, P - 1))); 421 if NewName <> '' then NewAcronym.Name := NewName; 402 422 Delete(S, 1, P + Length(Format.Acronym.EndString) - 1); 403 423
Note:
See TracChangeset
for help on using the changeset viewer.