mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 19:59:17 +02:00
added synedit localization
git-svn-id: trunk@3914 -
This commit is contained in:
parent
bb739f5f46
commit
722e18f899
@ -295,10 +295,10 @@ type
|
|||||||
function GetStrValueAt(Index:Integer):AnsiString;
|
function GetStrValueAt(Index:Integer):AnsiString;
|
||||||
function GetVarValue:Variant;
|
function GetVarValue:Variant;
|
||||||
function GetVarValueAt(Index:Integer):Variant;
|
function GetVarValueAt(Index:Integer):Variant;
|
||||||
procedure SetFloatValue(NewValue:Extended);
|
procedure SetFloatValue(const NewValue:Extended);
|
||||||
procedure SetMethodValue(const NewValue:TMethod);
|
procedure SetMethodValue(const NewValue:TMethod);
|
||||||
procedure SetInt64Value(NewValue:Int64);
|
procedure SetInt64Value(const NewValue:Int64);
|
||||||
procedure SetOrdValue(NewValue:Longint);
|
procedure SetOrdValue(const NewValue:Longint);
|
||||||
procedure SetStrValue(const NewValue:AnsiString);
|
procedure SetStrValue(const NewValue:AnsiString);
|
||||||
procedure SetVarValue(const NewValue:Variant);
|
procedure SetVarValue(const NewValue:Variant);
|
||||||
procedure Modified;
|
procedure Modified;
|
||||||
@ -1683,10 +1683,120 @@ begin
|
|||||||
PropertyHook.Modified;
|
PropertyHook.Modified;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPropertyEditor.SetFloatValue(NewValue:Extended);
|
procedure TPropertyEditor.SetFloatValue(const NewValue:Extended);
|
||||||
var
|
var
|
||||||
I:Integer;
|
I:Integer;
|
||||||
Changed: boolean;
|
Changed: boolean;
|
||||||
|
|
||||||
|
Function CallExtendedProc(s : Pointer;Address : Pointer;Value : Extended; INdex,IVAlue : Longint) : Integer;assembler;
|
||||||
|
asm
|
||||||
|
movl S,%esi
|
||||||
|
movl Address,%edi
|
||||||
|
// Push value to set
|
||||||
|
leal Value,%eax
|
||||||
|
pushl (%eax)
|
||||||
|
pushl 4(%eax)
|
||||||
|
pushl 8(%eax)
|
||||||
|
// ? Indexed Procedure
|
||||||
|
movl Index,%eax
|
||||||
|
testl %eax,%eax
|
||||||
|
je .LIPNoPush
|
||||||
|
movl IValue,%eax
|
||||||
|
pushl %eax
|
||||||
|
.LIPNoPush:
|
||||||
|
push %esi
|
||||||
|
call %edi
|
||||||
|
end;
|
||||||
|
|
||||||
|
Function CallSingleProc(s : Pointer;Address : Pointer;Value : Single; INdex,IVAlue : Longint) : Integer;assembler;
|
||||||
|
asm
|
||||||
|
movl S,%esi
|
||||||
|
movl Address,%edi
|
||||||
|
// Push value to set
|
||||||
|
leal Value,%eax
|
||||||
|
pushl (%eax)
|
||||||
|
// ? Indexed Procedure
|
||||||
|
movl Index,%eax
|
||||||
|
testl %eax,%eax
|
||||||
|
je .LIPNoPush
|
||||||
|
movl IValue,%eax
|
||||||
|
pushl %eax
|
||||||
|
.LIPNoPush:
|
||||||
|
push %esi
|
||||||
|
call %edi
|
||||||
|
end;
|
||||||
|
|
||||||
|
Function CallDoubleProc(s : Pointer;Address : Pointer;Value : Double; INdex,IVAlue : Longint) : Integer;assembler;
|
||||||
|
asm
|
||||||
|
movl S,%esi
|
||||||
|
movl Address,%edi
|
||||||
|
// Push value to set
|
||||||
|
leal Value,%eax
|
||||||
|
pushl (%eax)
|
||||||
|
pushl (%eax)
|
||||||
|
// ? Indexed Procedure
|
||||||
|
movl Index,%eax
|
||||||
|
testl %eax,%eax
|
||||||
|
je .LIPNoPush
|
||||||
|
movl IValue,%eax
|
||||||
|
pushl %eax
|
||||||
|
.LIPNoPush:
|
||||||
|
push %esi
|
||||||
|
call %edi
|
||||||
|
end;
|
||||||
|
|
||||||
|
Procedure SetIndexValues (P: PPRopInfo; Var Index,IValue : Longint);
|
||||||
|
|
||||||
|
begin
|
||||||
|
Index:=((P^.PropProcs shr 6) and 1);
|
||||||
|
If Index<>0 then
|
||||||
|
IValue:=P^.Index
|
||||||
|
else
|
||||||
|
IValue:=0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Procedure MySetFloatProp(Instance : TObject;PropInfo : PPropInfo;
|
||||||
|
Value : Extended);
|
||||||
|
|
||||||
|
Var IValue,Index : longint;
|
||||||
|
|
||||||
|
begin
|
||||||
|
SetIndexValues(PropInfo,Index,Ivalue);
|
||||||
|
writeln('MySetFloatProp A ',Index,' ',IValue,' ',(PropInfo^.PropProcs shr 2) and 3,' ',ftSingle=GetTypeData(PropInfo^.PropType)^.FloatType,' ',Value);
|
||||||
|
case (PropInfo^.PropProcs shr 2) and 3 of
|
||||||
|
ptfield:
|
||||||
|
Case GetTypeData(PropInfo^.PropType)^.FloatType of
|
||||||
|
ftSingle:
|
||||||
|
PSingle(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Value;
|
||||||
|
ftDouble:
|
||||||
|
PDouble(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Value;
|
||||||
|
ftExtended:
|
||||||
|
PExtended(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Value;
|
||||||
|
{$ifndef m68k}
|
||||||
|
ftcomp:
|
||||||
|
PComp(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Comp(Value);
|
||||||
|
{$endif m68k}
|
||||||
|
{ Uncommenting this code results in a internal error!!
|
||||||
|
ftFixed16:
|
||||||
|
PFixed16(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Value;
|
||||||
|
ftfixed32:
|
||||||
|
PFixed32(Pointer(Instance)+Longint(PropInfo^.SetProc))^:=Value;
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
ptstatic:
|
||||||
|
Case GetTypeData(PropInfo^.PropType)^.FloatType of
|
||||||
|
ftSingle:
|
||||||
|
CallSingleProc(Instance,PropInfo^.SetProc,Value,Index,IValue);
|
||||||
|
ftDouble:
|
||||||
|
CallDoubleProc(Instance,PropInfo^.SetProc,Value,Index,IValue);
|
||||||
|
ftExtended:
|
||||||
|
CallExtendedProc(Instance,PropInfo^.SetProc,Value,Index,IValue);
|
||||||
|
end;
|
||||||
|
ptvirtual:
|
||||||
|
CallExtendedProc(Instance,PPointer(Pointer(Instance.ClassType)+Longint(PropInfo^.SetProc))^,Value,Index,IValue);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Changed:=false;
|
Changed:=false;
|
||||||
for I:=0 to FPropCount-1 do
|
for I:=0 to FPropCount-1 do
|
||||||
@ -1694,7 +1804,7 @@ begin
|
|||||||
Changed:=Changed or (GetFloatProp(Instance,PropInfo)<>NewValue);
|
Changed:=Changed or (GetFloatProp(Instance,PropInfo)<>NewValue);
|
||||||
if Changed then begin
|
if Changed then begin
|
||||||
for I:=0 to FPropCount-1 do
|
for I:=0 to FPropCount-1 do
|
||||||
with FPropList^[I] do SetFloatProp(Instance,PropInfo,NewValue);
|
with FPropList^[I] do MySetFloatProp(Instance,PropInfo,NewValue);
|
||||||
Modified;
|
Modified;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1718,7 +1828,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPropertyEditor.SetOrdValue(NewValue:Longint);
|
procedure TPropertyEditor.SetOrdValue(const NewValue:Longint);
|
||||||
var
|
var
|
||||||
I:Integer;
|
I:Integer;
|
||||||
Changed: boolean;
|
Changed: boolean;
|
||||||
@ -1816,7 +1926,7 @@ begin
|
|||||||
with FPropList^[Index] do Result:=GetInt64Prop(Instance,PropInfo);
|
with FPropList^[Index] do Result:=GetInt64Prop(Instance,PropInfo);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPropertyEditor.SetInt64Value(NewValue:Int64);
|
procedure TPropertyEditor.SetInt64Value(const NewValue:Int64);
|
||||||
var
|
var
|
||||||
I:Integer;
|
I:Integer;
|
||||||
Changed: boolean;
|
Changed: boolean;
|
||||||
@ -2172,7 +2282,9 @@ end;
|
|||||||
|
|
||||||
procedure TFloatPropertyEditor.SetValue(const NewValue: ansistring);
|
procedure TFloatPropertyEditor.SetValue(const NewValue: ansistring);
|
||||||
begin
|
begin
|
||||||
|
writeln('TFloatPropertyEditor.SetValue A ',NewValue,' ',StrToFloat(NewValue));
|
||||||
SetFloatValue(StrToFloat(NewValue));
|
SetFloatValue(StrToFloat(NewValue));
|
||||||
|
writeln('TFloatPropertyEditor.SetValue B ',GetValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TStringPropertyEditor }
|
{ TStringPropertyEditor }
|
||||||
|
@ -29,6 +29,7 @@ end;
|
|||||||
|
|
||||||
procedure TSpinEdit.SetMaxValue(const AValue: single);
|
procedure TSpinEdit.SetMaxValue(const AValue: single);
|
||||||
begin
|
begin
|
||||||
|
writeln('TSpinEdit.SetMaxValue ',AValue);
|
||||||
if FMaxValue=AValue then exit;
|
if FMaxValue=AValue then exit;
|
||||||
FMaxValue:=AValue;
|
FMaxValue:=AValue;
|
||||||
UpdateControl;
|
UpdateControl;
|
||||||
|
20
localize.sh
20
localize.sh
@ -28,7 +28,7 @@ for lang in de ru es fr; do
|
|||||||
msgfmt languages/lazaruside.$lang.po -o languages/lazaruside.$lang.mo
|
msgfmt languages/lazaruside.$lang.po -o languages/lazaruside.$lang.mo
|
||||||
done
|
done
|
||||||
|
|
||||||
# objectinspector
|
# Object Inspector
|
||||||
rstconv -i objinspstrconsts.rst -o languages/objinspstrconsts.po
|
rstconv -i objinspstrconsts.rst -o languages/objinspstrconsts.po
|
||||||
tools/updatepofiles languages/objinspstrconsts.po
|
tools/updatepofiles languages/objinspstrconsts.po
|
||||||
for lang in de es fr ru; do
|
for lang in de es fr ru; do
|
||||||
@ -45,6 +45,24 @@ for lang in de fr; do
|
|||||||
-o components/codetools/languages/codetools.$lang.mo
|
-o components/codetools/languages/codetools.$lang.mo
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# SynEdit
|
||||||
|
rstconv -i components/units/syneditstrconst.rst \
|
||||||
|
-o components/synedit/languages/synedit.po
|
||||||
|
./tools/updatepofiles components/synedit/languages/synedit.po
|
||||||
|
for lang in de; do
|
||||||
|
msgfmt components/synedit/languages/synedit.$lang.po \
|
||||||
|
-o components/synedit/languages/synedit.$lang.mo
|
||||||
|
done
|
||||||
|
|
||||||
|
# SynMacroRecorder
|
||||||
|
rstconv -i components/units/synmacrorecorder.rst \
|
||||||
|
-o components/synedit/languages/synmacrorecorder.po
|
||||||
|
./tools/updatepofiles components/synedit/languages/synmacrorecorder.po
|
||||||
|
for lang in de; do
|
||||||
|
msgfmt components/synedit/languages/synmacrorecorder.$lang.po \
|
||||||
|
-o components/synedit/languages/synmacrorecorder.$lang.mo
|
||||||
|
done
|
||||||
|
|
||||||
# LCL
|
# LCL
|
||||||
rstconv -i lcl/units/lclstrconsts.rst -o lcl/languages/lcl.po
|
rstconv -i lcl/units/lclstrconsts.rst -o lcl/languages/lcl.po
|
||||||
./tools/updatepofiles lcl/languages/lcl.po
|
./tools/updatepofiles lcl/languages/lcl.po
|
||||||
|
Loading…
Reference in New Issue
Block a user