mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 22:00:28 +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));
|
AppDir := ExtractFilePath(ParamStrUTF8(0));
|
||||||
LCFileName := ChangeFileExt(GetLCFileName, LCExt);
|
LCFileName := ChangeFileExt(GetLCFileName, LCExt);
|
||||||
|
|
||||||
|
if Dir<>'' then
|
||||||
|
begin
|
||||||
|
Dir := AppendPathDelim(Dir);
|
||||||
|
if not FilenameIsAbsolute(Dir) then
|
||||||
|
Dir := AppDir + Dir;
|
||||||
|
end;
|
||||||
|
|
||||||
if LangID <> '' then
|
if LangID <> '' then
|
||||||
begin
|
begin
|
||||||
FullLCFileName := ChangeFileExt(GetLCFileName, '.' + LangID) + LCExt;
|
FullLCFileName := ChangeFileExt(GetLCFileName, '.' + LangID) + LCExt;
|
||||||
|
|
||||||
if Dir<>'' then
|
if Dir<>'' then
|
||||||
begin
|
begin
|
||||||
Dir := AppendPathDelim(Dir);
|
|
||||||
if not FilenameIsAbsolute(Dir) then
|
|
||||||
Dir := AppDir + Dir;
|
|
||||||
Result := Dir + LangID + DirectorySeparator + LCFileName;
|
Result := Dir + LangID + DirectorySeparator + LCFileName;
|
||||||
if FileExistsUTF8(Result) then
|
if FileExistsUTF8(Result) then
|
||||||
exit;
|
exit;
|
||||||
@ -271,6 +275,13 @@ begin
|
|||||||
if LCExt = '.po' then
|
if LCExt = '.po' then
|
||||||
LCFileName := ChangeFileExt(GetLCFileName, '.pot');
|
LCFileName := ChangeFileExt(GetLCFileName, '.pot');
|
||||||
|
|
||||||
|
if Dir<>'' then
|
||||||
|
begin
|
||||||
|
Result := Dir + LCFileName;
|
||||||
|
if FileExistsUTF8(Result) then
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
Result := AppDir + LCFileName;
|
Result := AppDir + LCFileName;
|
||||||
if FileExistsUTF8(Result) then
|
if FileExistsUTF8(Result) then
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user