Changeset 15 for trunk


Ignore:
Timestamp:
Feb 11, 2012, 6:45:36 PM (13 years ago)
Author:
chronos
Message:
  • Added: Support for multiple interface languages.
  • Added: Used packages as zip archives.
Location:
trunk
Files:
10 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LazFuckIDE.lpi

    r14 r15  
    1313    </General>
    1414    <i18n>
    15       <EnableI18N LFM="False"/>
     15      <EnableI18N Value="True"/>
     16      <OutDir Value="Languages"/>
    1617    </i18n>
    1718    <VersionInfo>
     
    3233      </local>
    3334    </RunParams>
    34     <RequiredPackages Count="4">
     35    <RequiredPackages Count="5">
    3536      <Item1>
    36         <PackageName Value="TemplateGenerics"/>
     37        <PackageName Value="CoolTranslator"/>
    3738      </Item1>
    3839      <Item2>
    39         <PackageName Value="Common"/>
     40        <PackageName Value="TemplateGenerics"/>
    4041      </Item2>
    4142      <Item3>
    42         <PackageName Value="SynEdit"/>
     43        <PackageName Value="Common"/>
    4344      </Item3>
    4445      <Item4>
     46        <PackageName Value="SynEdit"/>
     47      </Item4>
     48      <Item5>
    4549        <PackageName Value="LCL"/>
    46       </Item4>
     50      </Item5>
    4751    </RequiredPackages>
    4852    <Units Count="7">
  • trunk/LazFuckIDE.lpr

    r14 r15  
    1010  Interfaces, // this includes the LCL widgetset
    1111  Forms, UMainForm, UBrainFuck, UInterpreterForm, UApplicationInfo,
    12 UCompiledForm, UOptionsForm, Common, TemplateGenerics
     12UCompiledForm, UOptionsForm, CoolTranslator, Common, TemplateGenerics
    1313  { you can add units after this };
    1414
  • trunk/UInterpreterForm.lfm

    r12 r15  
    44  Top = 127
    55  Width = 762
    6   Caption = 'Runtime'
     6  Caption = 'Interpretter'
    77  ClientHeight = 509
    88  ClientWidth = 762
     
    3131        Left = 8
    3232        Height = 210
    33         Top = 24
     33        Top = 22
    3434        Width = 309
    3535        Anchors = [akTop, akLeft, akRight, akBottom]
  • trunk/UMainForm.lfm

    r13 r15  
    525525      object MenuItem22: TMenuItem
    526526        Action = AOptions
     527        Bitmap.Data = {
     528          36040000424D3604000000000000360000002800000010000000100000000100
     529          2000000000000004000064000000640000000000000000000000986B37FF976A
     530          36FF966935FF966734FF956633FF946532FF946531FF936430FF92622FFF9261
     531          2EFF91602DFF90602CFF905F2BFF8F5D2AFF8E5C29FF8D5B28FF996C38FFF8F7
     532          F6FFF8F7F5FFF7F6F5FFF6F6F4FFF6F5F3FFF5F5F3FFF5F4F2FFF4F3F1FFF4F3
     533          F1FFF3F2F0FFF3F2EFFFF2F1EFFFF2F0EEFFF1F0EDFF8E5D29FF996D3AFFF9F8
     534          F7FF959594FF878787FF9B9A9AFFF7F6F4FFF6F5F3FFF6F5F3FFF5F4F2FFF4F3
     535          F1FFF4F3F1FFF3F2F0FFF3F2EFFFF2F1EFFFF2F1EEFF8F5E2AFF9A6E3BFFF9F9
     536          F8FF7C7C7CFFC4C4C4FF878787FFF7F6F5FF7A7A7AFF787878FF747474FF7171
     537          70FF6D6D6CFF696968FF656565FF616161FFF2F1EFFF905F2BFF9B6F3CFFFAF9
     538          F8FFBEBEBDFF929292FFBCBCBBFFF8F7F6FFF7F7F5FFF7F6F4FFF6F5F4FFF6F5
     539          F3FFF5F4F2FFF5F4F2FFF4F3F1FFF4F2F0FFF3F2F0FF91602DFF9C703DFFFAFA
     540          F9FFFAF9F9FFF9F9F8FFF9F8F7FFF8F8F7FFF8F7F6FFF7F7F5FFF7F6F5FFF6F5
     541          F4FFF6F5F3FFF5F4F3FFF5F4F2FFF4F3F1FFF4F3F0FF92612EFF9D723EFFFBFB
     542          FAFF9F9F9EFF7F7F7FFFAEAEADFFF9F8F7FFF8F8F7FFF8F7F6FFF7F7F5FFF7F6
     543          F5FFF6F6F4FFF6F5F3FFF5F4F3FFF5F4F2FFF4F3F1FF92622FFF9D7340FFFCFB
     544          FBFF818181FFC4C4C4FF8F8F8FFFFAF9F8FF7B7B7AFF797979FF757574FF7271
     545          71FF6D6D6DFF696969FF666665FF626261FFF5F4F2FF936430FF9E7441FFFCFC
     546          FCFFB5B5B5FF848484FFBEBDBDFFFAFAF9FFFAF9F8FFF9F9F7FFF9F8F7FFF8F8
     547          F6FFF8F7F5FFF7F6F5FFF7F6F4FFF6F5F3FFF6F5F3FF946531FF9F7542FFFDFD
     548          FCFFFCFCFCFFFCFCFBFFFBFBFAFFFBFAFAFFFAFAF9FFFAF9F8FFF9F9F8FFF9F8
     549          F7FFF8F8F6FFF8F7F6FFF7F6F5FFF7F6F4FFF6F5F4FF956633FFA07643FFFEFD
     550          FDFF8C8C8CFF525252FFA4A4A4FFFBFBFAFFFBFBFAFFFAFAF9FFFAF9F8FFF9F9
     551          F8FFF9F8F7FFF8F8F6FFF8F7F6FFF7F7F5FFF7F6F4FF966734FFA17844FFFEFE
     552          FEFF5F5F5FFF949494FF535353FFFCFCFBFF7B7B7BFF797979FF757575FF7272
     553          72FF6E6E6EFF6A6A69FF666666FF626262FFF7F7F5FF966935FFA17946FFFFFF
     554          FFFF878787FF5D5D5DFFA0A0A0FFFDFCFCFFFCFCFBFFFCFBFBFFFBFBFAFFFBFA
     555          F9FFFAFAF9FFFAF9F8FFF9F8F7FFF8F8F7FFF8F7F6FF976A36FFA27A47FFFFFF
     556          FFFFFFFFFFFFFEFEFEFFFEFEFEFFFDFDFDFFFDFDFCFFFCFCFBFFFCFBFBFFFBFB
     557          FAFFFBFAF9FFFAFAF9FFFAF9F8FFF9F9F7FFF9F8F7FF986B37FFA37B48FFBEA2
     558          7FFFBEA17EFFBDA17DFFBDA07CFFBD9F7CFFBC9F7BFFBB9E7AFFBB9D7AFFBB9D
     559          79FFBA9C78FFB99B78FFB99A77FFB89A76FFB89975FF996C39FFA37B48FFA37B
     560          48FFA27A47FFA27946FFA17845FFA07744FFA07643FF9F7542FF9E7441FF9E73
     561          40FF9D723FFF9C713EFF9C703DFF9B6F3CFF9A6E3BFF9A6D3AFF
     562        }
    527563      end
    528564      object MenuItem19: TMenuItem
     
    10811117    top = 208
    10821118  end
     1119  object CoolTranslator1: TCoolTranslator
     1120    POFilesFolder = 'Languages'
     1121    left = 362
     1122    top = 216
     1123  end
    10831124end
  • trunk/UMainForm.pas

    r14 r15  
    77uses
    88  Classes, SysUtils, FileUtil, SynEdit, Forms, Controls, Graphics, Dialogs,
    9   Menus, ActnList, StdCtrls, ComCtrls, UBrainFuck, SpecializedList;
     9  Menus, ActnList, StdCtrls, ComCtrls, UBrainFuck, UCoolTranslator,
     10  SpecializedList;
    1011
    1112type
     
    3637    AProjectOpen: TAction;
    3738    ActionList1: TActionList;
     39    CoolTranslator1: TCoolTranslator;
    3840    ImageList1: TImageList;
    3941    MainMenu1: TMainMenu;
     
    190192  BrainFuckInterpreter.OnChangeState := BrainFuckInterpreterChangeState;
    191193  BrainFuckCompiler := TBrainFuckCompiler.Create;
     194  CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('cs');
    192195end;
    193196
  • trunk/UOptionsForm.lfm

    r14 r15  
    77  ClientHeight = 279
    88  ClientWidth = 468
     9  OnShow = FormShow
    910  LCLVersion = '0.9.31'
    1011  object ButtonOk: TButton
     
    1617    Caption = 'Ok'
    1718    ModalResult = 1
     19    OnClick = ButtonOkClick
    1820    TabOrder = 0
    1921  end
     
    4143    Top = 6
    4244    Width = 130
    43     MaxValue = 65535
     45    MaxValue = 2000000000
    4446    TabOrder = 2
    4547  end
     
    5759    Top = 40
    5860    Width = 130
    59     MaxValue = 65535
     61    MaxValue = 2000000000
    6062    TabOrder = 3
    6163  end
     64  object Label3: TLabel
     65    Left = 8
     66    Height = 18
     67    Top = 95
     68    Width = 127
     69    Caption = 'Interface language:'
     70    ParentColor = False
     71  end
     72  object ComboBoxLanguage: TComboBox
     73    Left = 162
     74    Height = 27
     75    Top = 86
     76    Width = 188
     77    ItemHeight = 0
     78    Style = csDropDownList
     79    TabOrder = 4
     80  end
    6281end
  • trunk/UOptionsForm.pas

    r14 r15  
    1616    ButtonOk: TButton;
    1717    ButtonCancel: TButton;
     18    ComboBoxLanguage: TComboBox;
    1819    Label1: TLabel;
    1920    Label2: TLabel;
     21    Label3: TLabel;
    2022    SpinEditCellSize: TSpinEdit;
    2123    SpinEditMemorySize: TSpinEdit;
     24    procedure ButtonOkClick(Sender: TObject);
     25    procedure FormShow(Sender: TObject);
    2226  private
    2327    { private declarations }
     
    3438{$R *.lfm}
    3539
     40uses
     41  UMainForm, ULanguages;
     42
    3643{ TOptionsForm }
     44
     45procedure TOptionsForm.FormShow(Sender: TObject);
     46begin
     47  MainForm.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items);
     48  ComboBoxLanguage.ItemIndex := MainForm.CoolTranslator1.Languages.IndexOf(MainForm.CoolTranslator1.Language);
     49  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
     50end;
     51
     52procedure TOptionsForm.ButtonOkClick(Sender: TObject);
     53begin
     54  if ComboBoxLanguage.ItemIndex <> -1 then
     55    MainForm.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
     56end;
    3757
    3858procedure TOptionsForm.LoadFromInterpretter(Interpretter: TBrainFuckInterpretter
Note: See TracChangeset for help on using the changeset viewer.