Changeset 24 for trunk/Packages
- Timestamp:
- Apr 5, 2025, 9:45:07 PM (12 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Translator.pas
r21 r24 482 482 483 483 Result := ChangeFileExt(ParamStr(0), LCExt); 484 if FileExists UTF8(Result) then484 if FileExists(Result) then 485 485 Exit; 486 486 … … 500 500 Result := ExtractFilePath(ParamStrUTF8(0)) + LangID + 501 501 DirectorySeparator + ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), LCExt); 502 if FileExists UTF8(Result) then502 if FileExists(Result) then 503 503 exit; 504 504 505 505 Result := ExtractFilePath(ParamStrUTF8(0)) + 'languages' + DirectorySeparator + LangID + 506 506 DirectorySeparator + ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), LCExt); 507 if FileExists UTF8(Result) then507 if FileExists(Result) then 508 508 exit; 509 509 510 510 Result := ExtractFilePath(ParamStrUTF8(0)) + 'locale' + DirectorySeparator 511 511 + LangID + DirectorySeparator + ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), LCExt); 512 if FileExists UTF8(Result) then512 if FileExists(Result) then 513 513 exit; 514 514 … … 516 516 + LangID + DirectorySeparator + 'LC_MESSAGES' + DirectorySeparator + 517 517 ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), LCExt); 518 if FileExists UTF8(Result) then518 if FileExists(Result) then 519 519 exit; 520 520 … … 523 523 Result := '/usr/share/locale/' + LangID + '/LC_MESSAGES/' + 524 524 ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), LCExt); 525 if FileExists UTF8(Result) then525 if FileExists(Result) then 526 526 exit; 527 527 {$ENDIF} … … 531 531 Result := ExtractFilePath(ParamStrUTF8(0)) + LangShortID + 532 532 DirectorySeparator + ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), LCExt); 533 if FileExists UTF8(Result) then533 if FileExists(Result) then 534 534 exit; 535 535 … … 537 537 LangShortID + DirectorySeparator + ChangeFileExt( 538 538 ExtractFileName(ParamStrUTF8(0)), LCExt); 539 if FileExists UTF8(Result) then539 if FileExists(Result) then 540 540 exit; 541 541 … … 543 543 + LangShortID + DirectorySeparator + ChangeFileExt( 544 544 ExtractFileName(ParamStrUTF8(0)), LCExt); 545 if FileExists UTF8(Result) then545 if FileExists(Result) then 546 546 exit; 547 547 … … 549 549 + LangShortID + DirectorySeparator + 'LC_MESSAGES' + DirectorySeparator + 550 550 ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), LCExt); 551 if FileExists UTF8(Result) then551 if FileExists(Result) then 552 552 exit; 553 553 … … 556 556 try 557 557 Result := ExtractFilePath(ParamStrUTF8(0)) + ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), Format(FormatLang, [LangID])) + LCExt; 558 if FileExists UTF8(Result) then558 if FileExists(Result) then 559 559 exit; 560 560 // Common location (like in Lazarus) 561 561 Result := ExtractFilePath(ParamStrUTF8(0)) + 'locale' + DirectorySeparator + 562 562 ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), Format(FormatLang, [LangID])) + LCExt; 563 if FileExists UTF8(Result) then563 if FileExists(Result) then 564 564 exit; 565 565 566 566 Result := ExtractFilePath(ParamStrUTF8(0)) + 'languages' + 567 567 DirectorySeparator + ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), Format(FormatLang, [LangID])) + LCExt; 568 if FileExists UTF8(Result) then568 if FileExists(Result) then 569 569 exit; 570 570 except … … 575 575 Result := '/usr/share/locale/' + LangShortID + '/LC_MESSAGES/' + 576 576 ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), LCExt); 577 if FileExists UTF8(Result) then577 if FileExists(Result) then 578 578 exit; 579 579 {$ENDIF} 580 580 Result := ExtractFilePath(ParamStrUTF8(0)) + ChangeFileExt( 581 581 ExtractFileName(ParamStrUTF8(0)), Format(FormatLang, [LangShortID])) + LCExt; 582 if FileExists UTF8(Result) then582 if FileExists(Result) then 583 583 exit; 584 584 585 585 Result := ExtractFilePath(ParamStrUTF8(0)) + 'locale' + DirectorySeparator + 586 586 ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), Format(FormatLang, [LangShortID])) + LCExt; 587 if FileExists UTF8(Result) then587 if FileExists(Result) then 588 588 exit; 589 589 590 590 Result := ExtractFilePath(ParamStrUTF8(0)) + 'languages' + DirectorySeparator + 591 591 ChangeFileExt(ExtractFileName(ParamStrUTF8(0)), Format(FormatLang, [LangShortID])) + LCExt; 592 if FileExists UTF8(Result) then592 if FileExists(Result) then 593 593 exit; 594 594 end;
Note:
See TracChangeset
for help on using the changeset viewer.