mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 05:09:33 +02:00
LCLTranslator: removed superfluous exception handling from FindLocaleFileName function
git-svn-id: trunk@61611 -
This commit is contained in:
parent
0e01330dd2
commit
14ccbadf1f
@ -218,31 +218,26 @@ begin
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
|
||||
//Full language in file name - this will be default for the project
|
||||
//We need more careful handling, as it MAY result in incorrect filename
|
||||
try
|
||||
if Dir<>'' then
|
||||
begin
|
||||
Result := Dir + FullLCFileName;
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
end;
|
||||
|
||||
Result := AppDir + FullLCFileName;
|
||||
if Dir<>'' then
|
||||
begin
|
||||
Result := Dir + FullLCFileName;
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
|
||||
//Common location (like in Lazarus)
|
||||
Result := AppDir + 'locale' + DirectorySeparator + FullLCFileName;
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
|
||||
Result := AppDir + 'languages' + DirectorySeparator + FullLCFileName;
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
except
|
||||
Result := '';//Or do something else (useless)
|
||||
end;
|
||||
|
||||
Result := AppDir + FullLCFileName;
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
|
||||
//Common location (like in Lazarus)
|
||||
Result := AppDir + 'locale' + DirectorySeparator + FullLCFileName;
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
|
||||
Result := AppDir + 'languages' + DirectorySeparator + FullLCFileName;
|
||||
if FileExistsUTF8(Result) then
|
||||
exit;
|
||||
|
||||
{$IFDEF UNIX}
|
||||
Result := '/usr/share/locale/' + LangShortID + '/LC_MESSAGES/' +
|
||||
LCFileName;
|
||||
|
Loading…
Reference in New Issue
Block a user