- Timestamp:
- May 4, 2016, 11:43:42 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AcronymDecoder.lpi
r21 r22 71 71 </local> 72 72 </RunParams> 73 <RequiredPackages Count=" 5">73 <RequiredPackages Count="4"> 74 74 <Item1> 75 75 <PackageName Value="CoolTranslator"/> … … 85 85 </Item3> 86 86 <Item4> 87 <PackageName Value="synapse"/> 88 <DefaultFilename Value="Packages\synapse\synapse.lpk" Prefer="True"/> 87 <PackageName Value="LCL"/> 89 88 </Item4> 90 <Item5>91 <PackageName Value="LCL"/>92 </Item5>93 89 </RequiredPackages> 94 <Units Count="1 2">90 <Units Count="14"> 95 91 <Unit0> 96 92 <Filename Value="AcronymDecoder.lpr"/> … … 150 146 <IsPartOfProject Value="True"/> 151 147 <ComponentName Value="FormImportSource"/> 148 <HasResources Value="True"/> 152 149 <ResourceBaseClass Value="Form"/> 153 150 </Unit9> … … 156 153 <IsPartOfProject Value="True"/> 157 154 <ComponentName Value="FormImportSources"/> 155 <HasResources Value="True"/> 158 156 <ResourceBaseClass Value="Form"/> 159 157 </Unit10> … … 165 163 <ResourceBaseClass Value="Form"/> 166 164 </Unit11> 165 <Unit12> 166 <Filename Value="Forms\UFormImportFormat.pas"/> 167 <IsPartOfProject Value="True"/> 168 <ComponentName Value="FormImportFormat"/> 169 <ResourceBaseClass Value="Form"/> 170 </Unit12> 171 <Unit13> 172 <Filename Value="Forms\UFormImportFormats.pas"/> 173 <IsPartOfProject Value="True"/> 174 <ComponentName Value="FormImportFormats"/> 175 <HasResources Value="True"/> 176 <ResourceBaseClass Value="Form"/> 177 </Unit13> 167 178 </Units> 168 179 </ProjectOptions> -
trunk/AcronymDecoder.lpr
r21 r22 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UAcronym, synapse,Common, SysUtils, TemplateGenerics, UFormImport,10 Forms, UAcronym, Common, SysUtils, TemplateGenerics, UFormImport, 11 11 CoolTranslator, UFormCategorySelect, UFormMain, UFormAcronym, UFormSettings, 12 12 UFormCategories, UFormAcronyms, UFormImportSource, UFormImportSources, 13 UFormAbout 13 UFormAbout, UFormImportFormat, UFormImportFormats 14 14 { you can add units after this }; 15 15 … … 42 42 Application.CreateForm(TFormImportSources, FormImportSources); 43 43 Application.CreateForm(TFormAbout, FormAbout); 44 Application.CreateForm(TFormImportFormat, FormImportFormat); 45 Application.CreateForm(TFormImportFormats, FormImportFormats); 44 46 Application.Run; 45 47 end. -
trunk/Example acronyms.adp
r15 r22 839 839 </Acronym> 840 840 </Acronyms> 841 <ImportFormats> 842 <ImportFormat> 843 <Id>1</Id> 844 <Name>Mediawiki acronyms</Name> 845 <AcronymStartString><li><b></AcronymStartString> 846 <AcronymEndString></b></AcronymEndString> 847 <MeaningStartString>–</MeaningStartString> 848 <MeaningEndString></li></MeaningEndString> 849 <DescriptionStartString/> 850 <DescriptionEndString/> 851 </ImportFormat> 852 <ImportFormat> 853 <Id>2</Id> 854 <Name>MediaWiki Lingo</Name> 855 <AcronymStartString>mw-lingo-tooltip-abbr"></AcronymStartString> 856 <AcronymEndString></span></AcronymEndString> 857 <MeaningStartString>mw-lingo-tooltip-definition "></MeaningStartString> 858 <MeaningEndString></span></MeaningEndString> 859 <DescriptionStartString/> 860 <DescriptionEndString/> 861 </ImportFormat> 862 </ImportFormats> 863 <ImportSources> 864 <ImportSource> 865 <Name>Wikipedia - List of business and finance abbreviations</Name> 866 <URL>https://en.wikipedia.org/wiki/List_of_business_and_finance_abbreviations</URL> 867 <ImportFormat>1</ImportFormat> 868 </ImportSource> 869 <ImportSource> 870 <Name>wiki.zdechov.net terminology</Name> 871 <URL>http://wiki.zdechov.net/wiki/Terminologie</URL> 872 <ImportFormat>2</ImportFormat> 873 </ImportSource> 874 </ImportSources> 841 875 </AcronymDecoderProject> -
trunk/Forms/UFormAbout.lfm
r21 r22 1 1 object FormAbout: TFormAbout 2 2 Left = 866 3 Height = 4884 Top = 5325 Width = 6163 Height = 397 4 Top = 623 5 Width = 473 6 6 Caption = 'About' 7 ClientHeight = 4888 ClientWidth = 6167 ClientHeight = 397 8 ClientWidth = 473 9 9 OnCreate = FormCreate 10 10 OnShow = FormShow … … 14 14 Height = 55 15 15 Top = 20 16 Width = 57616 Width = 433 17 17 Align = alTop 18 18 BorderSpacing.Around = 20 … … 26 26 Height = 48 27 27 Top = 95 28 Width = 57628 Width = 433 29 29 Align = alTop 30 30 BorderSpacing.Around = 20 … … 34 34 end 35 35 object ButtonClose: TButton 36 Left = 52136 Left = 378 37 37 Height = 25 38 Top = 44838 Top = 357 39 39 Width = 75 40 40 Anchors = [akRight, akBottom] … … 47 47 Height = 24 48 48 Top = 163 49 Width = 57649 Width = 433 50 50 Align = alTop 51 51 BorderSpacing.Around = 20 … … 56 56 Left = 16 57 57 Height = 25 58 Top = 44858 Top = 357 59 59 Width = 139 60 60 Anchors = [akLeft, akBottom] -
trunk/Forms/UFormAbout.pas
r21 r22 38 38 resourcestring 39 39 SVersion = 'Version'; 40 SReleaseDate = 'Release date :';40 SReleaseDate = 'Release date'; 41 41 SLicense = 'License'; 42 42 -
trunk/Forms/UFormAcronyms.lfm
r19 r22 26 26 item 27 27 Caption = 'Categories' 28 Width = 30 028 Width = 305 29 29 end> 30 30 MultiSelect = True … … 53 53 OnFilter = ListViewSort1Filter 54 54 Column = 0 55 Order = so Down55 Order = soUp 56 56 left = 248 57 57 top = 168 … … 78 78 object ASelectAll: TAction 79 79 Caption = 'Select all' 80 OnExecute = ASelectAllExecute 80 81 ShortCut = 16449 81 82 end -
trunk/Forms/UFormAcronyms.pas
r19 r22 58 58 59 59 resourcestring 60 SRemoveAllAcronyms = 'Remove all acronyms';61 SRemoveAllAcronymsQuery = 'Do you want to remove all acronyms?';62 60 SRemoveAcronym = 'Remove acronym'; 63 61 SRemoveAcronymQuery = 'Do you want to remove selected acronym?'; … … 256 254 AModify.Enabled := Assigned(FormMain.AcronymDb) and Assigned(ListViewAcronyms.Selected); 257 255 AAdd.Enabled := Assigned(FormMain.AcronymDb); 256 ASelectAll.Enabled := True; 258 257 end; 259 258 -
trunk/Forms/UFormImport.pas
r16 r22 42 42 SImportedNewAcronyms = 'Imported %d new acronyms.'; 43 43 44 45 function DownloadHTTP(URL: string; Stream: TStream): Boolean;46 var47 HTTPGetResult: Boolean;48 HTTPSender: THTTPSend;49 begin50 Result := False;51 HTTPSender := THTTPSend.Create;52 try53 HTTPGetResult := HTTPSender.HTTPMethod('GET', URL);54 if (HTTPSender.ResultCode >= 100) and (HTTPSender.ResultCode <= 299) then begin55 HTTPSender.Document.SaveToStream(Stream);56 Result := True;57 end;58 finally59 HTTPSender.Free;60 end;61 end;62 44 63 45 { TFormImport } -
trunk/Forms/UFormImportSource.lfm
r20 r22 10 10 object EditName: TEdit 11 11 Left = 160 12 Height = 2812 Height = 34 13 13 Top = 10 14 14 Width = 432 … … 18 18 object Label1: TLabel 19 19 Left = 10 20 Height = 2 020 Height = 24 21 21 Top = 9 22 Width = 4322 Width = 56 23 23 Caption = 'Name:' 24 24 ParentColor = False … … 26 26 object Label2: TLabel 27 27 Left = 8 28 Height = 2 028 Height = 24 29 29 Top = 48 30 Width = 7830 Width = 101 31 31 Caption = 'Source URL:' 32 32 ParentColor = False … … 34 34 object EditURL: TEdit 35 35 Left = 160 36 Height = 2836 Height = 34 37 37 Top = 49 38 38 Width = 432 … … 60 60 TabOrder = 3 61 61 end 62 object Label3: TLabel 63 Left = 11 64 Height = 24 65 Top = 96 66 Width = 108 67 Caption = 'Data format:' 68 ParentColor = False 69 end 70 object ComboBox1: TComboBox 71 Left = 160 72 Height = 36 73 Top = 91 74 Width = 432 75 Anchors = [akTop, akLeft, akRight] 76 ItemHeight = 0 77 Style = csDropDownList 78 TabOrder = 4 79 end 62 80 end -
trunk/Forms/UFormImportSource.lrt
r20 r22 4 4 TFORMIMPORTSOURCE.BUTTONOK.CAPTION=Ok 5 5 TFORMIMPORTSOURCE.BUTTONCANCEL.CAPTION=Cancel 6 TFORMIMPORTSOURCE.LABEL3.CAPTION=Data format: -
trunk/Forms/UFormImportSource.pas
r20 r22 16 16 ButtonOk: TButton; 17 17 ButtonCancel: TButton; 18 ComboBox1: TComboBox; 18 19 EditName: TEdit; 19 20 EditURL: TEdit; 20 21 Label1: TLabel; 21 22 Label2: TLabel; 23 Label3: TLabel; 22 24 private 23 25 { private declarations } … … 34 36 {$R *.lfm} 35 37 38 uses 39 UFormMain; 40 36 41 { TFormImportSource } 37 42 38 43 procedure TFormImportSource.Load(ImportSource: TImportSource); 44 var 45 I: Integer; 39 46 begin 40 47 EditName.Text := ImportSource.Name; 41 48 EditURL.Text := ImportSource.URL; 49 while ComboBox1.Items.Count > FormMain.AcronymDb.ImportFormats.Count do 50 ComboBox1.Items.Delete(ComboBox1.Items.Count - 1); 51 while ComboBox1.Items.Count < FormMain.AcronymDb.ImportFormats.Count do 52 ComboBox1.Items.Add(''); 53 for I := 0 to FormMain.AcronymDb.ImportFormats.Count - 1 do begin 54 ComboBox1.Items[I] := TImportFormat(FormMain.AcronymDb.ImportFormats[I]).Name; 55 ComboBox1.Items.Objects[I] := FormMain.AcronymDb.ImportFormats[I]; 56 end; 57 ComboBox1.ItemIndex := ComboBox1.Items.IndexOfObject(ImportSource.Format); 58 if (ComboBox1.ItemIndex = -1) and (ComboBox1.Items.Count > 0) then 59 ComboBox1.ItemIndex := 0; 42 60 end; 43 61 … … 46 64 ImportSource.Name := EditName.Text; 47 65 ImportSource.URL := EditURL.Text; 66 ImportSource.Format := TImportFormat(ComboBox1.Items.Objects[ComboBox1.ItemIndex]); 48 67 end; 49 68 -
trunk/Forms/UFormImportSources.lfm
r20 r22 22 22 item 23 23 Caption = 'URL' 24 Width = 30024 Width = 407 25 25 end> 26 26 MultiSelect = True … … 54 54 ShortCut = 13 55 55 end 56 object AProcess: TAction 57 Caption = 'Process' 58 OnExecute = AProcessExecute 59 end 56 60 end 57 61 object PopupMenuImportSource: TPopupMenu … … 68 72 Action = ARemove 69 73 end 74 object MenuItem4: TMenuItem 75 Action = AProcess 76 end 70 77 end 71 78 end -
trunk/Forms/UFormImportSources.lrt
r20 r22 5 5 TFORMIMPORTSOURCES.AREMOVE.CAPTION=Remove 6 6 TFORMIMPORTSOURCES.AMODIFY.CAPTION=Modify 7 TFORMIMPORTSOURCES.APROCESS.CAPTION=Process -
trunk/Forms/UFormImportSources.pas
r20 r22 15 15 TFormImportSources = class(TForm) 16 16 AAdd: TAction; 17 AProcess: TAction; 17 18 ActionList1: TActionList; 18 19 AModify: TAction; … … 22 23 MenuItem2: TMenuItem; 23 24 MenuItem3: TMenuItem; 25 MenuItem4: TMenuItem; 24 26 PopupMenuImportSource: TPopupMenu; 25 27 procedure AAddExecute(Sender: TObject); 26 28 procedure AModifyExecute(Sender: TObject); 29 procedure AProcessExecute(Sender: TObject); 27 30 procedure ARemoveExecute(Sender: TObject); 28 31 procedure FormShow(Sender: TObject); … … 50 53 51 54 resourcestring 52 SImportSource = 'Import source';53 SImportSourceQuery = 'Enter name of import source';54 55 SRemoveImportSource = 'Remove import sources'; 55 56 SRemoveImportSourceQuery = 'Do you really want to remove selected import sources?'; … … 143 144 end; 144 145 146 procedure TFormImportSources.AProcessExecute(Sender: TObject); 147 begin 148 if Assigned(ListView1.Selected) then 149 TImportSource(ListView1.Selected.Data).Process; 150 end; 151 145 152 procedure TFormImportSources.ARemoveExecute(Sender: TObject); 146 153 var -
trunk/Forms/UFormMain.lfm
r21 r22 13 13 OnDestroy = FormDestroy 14 14 OnShow = FormShow 15 LCLVersion = '1. 7'15 LCLVersion = '1.6.0.4' 16 16 object ListViewAcronyms: TListView 17 17 Left = 8 … … 4371 4371 Images = ImageList1 4372 4372 left = 464 4373 top = 1 444373 top = 160 4374 4374 object AExit: TAction 4375 4375 Caption = 'Exit' … … 4424 4424 OnExecute = AShowAboutExecute 4425 4425 end 4426 object AShowImportFormats: TAction 4427 Caption = 'Import formats' 4428 OnExecute = AShowImportFormatsExecute 4429 end 4430 object AProcessImports: TAction 4431 Caption = 'Process imports' 4432 OnExecute = AProcessImportsExecute 4433 end 4426 4434 end 4427 4435 object PersistentForm1: TPersistentForm … … 4473 4481 Action = AShowImportSources 4474 4482 end 4483 object MenuItem7: TMenuItem 4484 Action = AShowImportFormats 4485 end 4475 4486 end 4476 4487 object MenuItem16: TMenuItem … … 4478 4489 object MenuItem17: TMenuItem 4479 4490 Action = AImport 4491 end 4492 object MenuItem23: TMenuItem 4493 Action = AProcessImports 4480 4494 end 4481 4495 object MenuItem18: TMenuItem … … 4516 4530 Order = soUp 4517 4531 left = 464 4518 top = 2 084532 top = 224 4519 4533 end 4520 4534 object ImageList1: TImageList -
trunk/Forms/UFormMain.lrt
r21 r22 17 17 TFORMMAIN.ASHOWIMPORTSOURCES.CAPTION=Import sources 18 18 TFORMMAIN.ASHOWABOUT.CAPTION=About 19 TFORMMAIN.ASHOWIMPORTFORMATS.CAPTION=Import formats 20 TFORMMAIN.APROCESSIMPORTS.CAPTION=Process imports 19 21 TFORMMAIN.MENUITEM8.CAPTION=File 20 22 TFORMMAIN.MENUITEMOPENRECENT.CAPTION=Open recent -
trunk/Forms/UFormMain.pas
r21 r22 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus, 9 ComCtrls, StdCtrls, ExtCtrls, ActnList, UAcronym, UPersistentForm, Contnrs,9 ComCtrls, StdCtrls, ExtCtrls, ActnList, UAcronym, UPersistentForm, 10 10 URegistry, ULastOpenedList, UListViewSort, UCoolTranslator, Registry, 11 11 SpecializedList, LazUTF8; … … 16 16 17 17 TFormMain = class(TForm) 18 AProcessImports: TAction; 19 AShowImportFormats: TAction; 18 20 AShowAbout: TAction; 19 21 AShowImportSources: TAction; … … 52 54 MenuItem21: TMenuItem; 53 55 MenuItem22: TMenuItem; 56 MenuItem23: TMenuItem; 54 57 MenuItem4: TMenuItem; 55 58 MenuItem5: TMenuItem; 56 59 MenuItem6: TMenuItem; 60 MenuItem7: TMenuItem; 57 61 MenuItemOpenRecent: TMenuItem; 58 62 MenuItem2: TMenuItem; … … 72 76 procedure AFileSaveExecute(Sender: TObject); 73 77 procedure AImportExecute(Sender: TObject); 78 procedure AProcessImportsExecute(Sender: TObject); 74 79 procedure ASettingsExecute(Sender: TObject); 75 80 procedure AShowAboutExecute(Sender: TObject); … … 77 82 procedure AShowCategoriesExecute(Sender: TObject); 78 83 procedure AShowExecute(Sender: TObject); 84 procedure AShowImportFormatsExecute(Sender: TObject); 79 85 procedure AShowImportSourcesExecute(Sender: TObject); 80 86 procedure CheckBoxExactMathChange(Sender: TObject); … … 118 124 119 125 uses 120 UFormImport, UForm Acronym, UFormSettings, UFormCategories, UFormAcronyms,121 UFormImportSource , UFormImportSources, UFormAbout;126 UFormImport, UFormSettings, UFormCategories, UFormAcronyms, 127 UFormImportSources, UFormAbout, UFormImportFormats; 122 128 123 129 resourcestring … … 243 249 end; 244 250 251 procedure TFormMain.AProcessImportsExecute(Sender: TObject); 252 var 253 I: Integer; 254 begin 255 for I := 0 to AcronymDb.ImportSources.Count - 1 do 256 TImportSource(AcronymDb.ImportSources[I]).Process; 257 UpdateAcronymsList; 258 UpdateInterface; 259 end; 260 245 261 procedure TFormMain.ASettingsExecute(Sender: TObject); 246 262 begin … … 271 287 begin 272 288 Show; 289 end; 290 291 procedure TFormMain.AShowImportFormatsExecute(Sender: TObject); 292 begin 293 FormImportFormats.ImportFormats := AcronymDb.ImportFormats; 294 FormImportFormats.ShowModal; 295 UpdateInterface; 273 296 end; 274 297 -
trunk/Languages/AcronymDecoder.cs.po
r21 r22 12 12 "X-Generator: Poedit 1.8.7.1\n" 13 13 14 #: tform1.buttonclose.caption 15 #, fuzzy 16 msgctxt "tform1.buttonclose.caption" 17 msgid "Close" 18 msgstr "Zavřít" 19 20 #: tform1.caption 21 msgid "Form1" 22 msgstr "" 23 24 #: tform1.label1.caption 25 #, fuzzy 26 msgctxt "tform1.label1.caption" 27 msgid "Acronym Decoder" 28 msgstr "Acronym Decoder" 29 30 #: tform1.label2.caption 31 msgid "Tool for quick search and find meaning for various acronyms and abbreviations" 32 msgstr "" 33 34 #: tform1.labelcontent.caption 35 #, fuzzy 36 msgctxt "tform1.labelcontent.caption" 37 msgid " " 38 msgstr " " 39 14 40 #: tformabout.buttonclose.caption 15 41 msgctxt "tformabout.buttonclose.caption" … … 21 47 msgstr "Domovská stránka" 22 48 49 #: tformabout.caption 50 msgctxt "tformabout.caption" 51 msgid "About" 52 msgstr "" 53 23 54 #: tformabout.labelappname.caption 24 55 msgctxt "tformabout.labelappname.caption" … … 32 63 33 64 #: tformabout.labeldescription.caption 65 #, fuzzy 66 #| msgid "Simple tool for quick search and find meaning for various acronyms and abbreviations." 34 67 msgctxt "tformabout.labeldescription.caption" 35 msgid "Simple tool for quick search and findmeaning for various acronyms and abbreviations."68 msgid "Simple tool for quick search of meaning for various acronyms and abbreviations." 36 69 msgstr "Jednoduchý nástroj pro hledání významu různých zkratek a zkrácení." 37 70 … … 159 192 160 193 #: tformimport.buttonimport.caption 194 msgctxt "tformimport.buttonimport.caption" 161 195 msgid "Process" 162 196 msgstr "Zpracovat" … … 176 210 177 211 #: tformimport.label1.caption 212 msgctxt "tformimport.label1.caption" 178 213 msgid "Data format:" 179 214 msgstr "Formát dat:" 215 216 #: tformimportformat.buttoncancel.caption 217 #, fuzzy 218 msgctxt "tformimportformat.buttoncancel.caption" 219 msgid "Cancel" 220 msgstr "Zrušit" 221 222 #: tformimportformat.buttonok.caption 223 #, fuzzy 224 msgctxt "tformimportformat.buttonok.caption" 225 msgid "Ok" 226 msgstr "Ok" 227 228 #: tformimportformat.caption 229 msgid "Import format" 230 msgstr "" 231 232 #: tformimportformat.label1.caption 233 #, fuzzy 234 msgctxt "tformimportformat.label1.caption" 235 msgid "Name:" 236 msgstr "Název:" 237 238 #: tformimportformat.label2.caption 239 msgid "Acronym start:" 240 msgstr "" 241 242 #: tformimportformat.label3.caption 243 msgid "Acronym end:" 244 msgstr "" 245 246 #: tformimportformat.label4.caption 247 msgid "Meaning start:" 248 msgstr "" 249 250 #: tformimportformat.label5.caption 251 msgid "Meaning end:" 252 msgstr "" 253 254 #: tformimportformat.label6.caption 255 msgid "Description start:" 256 msgstr "" 257 258 #: tformimportformat.label7.caption 259 msgid "Description end:" 260 msgstr "" 261 262 #: tformimportformats.aadd.caption 263 #, fuzzy 264 msgctxt "tformimportformats.aadd.caption" 265 msgid "Add" 266 msgstr "Přidat" 267 268 #: tformimportformats.amodify.caption 269 #, fuzzy 270 msgctxt "tformimportformats.amodify.caption" 271 msgid "Modify" 272 msgstr "Upravit" 273 274 #: tformimportformats.aremove.caption 275 #, fuzzy 276 msgctxt "tformimportformats.aremove.caption" 277 msgid "Remove" 278 msgstr "Odebrat" 279 280 #: tformimportformats.caption 281 #, fuzzy 282 msgctxt "tformimportformats.caption" 283 msgid "Import sources" 284 msgstr "Zdroje importu" 285 286 #: tformimportformats.listview1.columns[0].caption 287 #, fuzzy 288 msgctxt "tformimportformats.listview1.columns[0].caption" 289 msgid "Name" 290 msgstr "Název" 180 291 181 292 #: tformimportsource.buttoncancel.caption … … 203 314 msgstr "Zdrojové URL:" 204 315 316 #: tformimportsource.label3.caption 317 #, fuzzy 318 msgctxt "tformimportsource.label3.caption" 319 msgid "Data format:" 320 msgstr "Formát dat:" 321 205 322 #: tformimportsources.aadd.caption 206 323 msgctxt "tformimportsources.aadd.caption" … … 213 330 msgstr "Upravit" 214 331 332 #: tformimportsources.aprocess.caption 333 #, fuzzy 334 msgctxt "tformimportsources.aprocess.caption" 335 msgid "Process" 336 msgstr "Zpracovat" 337 215 338 #: tformimportsources.aremove.caption 216 339 msgctxt "tformimportsources.aremove.caption" … … 262 385 msgstr "Importovat" 263 386 387 #: tformmain.aprocessimports.caption 388 msgid "Process imports" 389 msgstr "" 390 264 391 #: tformmain.asettings.caption 265 392 msgctxt "tformmain.asettings.caption" … … 271 398 msgstr "Ukázat" 272 399 400 #: tformmain.ashowabout.caption 401 msgctxt "tformmain.ashowabout.caption" 402 msgid "About" 403 msgstr "" 404 273 405 #: tformmain.ashowacronyms.caption 274 406 msgctxt "tformmain.ashowacronyms.caption" … … 281 413 msgstr "Kategorie" 282 414 415 #: tformmain.ashowimportformats.caption 416 msgid "Import formats" 417 msgstr "" 418 283 419 #: tformmain.ashowimportsources.caption 284 420 msgctxt "tformmain.ashowimportsources.caption" … … 366 502 367 503 #: uformabout.sreleasedate 368 msgid "Release date:" 504 #, fuzzy 505 #| msgid "Release date:" 506 msgid "Release date" 369 507 msgstr "Datum uvolnění:" 370 508 … … 398 536 msgstr "Chcete odebrat vybranou zkratku?" 399 537 400 #: uformacronyms.sremoveallacronyms401 msgctxt "uformacronyms.sremoveallacronyms"402 msgid "Remove all acronyms"403 msgstr "Odebrat všechny zkratky"404 405 #: uformacronyms.sremoveallacronymsquery406 msgctxt "uformacronyms.sremoveallacronymsquery"407 msgid "Do you want to remove all acronyms?"408 msgstr "Chcete odebrat všechny zkratky?"409 410 538 #: uformcategories.scategory 411 539 msgctxt "uformcategories.scategory" … … 435 563 msgstr "Importováno %d nových zkratek." 436 564 437 #: uformimportsources.simportsource 438 msgctxt "uformimportsources.simportsource" 439 msgid "Import source" 440 msgstr "Zdroje importu" 565 #: uformimportformats.simportformatalreadyexists 566 msgid "Import format %s already exists!" 567 msgstr "" 568 569 #: uformimportformats.sremoveimportformat 570 msgid "Remove import formats" 571 msgstr "" 572 573 #: uformimportformats.sremoveimportformatquery 574 msgid "Do you really want to remove selected import formats?" 575 msgstr "" 441 576 442 577 #: uformimportsources.simportsourcealreadyexists 578 msgctxt "uformimportsources.simportsourcealreadyexists" 443 579 msgid "Import source %s already exists!" 444 580 msgstr "Zdroj importu %s již existuje!" 445 581 446 #: uformimportsources.simportsourcequery447 msgid "Enter name of import source"448 msgstr "Zadejte jméno zdroje importu"449 450 582 #: uformimportsources.sremoveimportsource 583 msgctxt "uformimportsources.sremoveimportsource" 451 584 msgid "Remove import sources" 452 585 msgstr "Odstranit zdroje importu" 453 586 454 587 #: uformimportsources.sremoveimportsourcequery 588 msgctxt "uformimportsources.sremoveimportsourcequery" 455 589 msgid "Do you really want to remove selected import sources?" 456 590 msgstr "Opravdu chcete odebrat vybrané zdroje importu?" … … 467 601 msgid "modified" 468 602 msgstr "upraveno" 603 -
trunk/Languages/AcronymDecoder.po
r21 r22 36 36 37 37 #: tformabout.caption 38 msgctxt "tformabout.caption" 38 39 msgid "About" 39 40 msgstr "" … … 51 52 #: tformabout.labeldescription.caption 52 53 msgctxt "TFORMABOUT.LABELDESCRIPTION.CAPTION" 53 msgid "Simple tool for quick search and findmeaning for various acronyms and abbreviations."54 msgid "Simple tool for quick search of meaning for various acronyms and abbreviations." 54 55 msgstr "" 55 56 … … 177 178 178 179 #: tformimport.buttonimport.caption 180 msgctxt "tformimport.buttonimport.caption" 179 181 msgid "Process" 180 182 msgstr "" … … 194 196 195 197 #: tformimport.label1.caption 198 msgctxt "tformimport.label1.caption" 196 199 msgid "Data format:" 200 msgstr "" 201 202 #: tformimportformat.buttoncancel.caption 203 msgctxt "TFORMIMPORTFORMAT.BUTTONCANCEL.CAPTION" 204 msgid "Cancel" 205 msgstr "" 206 207 #: tformimportformat.buttonok.caption 208 msgctxt "TFORMIMPORTFORMAT.BUTTONOK.CAPTION" 209 msgid "Ok" 210 msgstr "" 211 212 #: tformimportformat.caption 213 msgid "Import format" 214 msgstr "" 215 216 #: tformimportformat.label1.caption 217 msgctxt "TFORMIMPORTFORMAT.LABEL1.CAPTION" 218 msgid "Name:" 219 msgstr "" 220 221 #: tformimportformat.label2.caption 222 msgid "Acronym start:" 223 msgstr "" 224 225 #: tformimportformat.label3.caption 226 msgid "Acronym end:" 227 msgstr "" 228 229 #: tformimportformat.label4.caption 230 msgid "Meaning start:" 231 msgstr "" 232 233 #: tformimportformat.label5.caption 234 msgid "Meaning end:" 235 msgstr "" 236 237 #: tformimportformat.label6.caption 238 msgid "Description start:" 239 msgstr "" 240 241 #: tformimportformat.label7.caption 242 msgid "Description end:" 243 msgstr "" 244 245 #: tformimportformats.aadd.caption 246 msgctxt "TFORMIMPORTFORMATS.AADD.CAPTION" 247 msgid "Add" 248 msgstr "" 249 250 #: tformimportformats.amodify.caption 251 msgctxt "TFORMIMPORTFORMATS.AMODIFY.CAPTION" 252 msgid "Modify" 253 msgstr "" 254 255 #: tformimportformats.aremove.caption 256 msgctxt "TFORMIMPORTFORMATS.AREMOVE.CAPTION" 257 msgid "Remove" 258 msgstr "" 259 260 #: tformimportformats.caption 261 msgctxt "TFORMIMPORTFORMATS.CAPTION" 262 msgid "Import sources" 263 msgstr "" 264 265 #: tformimportformats.listview1.columns[0].caption 266 msgctxt "TFORMIMPORTFORMATS.LISTVIEW1.COLUMNS[0].CAPTION" 267 msgid "Name" 197 268 msgstr "" 198 269 … … 221 292 msgstr "" 222 293 294 #: tformimportsource.label3.caption 295 msgctxt "TFORMIMPORTSOURCE.LABEL3.CAPTION" 296 msgid "Data format:" 297 msgstr "" 298 223 299 #: tformimportsources.aadd.caption 224 300 msgctxt "TFORMIMPORTSOURCES.AADD.CAPTION" … … 231 307 msgstr "" 232 308 309 #: tformimportsources.aprocess.caption 310 msgctxt "TFORMIMPORTSOURCES.APROCESS.CAPTION" 311 msgid "Process" 312 msgstr "" 313 233 314 #: tformimportsources.aremove.caption 234 315 msgctxt "TFORMIMPORTSOURCES.AREMOVE.CAPTION" … … 280 361 msgstr "" 281 362 363 #: tformmain.aprocessimports.caption 364 msgid "Process imports" 365 msgstr "" 366 282 367 #: tformmain.asettings.caption 283 368 msgctxt "tformmain.asettings.caption" … … 290 375 291 376 #: tformmain.ashowabout.caption 377 msgctxt "tformmain.ashowabout.caption" 292 378 msgid "About" 293 379 msgstr "" … … 303 389 msgstr "" 304 390 391 #: tformmain.ashowimportformats.caption 392 msgid "Import formats" 393 msgstr "" 394 305 395 #: tformmain.ashowimportsources.caption 306 396 msgctxt "TFORMMAIN.ASHOWIMPORTSOURCES.CAPTION" … … 388 478 389 479 #: uformabout.sreleasedate 390 msgid "Release date :"480 msgid "Release date" 391 481 msgstr "" 392 482 … … 420 510 msgstr "" 421 511 422 #: uformacronyms.sremoveallacronyms423 msgctxt "uformacronyms.sremoveallacronyms"424 msgid "Remove all acronyms"425 msgstr ""426 427 #: uformacronyms.sremoveallacronymsquery428 msgctxt "uformacronyms.sremoveallacronymsquery"429 msgid "Do you want to remove all acronyms?"430 msgstr ""431 432 512 #: uformcategories.scategory 433 513 msgctxt "uformcategories.scategory" … … 457 537 msgstr "" 458 538 459 #: uformimportsources.simportsource 460 msgctxt "uformimportsources.simportsource" 461 msgid "Import source" 539 #: uformimportformats.simportformatalreadyexists 540 msgid "Import format %s already exists!" 541 msgstr "" 542 543 #: uformimportformats.sremoveimportformat 544 msgid "Remove import formats" 545 msgstr "" 546 547 #: uformimportformats.sremoveimportformatquery 548 msgid "Do you really want to remove selected import formats?" 462 549 msgstr "" 463 550 464 551 #: uformimportsources.simportsourcealreadyexists 552 msgctxt "uformimportsources.simportsourcealreadyexists" 465 553 msgid "Import source %s already exists!" 466 554 msgstr "" 467 555 468 #: uformimportsources.simportsourcequery469 msgid "Enter name of import source"470 msgstr ""471 472 556 #: uformimportsources.sremoveimportsource 557 msgctxt "uformimportsources.sremoveimportsource" 473 558 msgid "Remove import sources" 474 559 msgstr "" 475 560 476 561 #: uformimportsources.sremoveimportsourcequery 562 msgctxt "uformimportsources.sremoveimportsourcequery" 477 563 msgid "Do you really want to remove selected import sources?" 478 564 msgstr "" -
trunk/Packages/synapse/synapse.lpk
r1 r22 1 <?xml version="1.0" ?>1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <CONFIG> 3 <Package Version=" 3">3 <Package Version="4"> 4 4 <PathDelim Value="\"/> 5 5 <Name Value="synapse"/> 6 <Type Value="RunAndDesignTime"/> 7 <AddToProjectUsesSection Value="True"/> 6 8 <CompilerOptions> 7 <Version Value=" 9"/>9 <Version Value="11"/> 8 10 <PathDelim Value="\"/> 9 11 <SearchPaths> 12 <OtherUnitFiles Value="."/> 10 13 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 11 14 </SearchPaths> … … 15 18 </SyntaxOptions> 16 19 </Parsing> 17 <Other>18 <CompilerPath Value="$(CompPath)"/>19 </Other>20 20 </CompilerOptions> 21 21 <Files Count="31"> … … 145 145 </Item31> 146 146 </Files> 147 <Type Value="RunAndDesignTime"/>148 147 <RequiredPkgs Count="1"> 149 148 <Item1> -
trunk/Packages/synapse/synaser.pas
r5 r22 2280 2280 try 2281 2281 TmpPorts := ''; 2282 if FindFirst('/dev/ttyS*', $ FFFFFFFF, sr) = 0 then2282 if FindFirst('/dev/ttyS*', $7FFFFFFF, sr) = 0 then 2283 2283 begin 2284 2284 repeat -
trunk/UAcronym.pas
r20 r22 7 7 uses 8 8 Classes, SysUtils, Contnrs, XMLConf, XMLRead, XMLWrite, DOM, UXMLUtils, 9 SpecializedList ;9 SpecializedList, fphttpclient; 10 10 11 11 type … … 14 14 TAcronymDb = class; 15 15 TImportSources = class; 16 TImportFormats = class; 16 17 17 18 TAcronymSource = class … … 122 123 Meaning: TImportPattern; 123 124 Description: TImportPattern; 125 Formats: TImportFormats; 126 procedure Assign(Source: TImportFormat); 124 127 procedure SaveToNode(Node: TDOMNode); 125 128 procedure LoadFromNode(Node: TDOMNode); … … 132 135 procedure SaveToNode(Node: TDOMNode); 133 136 procedure LoadFromNode(Node: TDOMNode); 137 function SearchByName(Name: string): TImportFormat; 134 138 function SearchById(Id: Integer): TImportFormat; 135 139 end; … … 143 147 LastTime: TDateTime; 144 148 Sources: TImportSources; 149 procedure Process; 145 150 procedure Assign(Source: TImportSource); 146 151 procedure SaveToNode(Node: TDOMNode); … … 194 199 end; 195 200 201 function DownloadHTTP(URL: string; Stream: TStream): Boolean; 202 var 203 HTTPClient: TFPHTTPClient; 204 begin 205 HTTPClient := TFPHttpClient.Create(nil); 206 HTTPClient.Get(URL, Stream); 207 HTTPClient.Free; 208 Result := True; 209 end; 210 211 function StripHTML(S: string): string; 212 var 213 TagBegin, TagEnd, TagLength: Integer; 214 begin 215 TagBegin := Pos( '<', S); // search position of first < 216 217 while (TagBegin > 0) do begin // while there is a < in S 218 TagEnd := Pos('>', S); // find the matching > 219 TagLength := TagEnd - TagBegin + 1; 220 Delete(S, TagBegin, TagLength); // delete the tag 221 TagBegin:= Pos( '<', S); // search for next < 222 end; 223 224 Result := S; // give the result 225 end; 226 196 227 { TImportFormat } 228 229 procedure TImportFormat.Assign(Source: TImportFormat); 230 begin 231 Name := Source.Name; 232 Acronym.StartString := Source.Acronym.StartString; 233 Acronym.EndString := Source.Acronym.EndString; 234 Meaning.StartString := Source.Meaning.StartString; 235 Meaning.EndString := Source.Meaning.EndString; 236 Description.StartString := Source.Description.StartString; 237 Description.EndString := Source.Description.EndString; 238 end; 197 239 198 240 procedure TImportFormat.SaveToNode(Node: TDOMNode); … … 263 305 { TImportFormats } 264 306 307 function TImportFormats.SearchByName(Name: string): TImportFormat; 308 var 309 I: Integer; 310 begin 311 I := 0; 312 while (I < Count) and (TImportFormat(Items[I]).Name <> Name) do Inc(I); 313 if I < Count then Result := TImportFormat(Items[I]) 314 else Result := nil; 315 end; 316 265 317 procedure TImportFormats.UpdateIds; 266 318 var … … 323 375 324 376 { TImportSource } 377 378 procedure TImportSource.Process; 379 var 380 Stream: TMemoryStream; 381 S: string; 382 NewAcronym: TAcronymEntry; 383 P: Integer; 384 begin 385 Stream := TMemoryStream.Create; 386 NewAcronym := TAcronymEntry.Create; 387 try 388 if DownloadHTTP(URL, Stream) then begin 389 Stream.Position := 0; 390 SetLength(S, Stream.Size); 391 Stream.Read(S[1], Length(S)); 392 repeat 393 P := Pos(Format.Acronym.StartString, S); 394 if P > 0 then begin 395 // Acronym 396 Delete(S, 1, P + Length(Format.Acronym.StartString) - 1); 397 P := Pos(Format.Acronym.EndString, S); 398 NewAcronym.Name := Trim(StripHTML(Copy(S, 1, P - 1))); 399 Delete(S, 1, P + Length(Format.Acronym.EndString) - 1); 400 401 // Meaning 402 P := Pos(Format.Meaning.StartString, S); 403 Delete(S, 1, P + Length(Format.Meaning.StartString) - 1); 404 P := Pos(Format.Meaning.EndString, S); 405 NewAcronym.Meaning := Trim(StripHTML(Copy(S, 1, P - 1))); 406 Delete(S, 1, P + Length(Format.Meaning.EndString) - 1); 407 Sources.AcronymDb.AddAcronym(NewAcronym.Name, NewAcronym.Meaning); 408 end else Break; 409 until False; 410 end; 411 finally 412 NewAcronym.Free; 413 Stream.Free; 414 end; 415 end; 325 416 326 417 procedure TImportSource.Assign(Source: TImportSource);
Note:
See TracChangeset
for help on using the changeset viewer.