Skip to content

Commit

Permalink
Added initial localization parts
Browse files Browse the repository at this point in the history
  • Loading branch information
NeeeeB committed Oct 10, 2017
1 parent 6136213 commit 3a7909e
Show file tree
Hide file tree
Showing 12 changed files with 4,354 additions and 9 deletions.
4 changes: 3 additions & 1 deletion About.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ interface
uses
Winapi.Windows, Winapi.Messages,
System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls;
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls,
gnugettext;

resourcestring
Rst_Text = sLineBreak + 'GameList Editor is a tool to manage your Gamelist.xml' + sLineBreak +
Expand Down Expand Up @@ -99,6 +100,7 @@ procedure TRichEdit.CNNotify(var Message: TWMNotify);
//au create on ajoute le texte au RichEdit
procedure TFrm_About.FormCreate(Sender: TObject);
begin
TranslateComponent( Self );
Red_About.Lines.Add( Rst_Text );
end;

Expand Down
1 change: 1 addition & 0 deletions ConfigureSSH.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ object Frm_ConfigureSSH: TFrm_ConfigureSSH
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
Expand Down
9 changes: 8 additions & 1 deletion ConfigureSSH.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ interface
uses
Winapi.Windows, Winapi.Messages,
System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
gnugettext;

type
TFrm_ConfigureSSH = class(TForm)
Expand All @@ -20,6 +21,7 @@ TFrm_ConfigureSSH = class(TForm)
Btn_Save: TButton;
Btn_Cancel: TButton;
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Déclarations privées }
public
Expand Down Expand Up @@ -52,6 +54,11 @@ function TFrm_ConfigureSSH.Execute( var aRecalLogin, aRecalPwd, aRetroLogin, aRe
end;
end;

procedure TFrm_ConfigureSSH.FormCreate(Sender: TObject);
begin
TranslateComponent( Self );
end;

//à lapparition de la fenêtre on met le focus sur cancel
procedure TFrm_ConfigureSSH.FormShow(Sender: TObject);
begin
Expand Down
3 changes: 2 additions & 1 deletion GameListEditor.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ uses
MoreInfos in 'MoreInfos.pas' {Frm_MoreInfos},
About in 'About.pas' {Frm_About},
Help in 'Help.pas' {Frm_Help},
ConfigureSSH in 'ConfigureSSH.pas' {Frm_ConfigureSSH};
ConfigureSSH in 'ConfigureSSH.pas' {Frm_ConfigureSSH},
gnugettext in 'gnugettext.pas';

{$R *.res}

Expand Down
1 change: 1 addition & 0 deletions GameListEditor.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
<Form>Frm_ConfigureSSH</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="gnugettext.pas"/>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
Expand Down
1 change: 1 addition & 0 deletions Help.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ object Frm_Help: TFrm_Help
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Btn_Close: TButton
Expand Down
10 changes: 8 additions & 2 deletions Help.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ interface
uses
Winapi.Windows, Winapi.Messages,
System.SysUtils, System.Variants, System.Classes, System.IniFiles,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
Vcl.ComCtrls;
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls,
gnugettext;

resourcestring
Rst_Title1 = 'Choose your folder :';
Expand Down Expand Up @@ -86,6 +86,7 @@ TFrm_Help = class(TForm)
Chk_ShowTips: TCheckBox;
Red_Help: TRichEdit;
procedure Btn_CloseClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
procedure FormatText;
public
Expand Down Expand Up @@ -243,6 +244,11 @@ procedure TFrm_Help.FormatText;
end;
end;

procedure TFrm_Help.FormCreate(Sender: TObject);
begin
TranslateComponent( Self );
end;

//action au click sur le bouton close
procedure TFrm_Help.Btn_CloseClick(Sender: TObject);
begin
Expand Down
4 changes: 2 additions & 2 deletions Main.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ object Frm_Editor: TFrm_Editor
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'GameList Editor'
ClientHeight = 687
ClientHeight = 667
ClientWidth = 1210
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Expand Down Expand Up @@ -7111,7 +7111,7 @@ object Frm_Editor: TFrm_Editor
Left = 176
Top = 208
Bitmap = {
494C010101000800600010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
494C010101000800640010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000001000000001002000000000000010
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
Expand Down
3 changes: 2 additions & 1 deletion Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface
Vcl.ExtCtrls, Vcl.Imaging.pngimage, Vcl.Imaging.jpeg, Vcl.Menus, Vcl.ComCtrls, Vcl.StdCtrls,
Xml.omnixmldom, Xml.xmldom, Xml.XMLIntf, Xml.XMLDoc, Xml.Win.msxmldom,
IdHashMessageDigest, IdHashSHA, IdHashCRC,
MoreInfos, About, Help, ConfigureSSH;
MoreInfos, About, Help, ConfigureSSH, gnugettext;

resourcestring
Rst_WrongFolder = 'Oops !! It looks like you selected the wrong folder !' + SlineBreak +
Expand Down Expand Up @@ -884,6 +884,7 @@ function TFrm_Editor.GetThemeEnum( aNumber: Integer ): TThemeName;
//A l'ouverture du programme
procedure TFrm_Editor.FormCreate(Sender: TObject);
begin
TranslateComponent( Self );
Lbl_NbGamesFound.Caption:= '';
GSystemList:= TObjectDictionary<string, TObjectList<TGame>>.Create([doOwnsValues]);
LoadFromIni;
Expand Down
1 change: 1 addition & 0 deletions MoreInfos.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -11580,6 +11580,7 @@ object Frm_MoreInfos: TFrm_MoreInfos
00000000000000000000000000000000000000000000}
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Lbl_Playcount: TLabel
Expand Down
9 changes: 8 additions & 1 deletion MoreInfos.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ interface
uses
Winapi.Windows, Winapi.Messages,
System.SysUtils, System.Variants, System.Classes, System.DateUtils,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
gnugettext;

type
TFrm_MoreInfos = class(TForm)
Expand All @@ -21,6 +22,7 @@ TFrm_MoreInfos = class(TForm)
Lbl_Md5: TLabel;
Lbl_Sha1: TLabel;
procedure Btn_CloseClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
public
procedure Execute( aInfos: TStringList );
end;
Expand All @@ -45,6 +47,11 @@ procedure TFrm_MoreInfos.Execute( aInfos: TStringList );
ShowModal;
end;

procedure TFrm_MoreInfos.FormCreate(Sender: TObject);
begin
TranslateComponent( Self );
end;

procedure TFrm_MoreInfos.Btn_CloseClick(Sender: TObject);
begin
//Ferme la fenêtre
Expand Down
Loading

0 comments on commit 3a7909e

Please sign in to comment.