From: <cod...@go...> - 2008-09-23 22:02:00
|
Author: m0e.lnx Date: Tue Sep 23 14:30:44 2008 New Revision: 177 Added: branches/iVL/MdlLangSel.module Modified: branches/iVL/.lang/FMain.pot branches/iVL/.project branches/iVL/FMain.class branches/iVL/FrmLangSel.class branches/iVL/FrmLangSel.form branches/iVL/MdlCore.module branches/iVL/installer.gambas Log: - Implemented Language Selection window. (Ready to accept translations) Modified: branches/iVL/.lang/FMain.pot ============================================================================== --- branches/iVL/.lang/FMain.pot (original) +++ branches/iVL/.lang/FMain.pot Tue Sep 23 14:30:44 2008 @@ -14,19 +14,19 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: FMain.class:348 +#: FMain.class:362 msgid "Process Overview" msgstr "" -#: FMain.class:368 +#: FMain.class:382 msgid "Next" msgstr "" -#: FMain.class:374 +#: FMain.class:388 msgid "Back" msgstr "" -#: FMain.class:380 +#: FMain.class:394 msgid "Exit Installation" msgstr "" Modified: branches/iVL/.project ============================================================================== --- branches/iVL/.project (original) +++ branches/iVL/.project Tue Sep 23 14:30:44 2008 @@ -1,7 +1,7 @@ # Gambas Project File 2.0 Title=VectorLinux Installer Startup=MdlCore -Version=0.0.63 +Version=0.0.79 Library=gb.gtk Library=gb.form Library=gb.debug Modified: branches/iVL/FMain.class ============================================================================== --- branches/iVL/FMain.class (original) +++ branches/iVL/FMain.class Tue Sep 23 14:30:44 2008 @@ -28,6 +28,14 @@ PUBLIC SUB Form_Open() DIM iImg AS Image + +WITH ME.pnlwinhost + '.Background = Color.Transparent + .ForeColor = Color.Transparent +' .ForeColor = Picture["images/langbg.png"] +END WITH +FrmLangSel.Picture = Picture["images/langbg.png"] + ME.Maximized = TRUE MdlCore.LOCK_GUI @@ -168,11 +176,17 @@ PUBLIC SUB btnext_Click() DIM sISONAME AS String DIM sDev AS String + DIM sLang AS String SELECT CASE FrmCurr.Name ' very nice navigation algoritm CASE "FrmLangSel" - SHELL "export LANG=" & Trim(FrmLangSel.ListBox1.text) & "; ./" & Application.Args[0] & Space(1) & Trim(FrmLangSel.ListBox1.Text) ' this will set the LANG environment to what the user selects and restart the application. - QUIT + sLang = MdlLangSel.ID_LANG(Trim(FrmLangSel.lbLangSel.text)) + System.Language = sLang + ' SHELL "LC_ALL=" & sLang & Space(1) & "LANG=" & sLang & " ./" & Application.Args[0] & Space(1) & sLang ' this will set the LANG environment to what the user selects and restart the application. + 'SHELL "LC_ALL=" & Application.Args[1] & Space(1) & "LANG=" & Application.Args[1] & Space(1) & "./" & Application.Args[0] & Space(1) & Trim(FrmLangSel.listbox1.text) + IF ERROR THEN Message(Error.Text & gb.NewLine & Error.where) + 'QUIT + CASE "FrmSelISO" sDev = Right(FrmSelISO.lstInstallableImg.Text, Len(FrmSelISO.lstInstallableImg.Text) - InStr(FrmSelISO.lstInstallableImg.text, "/") + 1) Modified: branches/iVL/FrmLangSel.class ============================================================================== --- branches/iVL/FrmLangSel.class (original) +++ branches/iVL/FrmLangSel.class Tue Sep 23 14:30:44 2008 @@ -20,5 +20,16 @@ PUBLIC SUB Form_Open() FMain.FrmCurr = ME + tlbanner.text = "<h3>" & tlbanner.text & "</h3>" + ME.LIST_LANG_CHOICES() END + +PUBLIC SUB LIST_LANG_CHOICES() + + ME.lbLangSel.list = ["English", "Spanish", "Italian"] + + + +END + Modified: branches/iVL/FrmLangSel.form ============================================================================== --- branches/iVL/FrmLangSel.form (original) +++ branches/iVL/FrmLangSel.form Tue Sep 23 14:30:44 2008 @@ -3,8 +3,14 @@ { Form Form MoveScaled(0,0,64,64) Text = ("") - { ListBox1 ListBox - MoveScaled(8,9,32,15) - List = [("en_US"), ("es_ES")] + Picture = Picture["images/langbg.png"] + { lbLangSel ListBox + MoveScaled(1,8,32,51) + List = [] + } + { tlBanner TextLabel + MoveScaled(2,2,37,5) + Text = ("Select your language") + Alignment = Align.Normal } } Modified: branches/iVL/MdlCore.module ============================================================================== --- branches/iVL/MdlCore.module (original) +++ branches/iVL/MdlCore.module Tue Sep 23 14:30:44 2008 @@ -206,7 +206,10 @@ IF Application.Args[1] THEN ' Message(Application.Args[1]) + System.Language = Application.Args[1] frmInit = FrmSelISO + + 'shell "LC_ALL=" & Application.Args[1] & Space(1) & "LANG=" & Application.Args[1] ELSE frmInit = FrmLangSel Added: branches/iVL/MdlLangSel.module ============================================================================== --- (empty file) +++ branches/iVL/MdlLangSel.module Tue Sep 23 14:30:44 2008 @@ -0,0 +1,30 @@ +' Gambas module file + +' This file is part of vinstall-ng + +' vinstall-ng is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 2 of the License, or +' (at your option) any later version. + +' vinstall-ng is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. + +' You should have received a copy of the GNU General Public License +' along with vinstall-ng. If not, see <http://www.gnu.org/licenses/>. + +PUBLIC FUNCTION ID_LANG(LangName AS String) AS String + + DIM sRes AS String + SELECT CASE LangName + CASE "English" + sRes = "en_US" + CASE "Spanish" + sRes = "es_ES" + END SELECT + RETURN sRes + + +END \ No newline at end of file Modified: branches/iVL/installer.gambas ============================================================================== Binary files. No diff available. |