Changeset 148 for trunk/Packages/Common
- Timestamp:
- Jun 5, 2024, 8:50:50 AM (7 months ago)
- Location:
- trunk/Packages/Common
- Files:
-
- 18 added
- 4 deleted
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Common.lpk
r145 r148 11 11 <PathDelim Value="\"/> 12 12 <SearchPaths> 13 <OtherUnitFiles Value="Forms"/> 13 14 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)-$(BuildMode)"/> 14 15 </SearchPaths> … … 41 42 Source: https://svn.zdechov.net/PascalClassLibrary/Common/"/> 42 43 <License Value="Copy left."/> 43 <Version Minor="1 1"/>44 <Files Count="3 3">44 <Version Minor="12"/> 45 <Files Count="36"> 45 46 <Item1> 46 47 <Filename Value="StopWatch.pas"/> … … 159 160 </Item26> 160 161 <Item27> 161 <Filename Value=" FormAbout.pas"/>162 <UnitName Value=" FormAbout"/>162 <Filename Value="PixelPointer.pas"/> 163 <UnitName Value="PixelPointer"/> 163 164 </Item27> 164 165 <Item28> 165 <Filename Value="AboutDialog.pas"/> 166 <HasRegisterProc Value="True"/> 167 <UnitName Value="AboutDialog"/> 166 <Filename Value="DataFile.pas"/> 167 <UnitName Value="DataFile"/> 168 168 </Item28> 169 169 <Item29> 170 <Filename Value=" PixelPointer.pas"/>171 <UnitName Value=" PixelPointer"/>170 <Filename Value="TestCase.pas"/> 171 <UnitName Value="TestCase"/> 172 172 </Item29> 173 173 <Item30> 174 <Filename Value=" DataFile.pas"/>175 <UnitName Value=" DataFile"/>174 <Filename Value="Generics.pas"/> 175 <UnitName Value="Generics"/> 176 176 </Item30> 177 177 <Item31> 178 <Filename Value="TestCase.pas"/>179 <UnitName Value="TestCase"/>180 </Item31>181 <Item32>182 <Filename Value="Generics.pas"/>183 <UnitName Value="Generics"/>184 </Item32>185 <Item33>186 178 <Filename Value="CommonPackage.pas"/> 187 179 <Type Value="Main Unit"/> 188 180 <UnitName Value="CommonPackage"/> 181 </Item31> 182 <Item32> 183 <Filename Value="Table.pas"/> 184 <UnitName Value="Table"/> 185 </Item32> 186 <Item33> 187 <Filename Value="FormEx.pas"/> 188 <HasRegisterProc Value="True"/> 189 <UnitName Value="FormEx"/> 189 190 </Item33> 191 <Item34> 192 <Filename Value="Forms\FormTests.pas"/> 193 <UnitName Value="FormTests"/> 194 </Item34> 195 <Item35> 196 <Filename Value="Forms\FormTest.pas"/> 197 <UnitName Value="FormTest"/> 198 </Item35> 199 <Item36> 200 <Filename Value="Forms\FormAbout.pas"/> 201 <UnitName Value="FormAbout"/> 202 </Item36> 190 203 </Files> 191 204 <CompatibilityMode Value="True"/> -
trunk/Packages/Common/Common.pas
r145 r148 65 65 function GetFileFilterItemExt(Filter: string; Index: Integer): string; 66 66 function IntToBin(Data: Int64; Count: Byte): string; 67 function Implode(Separator: Char; List: TList<string>): string; 67 function Implode(Separator: string; List: TList<string>): string; 68 function Implode(Separator: string; List: TStringList; Around: string = ''): string; 68 69 function LastPos(const SubStr: String; const S: String): Integer; 69 70 function LoadFileToStr(const FileName: TFileName): AnsiString; … … 206 207 end;*) 207 208 209 function Implode(Separator: string; List: TStringList; Around: string = ''): string; 210 var 211 I: Integer; 212 begin 213 Result := ''; 214 for I := 0 to List.Count - 1 do begin 215 Result := Result + Around + List[I] + Around; 216 if I < List.Count - 1 then Result := Result + Separator; 217 end; 218 end; 219 208 220 function LastPos(const SubStr: String; const S: String): Integer; 209 221 begin … … 314 326 end; 315 327 316 function Implode(Separator: Char; List: TList<string>): string;328 function Implode(Separator: string; List: TList<string>): string; 317 329 var 318 330 I: Integer; -
trunk/Packages/Common/CommonPackage.pas
r145 r148 9 9 10 10 uses 11 StopWatch, Common, DebugLog, Common.Delay, PrefixMultiplier, URI, Threading, 11 StopWatch, Common, DebugLog, Common.Delay, PrefixMultiplier, URI, Threading, 12 12 Memory, ResetableThread, Pool, LastOpenedList, RegistryEx, JobProgressView, 13 13 XML, ApplicationInfo, SyncCounter, ListViewSort, PersistentForm, FindFile, 14 14 ScaleDPI, Theme, StringTable, MetaCanvas, Geometric, Translator, Languages, 15 FormAbout, AboutDialog, PixelPointer, DataFile, TestCase, Generics,16 LazarusPackageIntf;15 PixelPointer, DataFile, TestCase, Generics, Table, FormEx, FormTests, 16 FormTest, FormAbout, LazarusPackageIntf; 17 17 18 18 implementation … … 31 31 RegisterUnit('Theme', @Theme.Register); 32 32 RegisterUnit('Translator', @Translator.Register); 33 RegisterUnit(' AboutDialog', @AboutDialog.Register);33 RegisterUnit('FormEx', @FormEx.Register); 34 34 end; 35 35 -
trunk/Packages/Common/DataFile.pas
r145 r148 77 77 procedure TDataFile.Assign(Source: TPersistent); 78 78 begin 79 inherited;80 79 if Source is TDataFile then begin 81 80 FFileName := TDataFile(Source).FFileName; 82 81 FModified := TDataFile(Source).FModified; 83 end ;82 end else inherited; 84 83 end; 85 84 -
trunk/Packages/Common/Languages.pas
r145 r148 216 216 SLang_za = 'Zhuang'; 217 217 SLang_zh = 'Chinese'; 218 SLang_zh_Hans = 'Simplified Chinese'; 219 SLang_zh_Hant = 'Traditional Chinese'; 218 220 SLang_zu = 'Zulu'; 221 219 222 220 223 implementation … … 228 231 begin 229 232 I := 0; 230 while (I < Count) and ( TLanguage(Items[I]).Code <ACode) do Inc(I);231 if I < Count then Result := TLanguage(Items[I])233 while (I < Count) and (Items[I].Code <> ACode) do Inc(I); 234 if I < Count then Result := Items[I] 232 235 else Result := nil; 233 236 end; … … 439 442 AddNew('za', SLang_za); 440 443 AddNew('zh', SLang_zh); 444 AddNew('zh-Hant', SLang_zh_Hant); 445 AddNew('zh-Hans', SLang_zh_Hans); 441 446 AddNew('zu', SLang_zu); 442 447 end; -
trunk/Packages/Common/Languages/DataFile.cs.po
r145 r148 13 13 14 14 #: datafile.sallfiles 15 #, fuzzy16 15 msgctxt "datafile.sallfiles" 17 16 msgid "All files" … … 19 18 20 19 #: datafile.sdatafilename 21 #, fuzzy22 20 msgctxt "datafile.sdatafilename" 23 21 msgid "Data file" -
trunk/Packages/Common/Languages/DebugLog.cs.po
r145 r148 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: JiÅÃ Hajda <robie@centrum.cz>\n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 3.0.1\n" 11 13 12 14 #: debuglog.sfilenamenotdefined 13 #, fuzzy14 15 msgctxt "debuglog.sfilenamenotdefined" 15 16 msgid "Filename not defined" -
trunk/Packages/Common/Languages/FindFile.cs.po
r145 r148 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: \n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 11 "Language: cs\n" 12 "X-Generator: Poedit 1.8.9\n" 12 "X-Generator: Poedit 3.0.1\n" 13 13 14 14 #: findfile.sdirnotfound 15 #, fuzzy16 15 msgctxt "findfile.sdirnotfound" 17 16 msgid "Directory not found" -
trunk/Packages/Common/Languages/FormAbout.cs.po
r145 r148 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: Chronos <robie@centrum.cz>\n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 11 "Language: cs\n" 12 "X-Generator: Poedit 2.4.1\n" 12 "X-Generator: Poedit 3.0.1\n" 13 13 14 14 #: formabout.slicense 15 #, fuzzy16 15 msgctxt "formabout.slicense" 17 16 msgid "License" … … 19 18 20 19 #: formabout.sreleasedate 21 #, fuzzy22 20 msgctxt "formabout.sreleasedate" 23 21 msgid "Release date" … … 25 23 26 24 #: formabout.sversion 27 #, fuzzy28 25 msgctxt "formabout.sversion" 29 26 msgid "Version" -
trunk/Packages/Common/Languages/JobProgressView.cs.po
r145 r148 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 2.2\n"12 "X-Generator: Poedit 3.0.1\n" 13 13 14 14 #: jobprogressview.sestimatedtime 15 #, object-pascal-format , fuzzy15 #, object-pascal-format 16 16 msgctxt "jobprogressview.sestimatedtime" 17 17 msgid "Estimated time: %s" … … 19 19 20 20 #: jobprogressview.sexecuted 21 #, fuzzy22 21 msgctxt "jobprogressview.sexecuted" 23 22 msgid "Executed" … … 25 24 26 25 #: jobprogressview.sfinished 27 #, fuzzy28 26 msgctxt "jobprogressview.sfinished" 29 27 msgid "Finished" … … 31 29 32 30 #: jobprogressview.spleasewait 33 #, fuzzy34 31 msgctxt "jobprogressview.spleasewait" 35 32 msgid "Please wait..." … … 37 34 38 35 #: jobprogressview.sterminate 39 #, fuzzy40 36 msgctxt "jobprogressview.sterminate" 41 37 msgid "Termination" … … 43 39 44 40 #: jobprogressview.stotalestimatedtime 45 #, object-pascal-format , fuzzy41 #, object-pascal-format 46 42 msgctxt "jobprogressview.stotalestimatedtime" 47 43 msgid "Total estimated time: %s" -
trunk/Packages/Common/Languages/Languages.cs.po
r145 r148 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: JiÅà Hajda <software@mezservis.cz>\n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 3.0.1\n" 11 13 12 14 #: languages.slangauto 13 #, fuzzy14 15 msgctxt "languages.slangauto" 15 16 msgid "Automatic" … … 22 23 23 24 #: languages.slang_ab 24 #, fuzzy25 25 msgctxt "languages.slang_ab" 26 26 msgid "Abkhazian" … … 33 33 34 34 #: languages.slang_af 35 #, fuzzy36 35 msgctxt "languages.slang_af" 37 36 msgid "Afrikaans" … … 54 53 55 54 #: languages.slang_ar 56 #, fuzzy57 55 msgctxt "languages.slang_ar" 58 56 msgid "Arabic" … … 90 88 91 89 #: languages.slang_bg 92 #, fuzzy93 90 msgctxt "languages.slang_bg" 94 91 msgid "Bulgarian" … … 116 113 117 114 #: languages.slang_bo 118 #, fuzzy119 115 msgctxt "languages.slang_bo" 120 116 msgid "Tibetan" … … 132 128 133 129 #: languages.slang_ca 134 #, fuzzy135 130 msgctxt "languages.slang_ca" 136 131 msgid "Catalan" … … 153 148 154 149 #: languages.slang_cr 155 #, fuzzy156 150 msgctxt "languages.slang_cr" 157 151 msgid "Cree" … … 159 153 160 154 #: languages.slang_cs 161 #, fuzzy162 155 msgctxt "languages.slang_cs" 163 156 msgid "Czech" … … 175 168 176 169 #: languages.slang_da 177 #, fuzzy178 170 msgctxt "languages.slang_da" 179 171 msgid "Danish" … … 181 173 182 174 #: languages.slang_de 183 #, fuzzy184 175 msgctxt "languages.slang_de" 185 176 msgid "German" … … 187 178 188 179 #: languages.slang_de_at 189 #, fuzzy190 180 msgctxt "languages.slang_de_at" 191 181 msgid "Austrian German" … … 193 183 194 184 #: languages.slang_de_ch 195 #, fuzzy196 185 msgctxt "languages.slang_de_ch" 197 186 msgid "Swiss German" … … 214 203 215 204 #: languages.slang_el 216 #, fuzzy217 205 msgctxt "languages.slang_el" 218 206 msgid "Greek" … … 220 208 221 209 #: languages.slang_en 222 #, fuzzy223 210 msgctxt "languages.slang_en" 224 211 msgid "English" … … 226 213 227 214 #: languages.slang_en_au 228 #, fuzzy229 215 msgctxt "languages.slang_en_au" 230 216 msgid "Australian English" … … 232 218 233 219 #: languages.slang_en_ca 234 #, fuzzy235 220 msgctxt "languages.slang_en_ca" 236 221 msgid "Canadian English" … … 238 223 239 224 #: languages.slang_en_gb 240 #, fuzzy241 225 msgctxt "languages.slang_en_gb" 242 226 msgid "British English" … … 244 228 245 229 #: languages.slang_en_us 246 #, fuzzy247 230 msgctxt "languages.slang_en_us" 248 231 msgid "American English" … … 250 233 251 234 #: languages.slang_eo 252 #, fuzzy253 235 msgctxt "languages.slang_eo" 254 236 msgid "Esperanto" … … 256 238 257 239 #: languages.slang_es 258 #, fuzzy259 240 msgctxt "languages.slang_es" 260 241 msgid "Spanish" … … 262 243 263 244 #: languages.slang_et 264 #, fuzzy265 245 msgctxt "languages.slang_et" 266 246 msgid "Estonian" … … 273 253 274 254 #: languages.slang_fa 275 #, fuzzy276 255 msgctxt "languages.slang_fa" 277 256 msgid "Persian" … … 284 263 285 264 #: languages.slang_fi 286 #, fuzzy287 265 msgctxt "languages.slang_fi" 288 266 msgid "Finnish" … … 300 278 301 279 #: languages.slang_fr 302 #, fuzzy303 280 msgctxt "languages.slang_fr" 304 281 msgid "French" … … 316 293 317 294 #: languages.slang_ga 318 #, fuzzy319 295 msgctxt "languages.slang_ga" 320 296 msgid "Irish" … … 352 328 353 329 #: languages.slang_he 354 #, fuzzy355 330 msgctxt "languages.slang_he" 356 331 msgid "Hebrew" … … 368 343 369 344 #: languages.slang_hr 370 #, fuzzy371 345 msgctxt "languages.slang_hr" 372 346 msgid "Croatian" … … 379 353 380 354 #: languages.slang_hu 381 #, fuzzy382 355 msgctxt "languages.slang_hu" 383 356 msgid "Hungarian" … … 385 358 386 359 #: languages.slang_hy 387 #, fuzzy388 360 msgctxt "languages.slang_hy" 389 361 msgid "Armenian" … … 431 403 432 404 #: languages.slang_is 433 #, fuzzy434 405 msgctxt "languages.slang_is" 435 406 msgid "Icelandic" … … 437 408 438 409 #: languages.slang_it 439 #, fuzzy440 410 msgctxt "languages.slang_it" 441 411 msgid "Italian" … … 448 418 449 419 #: languages.slang_ja 450 #, fuzzy451 420 msgctxt "languages.slang_ja" 452 421 msgid "Japanese" … … 459 428 460 429 #: languages.slang_ka 461 #, fuzzy462 430 msgctxt "languages.slang_ka" 463 431 msgid "Georgian" … … 465 433 466 434 #: languages.slang_kg 467 #, fuzzy468 435 msgctxt "languages.slang_kg" 469 436 msgid "Kongo" … … 486 453 487 454 #: languages.slang_kl 488 #, fuzzy489 455 msgctxt "languages.slang_kl" 490 456 msgid "Greenlandic" … … 497 463 498 464 #: languages.slang_kn 499 #, fuzzy500 465 msgctxt "languages.slang_kn" 501 466 msgid "Kannada" … … 503 468 504 469 #: languages.slang_ko 505 #, fuzzy506 470 msgctxt "languages.slang_ko" 507 471 msgid "Korean" … … 529 493 530 494 #: languages.slang_kw 531 #, fuzzy532 495 msgctxt "languages.slang_kw" 533 496 msgid "Cornish" … … 540 503 541 504 #: languages.slang_la 542 #, fuzzy543 505 msgctxt "languages.slang_la" 544 506 msgid "Latin" … … 546 508 547 509 #: languages.slang_lb 548 #, fuzzy549 510 msgctxt "languages.slang_lb" 550 511 msgid "Luxembourgish" … … 567 528 568 529 #: languages.slang_lo 569 #, fuzzy570 530 msgctxt "languages.slang_lo" 571 531 msgid "Lao" … … 573 533 574 534 #: languages.slang_lt 575 #, fuzzy576 535 msgctxt "languages.slang_lt" 577 536 msgid "Lithuanian" … … 584 543 585 544 #: languages.slang_lv 586 #, fuzzy587 545 msgctxt "languages.slang_lv" 588 546 msgid "Latvian" … … 605 563 606 564 #: languages.slang_mk 607 #, fuzzy608 565 msgctxt "languages.slang_mk" 609 566 msgid "Macedonian" … … 616 573 617 574 #: languages.slang_mn 618 #, fuzzy619 575 msgctxt "languages.slang_mn" 620 576 msgid "Mongolian" … … 622 578 623 579 #: languages.slang_mo 624 #, fuzzy625 580 msgctxt "languages.slang_mo" 626 581 msgid "Moldavian" … … 673 628 674 629 #: languages.slang_nl 675 #, fuzzy676 630 msgctxt "languages.slang_nl" 677 631 msgid "Dutch" … … 689 643 690 644 #: languages.slang_no 691 #, fuzzy692 645 msgctxt "languages.slang_no" 693 646 msgid "Norwegian" … … 700 653 701 654 #: languages.slang_nv 702 #, fuzzy703 655 msgctxt "languages.slang_nv" 704 656 msgid "Navajo" … … 746 698 747 699 #: languages.slang_pl 748 #, fuzzy749 700 msgctxt "languages.slang_pl" 750 701 msgid "Polish" … … 757 708 758 709 #: languages.slang_pt 759 #, fuzzy760 710 msgctxt "languages.slang_pt" 761 711 msgid "Portuguese" … … 763 713 764 714 #: languages.slang_pt_br 765 #, fuzzy766 715 msgctxt "languages.slang_pt_br" 767 716 msgid "Brazilian Portuguese" … … 784 733 785 734 #: languages.slang_ro 786 #, fuzzy787 735 msgctxt "languages.slang_ro" 788 736 msgid "Romanian" … … 790 738 791 739 #: languages.slang_ru 792 #, fuzzy793 740 msgctxt "languages.slang_ru" 794 741 msgid "Russian" … … 831 778 832 779 #: languages.slang_sk 833 #, fuzzy834 780 msgctxt "languages.slang_sk" 835 781 msgid "Slovak" … … 837 783 838 784 #: languages.slang_sl 839 #, fuzzy840 785 msgctxt "languages.slang_sl" 841 786 msgid "Slovenian" … … 858 803 859 804 #: languages.slang_sq 860 #, fuzzy861 805 msgctxt "languages.slang_sq" 862 806 msgid "Albanian" … … 879 823 880 824 #: languages.slang_su 881 #, fuzzy882 825 msgctxt "languages.slang_su" 883 826 msgid "Sundanese" … … 885 828 886 829 #: languages.slang_sv 887 #, fuzzy888 830 msgctxt "languages.slang_sv" 889 831 msgid "Swedish" … … 941 883 942 884 #: languages.slang_tr 943 #, fuzzy944 885 msgctxt "languages.slang_tr" 945 886 msgid "Turkish" … … 952 893 953 894 #: languages.slang_tt 954 #, fuzzy955 895 msgctxt "languages.slang_tt" 956 896 msgid "Tatar" … … 973 913 974 914 #: languages.slang_uk 975 #, fuzzy976 915 msgctxt "languages.slang_uk" 977 916 msgid "Ukrainian" … … 994 933 995 934 #: languages.slang_vi 996 #, fuzzy997 935 msgctxt "languages.slang_vi" 998 936 msgid "Vietnamese" … … 1035 973 1036 974 #: languages.slang_zh 1037 #, fuzzy1038 975 msgctxt "languages.slang_zh" 1039 976 msgid "Chinese" 1040 977 msgstr "ÄÃnÅ¡tina" 1041 978 979 #: languages.slang_zh_hans 980 msgid "Simplified Chinese" 981 msgstr "" 982 983 #: languages.slang_zh_hant 984 msgid "Traditional Chinese" 985 msgstr "" 986 1042 987 #: languages.slang_zu 1043 #, fuzzy1044 988 msgctxt "languages.slang_zu" 1045 989 msgid "Zulu" -
trunk/Packages/Common/Languages/Languages.pot
r145 r148 776 776 msgstr "" 777 777 778 #: languages.slang_zh_hans 779 msgid "Simplified Chinese" 780 msgstr "" 781 782 #: languages.slang_zh_hant 783 msgid "Traditional Chinese" 784 msgstr "" 785 778 786 #: languages.slang_zu 779 787 msgid "Zulu" -
trunk/Packages/Common/Languages/Pool.cs.po
r145 r148 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: Chronos <robie@centrum.cz>\n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 3.0.1\n" 11 13 12 14 #: pool.sobjectpoolempty 13 #, fuzzy14 15 msgctxt "pool.sobjectpoolempty" 15 16 msgid "Object pool is empty" … … 17 18 18 19 #: pool.sreleaseerror 19 #, fuzzy20 20 msgctxt "pool.sreleaseerror" 21 21 msgid "Unknown object for release from pool" -
trunk/Packages/Common/Languages/ResetableThread.cs.po
r145 r148 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: Chronos <robie@centrum.cz>\n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 3.0.1\n" 11 13 12 14 #: resetablethread.swaiterror 13 #, fuzzy14 15 msgctxt "resetablethread.swaiterror" 15 16 msgid "WaitFor error" -
trunk/Packages/Common/Languages/ScaleDPI.cs.po
r145 r148 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: \n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 11 "Language: cs\n" 12 "X-Generator: Poedit 1.8.9\n" 12 "X-Generator: Poedit 3.0.1\n" 13 13 14 14 #: scaledpi.swrongdpi 15 #, object-pascal-format , fuzzy15 #, object-pascal-format 16 16 msgctxt "scaledpi.swrongdpi" 17 17 msgid "Wrong DPI [%d,%d]" -
trunk/Packages/Common/Languages/TestCase.cs.po
r145 r148 13 13 14 14 #: testcase.sfailed 15 #, fuzzy16 15 msgctxt "testcase.sfailed" 17 16 msgid "Failed" … … 19 18 20 19 #: testcase.snone 21 #, fuzzy22 20 msgctxt "testcase.snone" 23 21 msgid "None" … … 25 23 26 24 #: testcase.spassed 27 #, fuzzy28 25 msgctxt "testcase.spassed" 29 26 msgid "Passed" -
trunk/Packages/Common/Languages/Threading.cs.po
r145 r148 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: Chronos <robie@centrum.cz>\n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 3.0.1\n" 11 13 12 14 #: threading.scurrentthreadnotfound 13 #, object-pascal-format , fuzzy15 #, object-pascal-format 14 16 msgctxt "threading.scurrentthreadnotfound" 15 17 msgid "Current thread ID %d not found in virtual thread list." -
trunk/Packages/Common/PixelPointer.pas
r145 r148 4 4 5 5 uses 6 Classes, SysUtils, Graphics;6 Math, Classes, SysUtils, Graphics; 7 7 8 8 type 9 9 TColor32 = type Cardinal; 10 10 TColor32Component = (ccBlue, ccGreen, ccRed, ccAlpha); 11 TColor32Planes = array[0..3] of Byte; 11 12 12 13 { TPixel32 } … … 14 15 TPixel32 = packed record 15 16 private 16 procedure SetRGB(AValue: Cardinal); 17 function GetRGB: Cardinal; 17 procedure SetRGB(AValue: Cardinal); inline; 18 function GetRGB: Cardinal; inline; 18 19 public 19 20 property RGB: Cardinal read GetRGB write SetRGB; … … 21 22 0: (B, G, R, A: Byte); 22 23 1: (ARGB: TColor32); 23 2: (Planes: array[0..3] of Byte);24 2: (Planes: TColor32Planes); 24 25 3: (Components: array[TColor32Component] of Byte); 25 26 end; … … 29 30 30 31 TPixelPointer = record 32 private 33 function GetPixelARGB: TColor32; inline; 34 function GetPixelB: Byte; inline; 35 function GetPixelG: Byte; inline; 36 function GetPixelPlane(Index: Byte): Byte; inline; 37 function GetPixelR: Byte; inline; 38 function GetPixelA: Byte; inline; 39 function GetPixelPlanes: TColor32Planes; 40 function GetPixelRGB: Cardinal; inline; 41 procedure SetPixelARGB(Value: TColor32); inline; 42 procedure SetPixelB(Value: Byte); inline; 43 procedure SetPixelG(Value: Byte); inline; 44 procedure SetPixelPlane(Index: Byte; AValue: Byte); inline; 45 procedure SetPixelR(Value: Byte); inline; 46 procedure SetPixelA(Value: Byte); inline; 47 procedure SetPixelRGB(Value: Cardinal); inline; 48 public 31 49 Base: PPixel32; 32 50 Pixel: PPixel32; … … 35 53 BytesPerPixel: Integer; 36 54 BytesPerLine: Integer; 55 Data: PPixel32; 56 Width: Integer; 57 Height: Integer; 37 58 procedure NextLine; inline; // Move pointer to start of next line 38 59 procedure PreviousLine; inline; // Move pointer to start of previous line … … 41 62 procedure SetXY(X, Y: Integer); inline; // Set pixel position relative to base 42 63 procedure SetX(X: Integer); inline; // Set horizontal pixel position relative to base 64 procedure CheckRange; inline; // Check if current pixel position is not out of range 65 function PosValid: Boolean; 66 class function Create(Bitmap: TRasterImage; BaseX: Integer = 0; BaseY: Integer = 0): TPixelPointer; static; 67 property PixelARGB: TColor32 read GetPixelARGB write SetPixelARGB; 68 property PixelRGB: Cardinal read GetPixelRGB write SetPixelRGB; 69 property PixelB: Byte read GetPixelB write SetPixelB; 70 property PixelG: Byte read GetPixelG write SetPixelG; 71 property PixelR: Byte read GetPixelR write SetPixelR; 72 property PixelA: Byte read GetPixelA write SetPixelA; 73 property PixelPlane[Index: Byte]: Byte read GetPixelPlane write SetPixelPlane; 43 74 end; 44 75 PPixelPointer = ^TPixelPointer; 45 76 46 function PixelPointer(Bitmap: TRasterImage; BaseX: Integer = 0; BaseY: Integer = 0): TPixelPointer; inline;47 77 function SwapRedBlue(Color: TColor32): TColor32; 48 78 procedure BitmapCopyRect(DstBitmap: TRasterImage; DstRect: TRect; SrcBitmap: TRasterImage; SrcPos: TPoint); … … 63 93 implementation 64 94 95 resourcestring 96 SOutOfRange = 'Pixel pointer out of range [X: %d, Y: %d, Width: %d, Height: %d]'; 97 SWrongBitmapSize = 'Wrong bitmap size [width: %d, height: %d]'; 98 65 99 { TPixel32 } 66 100 … … 72 106 procedure TPixel32.SetRGB(AValue: Cardinal); 73 107 begin 74 R := (AValue shr 16) and $ff; 75 G := (AValue shr 8) and $ff; 76 B := (AValue shr 0) and $ff; 108 ARGB := (ARGB and $ff000000) or (AValue and $ffffff); 77 109 end; 78 110 … … 112 144 end; 113 145 146 procedure TPixelPointer.CheckRange; 147 {$IFOPT R+} 148 var 149 X: Integer; 150 Y: Integer; 151 {$ENDIF} 152 begin 153 {$IFOPT R+} 154 if (PByte(Pixel) < PByte(Data)) or 155 (PByte(Pixel) >= PByte(Data) + Height * BytesPerLine) then begin 156 X := PByte(Pixel) - PByte(Data); 157 Y := Floor(X / BytesPerLine); 158 X := X - Y * BytesPerLine; 159 X := Floor(X / BytesPerPixel); 160 raise Exception.Create(Format(SOutOfRange, [X, Y, Width, Height])); 161 end; 162 {$ENDIF} 163 end; 164 165 function TPixelPointer.PosValid: Boolean; 166 begin 167 Result := not ((PByte(Pixel) < PByte(Data)) or 168 (PByte(Pixel) >= PByte(Data) + Height * BytesPerLine)); 169 end; 170 171 function TPixelPointer.GetPixelPlanes: TColor32Planes; 172 begin 173 CheckRange; 174 Result := Pixel^.Planes; 175 end; 176 177 function TPixelPointer.GetPixelRGB: Cardinal; 178 begin 179 CheckRange; 180 Result := Pixel^.RGB; 181 end; 182 183 procedure TPixelPointer.SetPixelARGB(Value: TColor32); 184 begin 185 CheckRange; 186 Pixel^.ARGB := Value; 187 end; 188 189 procedure TPixelPointer.SetPixelB(Value: Byte); 190 begin 191 CheckRange; 192 Pixel^.B := Value; 193 end; 194 195 procedure TPixelPointer.SetPixelG(Value: Byte); 196 begin 197 CheckRange; 198 Pixel^.G := Value; 199 end; 200 201 procedure TPixelPointer.SetPixelPlane(Index: Byte; AValue: Byte); 202 begin 203 CheckRange; 204 Pixel^.Planes[Index] := AValue; 205 end; 206 207 procedure TPixelPointer.SetPixelR(Value: Byte); 208 begin 209 CheckRange; 210 Pixel^.R := Value; 211 end; 212 213 procedure TPixelPointer.SetPixelA(Value: Byte); 214 begin 215 CheckRange; 216 Pixel^.A := Value; 217 end; 218 219 function TPixelPointer.GetPixelARGB: TColor32; 220 begin 221 CheckRange; 222 Result := Pixel^.ARGB; 223 end; 224 225 function TPixelPointer.GetPixelB: Byte; 226 begin 227 CheckRange; 228 Result := Pixel^.B; 229 end; 230 231 function TPixelPointer.GetPixelG: Byte; 232 begin 233 CheckRange; 234 Result := Pixel^.G; 235 end; 236 237 function TPixelPointer.GetPixelPlane(Index: Byte): Byte; 238 begin 239 CheckRange; 240 Result := Pixel^.Planes[Index]; 241 end; 242 243 function TPixelPointer.GetPixelR: Byte; 244 begin 245 CheckRange; 246 Result := Pixel^.R; 247 end; 248 249 function TPixelPointer.GetPixelA: Byte; 250 begin 251 CheckRange; 252 Result := Pixel^.A; 253 end; 254 255 procedure TPixelPointer.SetPixelRGB(Value: Cardinal); 256 begin 257 CheckRange; 258 Pixel^.RGB := Value; 259 end; 260 114 261 procedure BitmapCopyRect(DstBitmap: TRasterImage; DstRect: TRect; 115 262 SrcBitmap: TRasterImage; SrcPos: TPoint); … … 120 267 SrcBitmap.BeginUpdate(True); 121 268 DstBitmap.BeginUpdate(True); 122 SrcPtr := PixelPointer(SrcBitmap, SrcPos.X, SrcPos.Y);123 DstPtr := PixelPointer(DstBitmap, DstRect.Left, DstRect.Top);269 SrcPtr := TPixelPointer.Create(SrcBitmap, SrcPos.X, SrcPos.Y); 270 DstPtr := TPixelPointer.Create(DstBitmap, DstRect.Left, DstRect.Top); 124 271 for Y := 0 to DstRect.Height - 1 do begin 125 272 for X := 0 to DstRect.Width - 1 do begin 126 DstPtr.Pixel ^.ARGB := SrcPtr.Pixel^.ARGB;273 DstPtr.PixelARGB := SrcPtr.PixelARGB; 127 274 SrcPtr.NextPixel; 128 275 DstPtr.NextPixel; … … 150 297 SrcBitmap.BeginUpdate(True); 151 298 DstBitmap.BeginUpdate(True); 152 SrcPtr := PixelPointer(SrcBitmap, SrcRect.Left, SrcRect.Top);153 DstPtr := PixelPointer(DstBitmap, DstRect.Left, DstRect.Top);299 SrcPtr := TPixelPointer.Create(SrcBitmap, SrcRect.Left, SrcRect.Top); 300 DstPtr := TPixelPointer.Create(DstBitmap, DstRect.Left, DstRect.Top); 154 301 for Y := 0 to DstRect.Height - 1 do begin 155 302 for X := 0 to DstRect.Width - 1 do begin … … 160 307 DstPtr.SetXY(X, Y); 161 308 SrcPtr.SetXY(R.Left, R.Top); 162 C := SrcPtr.Pixel ^.ARGB;163 DstPtr.Pixel ^.ARGB := C;309 C := SrcPtr.PixelARGB; 310 DstPtr.PixelARGB := C; 164 311 for YY := 0 to R.Height - 1 do begin 165 312 for XX := 0 to R.Width - 1 do begin 166 DstPtr.Pixel ^.ARGB := C;313 DstPtr.PixelARGB := C; 167 314 DstPtr.NextPixel; 168 315 end; … … 181 328 begin 182 329 Bitmap.BeginUpdate(True); 183 Ptr := PixelPointer(Bitmap);330 Ptr := TPixelPointer.Create(Bitmap); 184 331 for Y := 0 to Bitmap.Height - 1 do begin 185 332 for X := 0 to Bitmap.Width - 1 do begin 186 Ptr.Pixel ^.ARGB := Color;333 Ptr.PixelARGB := Color; 187 334 Ptr.NextPixel; 188 335 end; … … 198 345 begin 199 346 Bitmap.BeginUpdate(True); 200 Ptr := PixelPointer(Bitmap, Rect.Left, Rect.Top);347 Ptr := TPixelPointer.Create(Bitmap, Rect.Left, Rect.Top); 201 348 for Y := 0 to Rect.Height - 1 do begin 202 349 for X := 0 to Rect.Width - 1 do begin 203 Ptr.Pixel ^.ARGB := Color;350 Ptr.PixelARGB := Color; 204 351 Ptr.NextPixel; 205 352 end; … … 215 362 begin 216 363 Bitmap.BeginUpdate(True); 217 Ptr := PixelPointer(Bitmap);364 Ptr := TPixelPointer.Create(Bitmap); 218 365 for Y := 0 to Bitmap.Height - 1 do begin 219 366 for X := 0 to Bitmap.Width - 1 do begin 220 Ptr.Pixel ^.ARGB := SwapRedBlue(Ptr.Pixel^.ARGB);367 Ptr.PixelARGB := SwapRedBlue(Ptr.PixelARGB); 221 368 Ptr.NextPixel; 222 369 end; … … 232 379 begin 233 380 Bitmap.BeginUpdate(True); 234 Ptr := PixelPointer(Bitmap);381 Ptr := TPixelPointer.Create(Bitmap); 235 382 for Y := 0 to Bitmap.Height - 1 do begin 236 383 for X := 0 to Bitmap.Width - 1 do begin 237 Ptr.Pixel ^.ARGB := Ptr.Pixel^.ARGB xor $ffffff;384 Ptr.PixelARGB := Ptr.PixelARGB xor $ffffff; 238 385 Ptr.NextPixel; 239 386 end; … … 252 399 Pixel := Color32ToPixel32(Color); 253 400 Bitmap.BeginUpdate(True); 254 Ptr := PixelPointer(Bitmap);401 Ptr := TPixelPointer.Create(Bitmap); 255 402 for Y := 0 to Bitmap.Height - 1 do begin 256 403 for X := 0 to Bitmap.Width - 1 do begin 257 A := Ptr.Pixel ^.A; //(Ptr.Pixel^.A + Pixel.A) shr 1;258 R := (Ptr.Pixel ^.R + Pixel.R) shr 1;259 G := (Ptr.Pixel ^.G + Pixel.G) shr 1;260 B := (Ptr.Pixel ^.B + Pixel.B) shr 1;261 Ptr.Pixel ^.ARGB := Color32(A, R, G, B);404 A := Ptr.PixelA; //(Ptr.PixelA + Pixel.A) shr 1; 405 R := (Ptr.PixelR + Pixel.R) shr 1; 406 G := (Ptr.PixelG + Pixel.G) shr 1; 407 B := (Ptr.PixelB + Pixel.B) shr 1; 408 Ptr.PixelARGB := Color32(A, R, G, B); 262 409 Ptr.NextPixel; 263 410 end; … … 295 442 end; 296 443 297 function PixelPointer(Bitmap: TRasterImage; BaseX: Integer;444 class function TPixelPointer.Create(Bitmap: TRasterImage; BaseX: Integer; 298 445 BaseY: Integer): TPixelPointer; 299 446 begin 447 Result.Width := Bitmap.Width; 448 Result.Height := Bitmap.Height; 449 if (Result.Width < 0) or (Result.Height < 0) then 450 raise Exception.Create(Format(SWrongBitmapSize, [Result.Width, Result.Height])); 300 451 Result.BytesPerLine := Bitmap.RawImage.Description.BytesPerLine; 301 452 Result.BytesPerPixel := Bitmap.RawImage.Description.BitsPerPixel shr 3; 453 Result.Data := PPixel32(Bitmap.RawImage.Data); 302 454 Result.Base := PPixel32(Bitmap.RawImage.Data + BaseX * Result.BytesPerPixel + 303 455 BaseY * Result.BytesPerLine); -
trunk/Packages/Common/PrefixMultiplier.pas
r145 r148 31 31 ( 32 32 (ShortText: 'y'; FullText: 'yocto'; Value: 1e-24), 33 33 (ShortText: 'z'; FullText: 'zepto'; Value: 1e-21), 34 34 (ShortText: 'a'; FullText: 'atto'; Value: 1e-18), 35 35 (ShortText: 'f'; FullText: 'femto'; Value: 1e-15), … … 52 52 ( 53 53 (ShortText: 'ys'; FullText: 'yocto'; Value: 1e-24), 54 54 (ShortText: 'zs'; FullText: 'zepto'; Value: 1e-21), 55 55 (ShortText: 'as'; FullText: 'atto'; Value: 1e-18), 56 56 (ShortText: 'fs'; FullText: 'femto'; Value: 1e-15), -
trunk/Packages/Common/Translator.pas
r145 r148 48 48 procedure TranslateProperty(Component: TPersistent; PropInfo: PPropInfo); 49 49 function IsExcluded(Component: TPersistent; PropertyName: string): Boolean; 50 function GetLangFileDir : string;50 function GetLangFileDirs: TStrings; 51 51 public 52 52 ComponentExcludes: TComponentExcludesList; … … 71 71 end; 72 72 73 const 74 PoExt = '.po'; 75 73 76 procedure Register; 74 77 75 78 76 79 implementation 80 81 uses 82 Common; 77 83 78 84 procedure Register; … … 161 167 FileList: TStringList; 162 168 I: Integer; 169 J: Integer; 163 170 LocaleShort: string; 164 171 SearchMask: string; 172 LangDirs: TStrings; 165 173 begin 166 174 FPoFiles.Clear; 167 if Assigned(FLanguage) then 168 try 175 if Assigned(FLanguage) then begin 169 176 LocaleShort := GetLocaleShort; 170 //ShowMessage(ExtractFileDir(Application.ExeName) +171 // DirectorySeparator + 'Languages' + ' ' + '*.' + LocaleShort + '.po');172 177 SearchMask := '*'; 173 178 if LocaleShort <> '' then SearchMask := SearchMask + '.' + LocaleShort; 174 SearchMask := SearchMask + '.po'; 175 FileList := FindAllFiles(GetLangFileDir, SearchMask); 176 for I := 0 to FileList.Count - 1 do begin 177 FileName := FileList[I]; 178 //FileName := FindLocaleFileName('.po'); 179 if FileExists(FileName) and ( 180 ((LocaleShort = '') and (Pos('.', FileName) = Pos('.po', FileName))) or 181 (LocaleShort <> '')) then FPoFiles.Add(TPOFile.Create(FileName)); 182 end; 183 finally 184 FileList.Free; 179 SearchMask := SearchMask + PoExt; 180 LangDirs := GetLangFileDirs; 181 for J := 0 to LangDirs.Count - 1 do begin 182 FileList := FindAllFiles(LangDirs[J], SearchMask); 183 try 184 for I := 0 to FileList.Count - 1 do begin 185 FileName := FileList[I]; 186 //FileName := FindLocaleFileName('.po'); 187 if FileExists(FileName) and ( 188 ((LocaleShort = '') and (Pos('.', FileName) = Pos(PoExt, FileName))) or 189 (LocaleShort <> '')) then FPoFiles.Add(TPOFile.Create(FileName)); 190 end; 191 finally 192 FileList.Free; 193 end; 194 end; 195 LangDirs.Free; 185 196 end; 186 197 end; … … 299 310 end; 300 311 301 function TTranslator.GetLangFileDir: string; 302 begin 303 Result := FPoFilesFolder; 304 if Copy(Result, 1, 1) <> DirectorySeparator then 305 Result := ExtractFileDir(Application.ExeName) + 306 DirectorySeparator + Result; 312 function TTranslator.GetLangFileDirs: TStrings; 313 var 314 I: Integer; 315 begin 316 Result := TStringList.Create; 317 Result.Delimiter := ';'; 318 Result.StrictDelimiter := True; 319 Result.DelimitedText := FPoFilesFolder; 320 321 for I := 0 to Result.Count - 1 do begin 322 Result[I] := StringReplace(Result[I], '/', DirectorySeparator, [rfReplaceAll]); 323 Result[I] := StringReplace(Result[I], '\', DirectorySeparator, [rfReplaceAll]); 324 if Copy(Result[I], 1, 1) <> DirectorySeparator then 325 Result[I] := ExtractFileDir(Application.ExeName) + 326 DirectorySeparator + Result[I]; 327 end; 307 328 end; 308 329 … … 371 392 var 372 393 I: Integer; 373 LangDir: string; 374 begin 375 LangDir := GetLangFileDir; 394 J: Integer; 395 LangDirs: TStrings; 396 begin 397 LangDirs := GetLangFileDirs; 376 398 Languages.SearchByCode('').Available := True; // Automatic 377 399 378 400 for I := 1 to Languages.Count - 1 do 379 401 with Languages[I] do begin 380 Available := FileExists(LangDir + DirectorySeparator + ExtractFileNameOnly(Application.ExeName) + 381 '.' + Code + ExtensionSeparator + 'po') or (Code = 'en'); 382 end; 402 for J := 0 to LangDirs.Count - 1 do begin 403 if FileExists(LangDirs[J] + DirectorySeparator + ExtractFileNameOnly(Application.ExeName) + 404 '.' + Code + PoExt) or (Code = 'en') then begin 405 Available := True; 406 Continue; 407 end; 408 end; 409 end; 410 LangDirs.Free; 383 411 end; 384 412
Note:
See TracChangeset
for help on using the changeset viewer.