From 6e58d63e161d50bae0224d4a4580e00837f1a021 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 22 Dec 2009 04:36:00 +0000 Subject: [PATCH] lcl: default translator - search section better git-svn-id: trunk@23224 - --- lcl/defaulttranslator.pas | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lcl/defaulttranslator.pas b/lcl/defaulttranslator.pas index 9be3ba5cda..9d5e4e6e38 100644 --- a/lcl/defaulttranslator.pas +++ b/lcl/defaulttranslator.pas @@ -236,7 +236,16 @@ begin s := FMOFile.Translate(Content); if s = '' then begin - Section := 'T' + UpperCase(Instance.GetNamePath) + '.' + UpperCase(PropInfo^.Name); + if not (Sender is TReader) then + Exit; + if Component = TReader(Sender).Root then + Section := UpperCase(Component.ClassName) + else + if Component.Owner = TReader(Sender).Root then + Section := UpperCase(Component.Owner.ClassName + '.' + Instance.GetNamePath) + else + Exit; + Section := Section + '.' + UpperCase(PropInfo^.Name); s := FMoFile.Translate(Section + #4 + Content); end; if s <> '' then