mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-25 17:50:34 +01:00
LCL, translations: restored fuzzy translations handling logic after r46604 #db28db962b (we do not display fuzzy translations even if they don't have formatting errors)
git-svn-id: trunk@46610 -
This commit is contained in:
parent
721057196e
commit
5bca290b0c
@ -1004,17 +1004,17 @@ begin
|
||||
Item:=TPOFileItem(FIdentifierLowToItem[lowercase(Identifier)]);
|
||||
if Item=nil then
|
||||
Item:=TPOFileItem(FOriginalToItem.Data[OriginalValue]);
|
||||
{$IFNDEF CHECK_FORMAT}
|
||||
//Load translation only if it exists and is NOT fuzzy.
|
||||
//This matches gettext behaviour and allows to avoid a lot of crashes related
|
||||
//to formatting arguments mismatches.
|
||||
if (Item<>nil) and (pos(sFuzzyFlag, lowercase(Item.Flags))=0) then begin
|
||||
{$ELSE}
|
||||
//Load translation only if it exists and is not flagged as badformat.
|
||||
//This allows to avoid a lot of crashes related
|
||||
//to formatting arguments mismatches.
|
||||
if (Item<>nil) and (pos(sBadFormatFlag, lowercase(Item.Flags))=0) then begin
|
||||
if (Item<>nil) and (pos(sFuzzyFlag, lowercase(Item.Flags))=0)
|
||||
{$IFDEF CHECK_FORMAT}
|
||||
//Load translation only if it is not flagged as badformat.
|
||||
//This allows to avoid even more crashes related
|
||||
//to formatting arguments mismatches.
|
||||
and (pos(sBadFormatFlag, lowercase(Item.Flags))=0)
|
||||
{$ENDIF}
|
||||
then begin
|
||||
Result:=Item.Translation;
|
||||
if Result='' then RaiseGDBException('TPOFile.Translate Inconsistency');
|
||||
end else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user