mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 00:00:16 +02:00
lcl localization from Olivier
git-svn-id: trunk@3880 -
This commit is contained in:
parent
6d6ed821e8
commit
34922c5310
@ -28,6 +28,8 @@ Property editor for TImageList objects
|
||||
|
||||
History
|
||||
26-Feb-2003 OG - Update for use assign.
|
||||
27-feb-2003 OG - If possible zoom x2 the selected image.
|
||||
- Fix the superposition of images
|
||||
|
||||
Todo :
|
||||
- Rogne and truncate image capability
|
||||
@ -92,30 +94,27 @@ Implementation
|
||||
|
||||
//If Select item, preview the image
|
||||
procedure TImageListEditorDlg.OnLVLSelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
|
||||
Var bmp : TBitMap;
|
||||
Var Bmp : TBitMap;
|
||||
begin
|
||||
if Assigned(Item) and Selected then
|
||||
begin
|
||||
if (Item.ImageIndex<>-1) then
|
||||
begin
|
||||
//Clear old image
|
||||
fImg.Picture.BitMap.Canvas.Brush.Color:=clWhite;
|
||||
fImg.Picture.BitMap.Canvas.FillRect(Rect(0,0,fImg.Width,fImg.Height));
|
||||
|
||||
//Draw new image
|
||||
//The created bitmap will be freed by fImg
|
||||
Bmp:=TBitMap.Create;
|
||||
Try
|
||||
Bmp.Width :=fImgL.Width;
|
||||
Bmp.Height:=fImgL.Height;
|
||||
Bmp.Canvas.Brush.Color:=clWhite;
|
||||
Bmp.Canvas.FillRect(0,0,Bmp.Width,Bmp.Height);
|
||||
|
||||
fImgL.GetBitmap(Item.ImageIndex,Bmp);
|
||||
fImgL.GetBitmap(Item.ImageIndex,Bmp);
|
||||
|
||||
fImg.Picture.Assign(nil);
|
||||
fImg.Picture.BitMap.Assign(Bmp);
|
||||
fImg.Picture.BitMap:=Bmp;
|
||||
|
||||
fBtnDel.Enabled:=True;
|
||||
fImg.Visible:=True;
|
||||
fBtnClear.Enabled:=True;
|
||||
finally
|
||||
Bmp.Free;
|
||||
end;
|
||||
fBtnDel.Enabled:=True;
|
||||
fImg.Visible:=True;
|
||||
fBtnClear.Enabled:=True;
|
||||
fImg.Invalidate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -227,7 +226,8 @@ constructor TImageListEditorDlg.Create(aOwner: TComponent);
|
||||
Var Cmp : TWinControl;
|
||||
begin
|
||||
inherited Create(aOwner);
|
||||
|
||||
BorderStyle:=bssingle;
|
||||
|
||||
//Temporary list
|
||||
fImgL:=TImageList.Create(self);
|
||||
|
||||
@ -382,6 +382,27 @@ begin
|
||||
IL.Caption:=IntToStr(i);
|
||||
end;
|
||||
|
||||
//If possible zoom the selected image
|
||||
if (fImgL.Width*2<97) and (fImgL.Height*2<97) then
|
||||
begin
|
||||
fImg.Width :=fImgL.Width*2;
|
||||
fImg.Height :=fImgL.Height*2;
|
||||
fImg.Stretch:=True;
|
||||
|
||||
//Center the image
|
||||
fImg.Left:=12+((97-fImg.Width) div 2);
|
||||
fImg.Top := 7+((97-fImg.Height) div 2);
|
||||
end
|
||||
else
|
||||
begin
|
||||
//Restore the default position
|
||||
fImg.Width :=97;
|
||||
fImg.Height :=97;
|
||||
fImg.Top :=7;
|
||||
fImg.Left :=12;
|
||||
fImg.Stretch:=True;
|
||||
end;
|
||||
|
||||
fBtnDel.Enabled:=(fImgL.Count<>0);
|
||||
fBtnClear.Enabled:=(fImgL.Count<>0);
|
||||
fImg.Visible:=(fImgL.Count<>0);
|
||||
|
@ -302,7 +302,7 @@ msgstr "Choisir un fichier de mod
|
||||
|
||||
#: lazarusidestrconsts:lischoosedirectory
|
||||
msgid "Choose directory"
|
||||
msgstr ""
|
||||
msgstr "Choisissez le répertoire"
|
||||
|
||||
#: lazarusidestrconsts:dlgcdtclassorder
|
||||
msgid "Class order"
|
||||
@ -934,7 +934,7 @@ msgstr "Italique"
|
||||
|
||||
#: lazarusidestrconsts:dlgoiitemheight
|
||||
msgid "Item height"
|
||||
msgstr ""
|
||||
msgstr "Heuteur d'élément"
|
||||
|
||||
#: lazarusidestrconsts:lismenujumpback
|
||||
msgid "Jump back"
|
||||
@ -1134,7 +1134,7 @@ msgstr "Politique d'insertion des m
|
||||
|
||||
#: lazarusidestrconsts:dlgminimizeallonminimizemain
|
||||
msgid "Minimize all on minimize main"
|
||||
msgstr ""
|
||||
msgstr "Réduire toutes les fenêtre en me temps que la principale"
|
||||
|
||||
#: lazarusidestrconsts:fdmmirrorhorizontal
|
||||
msgid "Mirror horizontal"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#: objinspstrconsts:sccsilcmbimglist
|
||||
msgid " Images "
|
||||
msgstr ""
|
||||
msgstr " Images "
|
||||
|
||||
#: objinspstrconsts:sccslvedtgrprcaption
|
||||
msgid " Item property "
|
||||
@ -16,7 +16,7 @@ msgstr "S
|
||||
|
||||
#: objinspstrconsts:sccsilcmbimgsel
|
||||
msgid " Selected image "
|
||||
msgstr ""
|
||||
msgstr "Image sélectionnée"
|
||||
|
||||
#: objinspstrconsts:oiscadd
|
||||
msgid "&Add"
|
||||
@ -28,15 +28,15 @@ msgstr "&Supprimer"
|
||||
|
||||
#: objinspstrconsts:sccsilbtnadd
|
||||
msgid "Add ..."
|
||||
msgstr ""
|
||||
msgstr "Ajouter ..."
|
||||
|
||||
#: objinspstrconsts:sccsilbtnclear
|
||||
msgid "Clear"
|
||||
msgstr ""
|
||||
msgstr "Effacer"
|
||||
|
||||
#: objinspstrconsts:sccsilconfirme
|
||||
msgid "Confirme clear all images ?"
|
||||
msgstr ""
|
||||
msgstr "Confirmez vous la suppression de toutes les images ?"
|
||||
|
||||
#: objinspstrconsts:sccslvedtbtndel
|
||||
msgid "Delete"
|
||||
@ -52,7 +52,7 @@ msgstr "Index d'image"
|
||||
|
||||
#: objinspstrconsts:sccsiledtcaption
|
||||
msgid "Image list editor"
|
||||
msgstr ""
|
||||
msgstr "Editeur de liste d'image"
|
||||
|
||||
#: objinspstrconsts:sccslvedtlabcaption
|
||||
msgid "Label"
|
||||
@ -76,5 +76,5 @@ msgstr "Propri
|
||||
|
||||
#: objinspstrconsts:sccslvedtbtnaddsub
|
||||
msgid "Sub item"
|
||||
msgstr ""
|
||||
msgstr "Sous élément"
|
||||
|
||||
|
@ -102,7 +102,7 @@ Begin
|
||||
Bitmap1.Handle := LoadStockPixmap(BitBtnImages[Value]);
|
||||
Glyph := Bitmap1;
|
||||
|
||||
Caption := BitBtnCaption[fKind];
|
||||
Caption :=GetCaptionOfKind(fKind);
|
||||
ModalResult := BitBtnModalResults[Value];
|
||||
if not (csLoading in ComponentState) then
|
||||
Default := FKind in [bkOk,bkYes];
|
||||
@ -125,5 +125,25 @@ Begin
|
||||
CNSendMessage(LM_LAYOUTCHANGED,Self,nil);
|
||||
end;
|
||||
|
||||
//Return the caption associed with the akind value.
|
||||
//This function replace BitBtnCaption const because the localizing
|
||||
//dont work with an const (optimisation of FPC i supose)
|
||||
function TBitBtn.GetCaptionOfKind(aKind: TBitBtnKind): String;
|
||||
begin
|
||||
Result:='';
|
||||
Case aKind of
|
||||
bkOK : Result:=rsmbOK;
|
||||
bkCancel : Result:=rsmbCancel;
|
||||
bkHelp : Result:=rsmbHelp;
|
||||
bkYes : Result:=rsmbYes;
|
||||
bkNo : Result:=rsmbNo;
|
||||
bkClose : Result:=rsmbClose;
|
||||
bkAbort : Result:=rsmbAbort;
|
||||
bkRetry : Result:=rsmbRetry;
|
||||
bkIgnore : Result:=rsmbIgnore;
|
||||
bkAll : Result:=rsmbAll;
|
||||
end;
|
||||
end;
|
||||
|
||||
// included by buttons.pp
|
||||
|
||||
|
@ -39,7 +39,7 @@ constructor TFontDialog.Create (AOwner : TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
fCompStyle := csFontDialog;
|
||||
FTitle:= 'Select a font:';
|
||||
FTitle:= rsSelectFontTitle;
|
||||
FFont := TFont.Create;
|
||||
FOptions := [fdEffects];
|
||||
end;
|
||||
@ -59,6 +59,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.5 2003/02/28 10:21:16 mattias
|
||||
lcl localization from Olivier
|
||||
|
||||
Revision 1.4 2002/10/25 10:06:34 lazarus
|
||||
MG: broke interfacebase uses circles
|
||||
|
||||
|
@ -33,10 +33,8 @@ unit LCLStrConsts;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
|
||||
ResourceString
|
||||
|
||||
rsMbYes = '&Yes';
|
||||
rsMbNo = '&No';
|
||||
rsMbOK = '&OK';
|
||||
@ -56,7 +54,25 @@ ResourceString
|
||||
rsMtConfirmation = 'Confirmation';
|
||||
rsMtCustom = 'Custom';
|
||||
|
||||
|
||||
//file dialog
|
||||
rsfdOpenFile = 'Open existing file';
|
||||
rsfdOverwriteFile = 'Overwrite file ?';
|
||||
rsfdFileAlreadyExists = 'The file "%s" already exists.'#13'Overwrite ?';
|
||||
rsfdPathMustExist = 'Path must exist';
|
||||
rsfdPathNoExist = 'The path "%s" does not exist.';
|
||||
rsfdFileMustExist = 'File must exist';
|
||||
rsfdFileNotExist = 'The file "%s" does not exist.';
|
||||
rsfdFileReadOnlyTitle = 'File is not writable';
|
||||
rsfdFileReadOnly = 'The file "%s" is not writable.';
|
||||
rsfdFileSaveAs = 'Save file as';
|
||||
|
||||
//Select color dialog
|
||||
rsSelectcolorTitle = 'Select color';
|
||||
|
||||
//Select font dialog
|
||||
rsSelectFontTitle = 'Select a font';
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user