mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:28:19 +02:00
LCLTranslator: search for master PO (.pot) file in user specified directory too, just like we do for regular PO files
git-svn-id: trunk@61605 -
This commit is contained in:
parent
06630d0699
commit
b516684cc1
@ -142,15 +142,19 @@ begin
|
||||
AppDir := ExtractFilePath(ParamStrUTF8(0));
|
||||
LCFileName := ChangeFileExt(GetLCFileName, LCExt);
|
||||
|
||||
if Dir<>'' then
|
||||
begin
|
||||
Dir := AppendPathDelim(Dir);
|
||||
if not FilenameIsAbsolute(Dir) then
|
||||
Dir := AppDir + Dir;
|
||||
end;
|
||||
|
||||
if LangID <> '' then
|
||||
begin
|
||||
FullLCFileName := ChangeFileExt(GetLCFileName, '.' + LangID) + LCExt;
|
||||
|
||||
if Dir<>'' then
|
||||
begin
|
||||
Dir := AppendPathDelim(Dir);
|
||||
if not FilenameIsAbsolute(Dir) then
|
||||
Dir := AppDir + Dir;
|
||||
Result := Dir + LangID + DirectorySeparator + LCFileName;
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
@ -271,6 +275,13 @@ begin
|
||||
if LCExt = '.po' then
|
||||
LCFileName := ChangeFileExt(GetLCFileName, '.pot');
|
||||
|
||||
if Dir<>'' then
|
||||
begin
|
||||
Result := Dir + LCFileName;
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
end;
|
||||
|
||||
Result := AppDir + LCFileName;
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user