Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mame/2795188 to your computer and use it in GitHub Desktop.
Save mame/2795188 to your computer and use it in GitHub Desktop.
RubyInstaller multi-lang support patch
From 0083081b32fa1e69e565d16de9120218f03acdd1 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@tsg.ne.jp>
Date: Sun, 27 May 2012 05:14:03 +0900
Subject: [PATCH] Multi-language support and Japanese support.
---
resources/installer/languages/jp.isl | 30 ++++++++++++++++++++++++++++++
resources/installer/ri_gui.iss | 31 +++++++++++++------------------
resources/installer/rubyinstaller.iss | 16 ++++++++++++++++
3 files changed, 59 insertions(+), 18 deletions(-)
create mode 100755 resources/installer/languages/jp.isl
diff --git a/resources/installer/languages/jp.isl b/resources/installer/languages/jp.isl
new file mode 100755
index 0000000..097e91e
--- /dev/null
+++ b/resources/installer/languages/jp.isl
@@ -0,0 +1,30 @@
+[Languages]
+Name: jp; MessagesFile: compiler:Languages\Japanese.isl
+
+[Messages]
+jp.WelcomeLabel1=[name] Installer の開始
+jp.WelcomeLabel2=このプログラムはご使用のコンピュータへ [name/ver] をインストールします。%n%n続行する前に他のアプリケーションをすべて終了してください。
+jp.WizardLicense={#InstallerName} 使用許諾契約書の同意
+jp.LicenseLabel=
+jp.LicenseLabel3=以下の使用許諾契約書をお読みください。インストールを続行するにはこの条項に同意する必要があります。
+jp.LicenseAccepted=同意する(&A)
+jp.LicenseNotAccepted=同意しない(&D)
+jp.WizardSelectDir=インストール先とオプションの指定
+jp.SelectDirDesc=
+jp.SelectDirLabel3=以下のフォルダに [name] をインストールします。%n続けるには「次へ」をクリックしてください。別のフォルダを選択するには「参照」をクリックしてください。
+jp.SelectDirBrowseLabel=スペースを含むフォルダ名は避けてください。(悪い例: Program Files)
+jp.DiskSpaceMBLabel=必要なディスク空き容量: 〜 [mb] MB
+
+[CustomMessages]
+jp.InstallTclTk=Tcl/Tk サポートをインストールする
+jp.InstallTclTkHint=Ruby とともに Tcl/Tk GUI 作成ツールキットをインストールします。%nインストールすると、Ruby で GUI アプリケーションが作成できます。
+jp.AddPath=Ruby の実行ファイルへ環境変数 PATH を設定する
+jp.AddPathHint=どこからでも Ruby を実行できるようします。%nすでに Ruby がインストールされていると競合するかもしれません。
+jp.AssociateExt=.rb と .rbw ファイルを Ruby に関連づける
+jp.AssociateExtHint=ダブルクリックや、シェルプロンプトでスクリプト名を打つだけで%nRuby スクリプトを実行できるようにします。%nすでに Ruby がインストールされていると競合するかもしれません。
+jp.MouseoverHint=ヒント: 上記のオプションにマウスカーソルをあてると詳しい情報が出ます。
+jp.WebSiteLabel=Web サイト:
+SupportGroupLabel=サポート:
+jp.WikiLabel=Wiki:
+jp.IntroductionDevKitLabel=ネイティブの C RubyGems をビルドするためのツールキットが必要なら
+jp.DevKitLabel=DevKit:
diff --git a/resources/installer/ri_gui.iss b/resources/installer/ri_gui.iss
index cf8268b..6421174 100644
--- a/resources/installer/ri_gui.iss
+++ b/resources/installer/ri_gui.iss
@@ -82,10 +82,8 @@ begin
TclTkChkBox := TCheckBox.Create(Page);
TclTkChkBox.Parent := Page.Surface;
TclTkChkBox.State := cbUnchecked;
- TclTkChkBox.Caption := 'Install Tcl/Tk support';
- TclTkChkBox.Hint := 'Select to install a Tcl/Tk GUI building toolkit for this' #13 +
- 'Ruby installation. This option enables you to develop' #13 +
- 'GUI applications in Ruby.';
+ TclTkChkBox.Caption := CustomMessage('InstallTclTk');
+ TclTkChkBox.Hint := CustomMessage('InstallTclTkHint');
TclTkChkBox.ShowHint := True;
TclTkChkBox.Alignment := taRightJustify;
TclTkChkBox.Top := ScaleY(ChkBoxBaseY);
@@ -98,9 +96,8 @@ begin
PathChkBox := TCheckBox.Create(Page);
PathChkBox.Parent := Page.Surface;
PathChkBox.State := cbUnchecked;
- PathChkBox.Caption := 'Add Ruby executables to your PATH';
- PathChkBox.Hint := 'Select to make this Ruby installation available from everywhere.' #13 +
- 'This may affect existing Ruby installations.';
+ PathChkBox.Caption := CustomMessage('AddPath');
+ PathChkBox.Hint := CustomMessage('AddPathHint');
PathChkBox.ShowHint := True;
PathChkBox.Alignment := taRightJustify;
PathChkBox.Top := ScaleY(ChkBoxCurrentY);
@@ -112,10 +109,8 @@ begin
PathExtChkBox := TCheckBox.Create(Page);
PathExtChkBox.Parent := Page.Surface;
PathExtChkBox.State := cbUnchecked;
- PathExtChkBox.Caption := 'Associate .rb and .rbw files with this Ruby installation';
- PathExtChkBox.Hint := 'Select to enable running your Ruby scripts by double clicking' #13 +
- 'or simply typing the script name at your shell prompt. This may' #13 +
- 'affect existing Ruby installations.';
+ PathExtChkBox.Caption := CustomMessage('AssociateExt');
+ PathExtChkBox.Hint := CustomMessage('AssociateExtHint');
PathExtChkBox.ShowHint := True;
PathExtChkBox.Alignment := taRightJustify;
PathExtChkBox.Top := ScaleY(ChkBoxCurrentY);
@@ -131,7 +126,7 @@ begin
TmpLabel.Left := ScaleX(6);
TmpLabel.Width := Page.SurfaceWidth;
TmpLabel.WordWrap := True;
- TmpLabel.Caption := 'TIP: Mouse over the above options for more detailed information.';
+ TmpLabel.Caption := CustomMessage('MouseoverHint');
ParseSilentTasks;
@@ -145,7 +140,7 @@ begin
TmpLabel.Top := ScaleY(180);
TmpLabel.Left := ScaleX(176);
TmpLabel.AutoSize := True;
- TmpLabel.Caption := 'Web Site:';
+ TmpLabel.Caption := CustomMessage('WebSiteLabel');
URLText := TNewStaticText.Create(HostPage);
URLText.Parent := HostPage;
@@ -162,7 +157,7 @@ begin
TmpLabel.Top := ScaleY(196);
TmpLabel.Left := ScaleX(176);
TmpLabel.AutoSize := True;
- TmpLabel.Caption := 'Support group:';
+ TmpLabel.Caption := CustomMessage('SupportGroupLabel');
URLText := TNewStaticText.Create(HostPage);
URLText.Parent := HostPage;
@@ -179,7 +174,7 @@ begin
TmpLabel.Top := ScaleY(212);
TmpLabel.Left := ScaleX(176);
TmpLabel.AutoSize := True;
- TmpLabel.Caption := 'Wiki:';
+ TmpLabel.Caption := CustomMessage('WikiLabel');
URLText := TNewStaticText.Create(HostPage);
URLText.Parent := HostPage;
@@ -196,14 +191,14 @@ begin
TmpLabel.Top := ScaleY(245);
TmpLabel.Left := ScaleX(176);
TmpLabel.AutoSize := True;
- TmpLabel.Caption := 'How about a toolkit for building native C RubyGems?';
+ TmpLabel.Caption := CustomMessage('IntroductionDevKitLabel');
TmpLabel := TNewStaticText.Create(HostPage);
TmpLabel.Parent := HostPage;
TmpLabel.Top := ScaleY(260);
TmpLabel.Left := ScaleX(176);
TmpLabel.AutoSize := True;
- TmpLabel.Caption := 'DevKit:';
+ TmpLabel.Caption := CustomMessage('DevKitLabel');
URLText := TNewStaticText.Create(HostPage);
URLText.Parent := HostPage;
@@ -219,5 +214,5 @@ end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpSelectDir then
- WizardForm.NextButton.Caption := '&Install';
+ WizardForm.NextButton.Caption := SetupMessage(msgButtonInstall);
end;
diff --git a/resources/installer/rubyinstaller.iss b/resources/installer/rubyinstaller.iss
index 8c4dd46..9cca9c2 100644
--- a/resources/installer/rubyinstaller.iss
+++ b/resources/installer/rubyinstaller.iss
@@ -116,6 +116,22 @@ en.SelectDirLabel3=Setup will install [name] into the following folder. Click In
en.SelectDirBrowseLabel=Please avoid any folder name that contains spaces (e.g. Program Files).
en.DiskSpaceMBLabel=Required free disk space: ~[mb] MB
+[CustomMessages]
+InstallTclTk=Install Tcl/Tk support
+InstallTclTkHint=Select to install a Tcl/Tk GUI building toolkit for this%nRuby installation. This option enables you to develop%nGUI applications in Ruby.
+AddPath=Add Ruby executables to your PATH
+AddPathHint=Select to make this Ruby installation available from everywhere.%nThis may affect existing Ruby installations.
+AssociateExt=Associate .rb and .rbw files with this Ruby installation
+AssociateExtHint=Select to enable running your Ruby scripts by double clicking%nor simply typing the script name at your shell prompt. This may%naffect existing Ruby installations.
+MouseoverHint=TIP: Mouse over the above options for more detailed information.
+WebSiteLabel=Web Site:
+SupportGroupLabel=Support group:
+WikiLabel=Wiki:
+IntroductionDevKitLabel=How about a toolkit for building native C RubyGems?
+DevKitLabel=DevKit:
+
+#include "languages\jp.isl"
+
[Files]
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: {#RubyPath}\*; DestDir: {app}; Excludes: "\bin\tcl*.dll,\bin\tk*.dll,\lib\tcltk,\lib\ruby\{#RubyLibVersion}\tk*.rb,\lib\ruby\{#RubyLibVersion}\tcl*.rb,\lib\ruby\{#RubyLibVersion}\*-tk.rb,\lib\ruby\{#RubyLibVersion}\tk,\lib\ruby\{#RubyLibVersion}\tkextlib,\lib\ruby\{#RubyLibVersion}\{#RubyBuildPlatform}\tcl*.so,\lib\ruby\{#RubyLibVersion}\{#RubyBuildPlatform}\tk*.so"; Flags: recursesubdirs createallsubdirs
--
1.7.9.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment