summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
Commit message (Expand)AuthorAgeFilesLines
* (interactive_help_sub_get_id) just check if HTML help existsThierry Vignaud2008-10-011-1/+1
* (ask_from_normalize) do not display Help buttons in standalone modeThierry Vignaud2008-09-261-0/+3
* (ask_warn_) make "ask_warn" dialogs be centered at intall timeThierry Vignaud2008-09-021-0/+1
* (wait_message) at install time, override default "please wait" titleThierry Vignaud2008-08-271-1/+3
* (create_widgets_block) add support for new 'alignment' parameter (only 'right...Thierry Vignaud2008-08-221-0/+1
* document 'install_button' parameterThierry Vignaud2008-08-221-0/+1
* (create_widgets_block) add support for new 'do_not_expand' parameterThierry Vignaud2008-08-221-0/+1
* fix previous commit: focus_first focuses first editable entry (ie skip "title...Pascal Rigaux2007-08-221-2/+0
* focus_first focuses first editable entry (ie skip "title" entries)Pascal Rigaux2007-08-131-0/+6
* re-sync after the big svn lossPascal Rigaux2007-04-251-103/+176
* (ask_okcancel,ask_warn) enable to set an icon (eg for banners at install time)Thierry Vignaud2005-11-291-4/+4
* allow the wait_message progress bar to be used more than oncePascal Rigaux2005-09-091-0/+3
* fs::format::wait_message() is now ->wait_message_with_progress_bar (on intera...Pascal Rigaux2005-09-021-0/+33
* cleanup (translate late, and move methods to upper class)Pascal Rigaux2005-08-301-4/+8
* fix "Cancel" in ask_okcancelPascal Rigaux2005-08-301-1/+1
* image2f has slightly changedPascal Rigaux2005-08-091-1/+1
* don't need use MDK::Common... when we have "use common" (which is the standar...Pascal Rigaux2005-06-101-1/+0
* (ask_from_normalize) since we can now use ComboBoxes with trees, doThierry Vignaud2005-05-261-1/+1
* perl_checker cleanupThierry Vignaud2005-03-221-1/+1
* temporary move collate sorting into net wizard in order to minimize possible ...Thierry Vignaud2005-03-171-2/+0
* (ask_from_normalize) use newly introduced set_l10n_sort() in order toThierry Vignaud2005-03-171-0/+2
* log program exitingThierry Vignaud2005-03-081-1/+8
* when testing, don't silently default to newtPascal Rigaux2005-03-011-0/+2
* ensure the "range" entry returned value is bounded as askedPascal Rigaux2005-02-181-0/+7
* create ->ask_filename and ->ask_directory to replace ->ask_filePascal Rigaux2005-02-151-3/+17
* better english (writing style rather than spoken one)Thierry Vignaud2004-12-131-1/+1
* fix prototypePascal Rigaux2004-11-181-1/+1
* remove some unneeded ";", add some for normalization (as told by perl_checker)Pascal Rigaux2004-11-181-1/+1
* no need for thisPascal Rigaux2004-02-131-1/+1
* (vnew) do not complaint about being run as root when --testing was passedThierry Vignaud2004-02-131-1/+1
* ->ask_from_entry and ->ask_from_entries are better with focus_firstPascal Rigaux2004-02-041-3/+3
* remove arrows from previous/next buttons according to interface teamThierry Vignaud2004-01-161-2/+2
* - install_steps_auto_install is not a interactive but still needs do_pkgsPascal Rigaux2004-01-121-6/+3
* new do_pkgs package which get rid of pkgs_interactive::* which was in install...Pascal Rigaux2004-01-091-0/+6
* fix ask_okcancel due to stock items changesThierry Vignaud2003-07-151-1/+1
* let interactive uses stock items on x11 and old drak translated items inThierry Vignaud2003-07-141-2/+2
* - methods with no argument are not functions with no argument!Pascal Rigaux2003-05-261-5/+5
* have the "Ok" in ask_from__add_modify_remove return true in default mode (eg:...Pascal Rigaux2003-05-121-1/+1
* perl_checker compliancePascal Rigaux2003-04-301-1/+1
* perl_checker adaptations + fixesPascal Rigaux2003-04-241-7/+7
* perl_checker compliance for optional method argumentsPascal Rigaux2003-04-221-26/+28
* adapt to new help.pmPascal Rigaux2003-04-221-3/+3
* new perl_checker compliancePascal Rigaux2003-04-171-10/+10
* oops i didn't understand the internals of wait_message hence breaking it. hop...Guillaume Cottenceau2003-02-201-2/+2
* Gtk2::Label::set is deprecatedGuillaume Cottenceau2003-02-201-2/+2
* have less warnings when debuggingPascal Rigaux2003-02-201-2/+2
* - factorize "Help"-button handlingPascal Rigaux2003-02-161-4/+20
* in ask_browse_tree_info, have Next instead of Ok, Previous instead of Cancel ...Pascal Rigaux2003-02-141-1/+2
* fix ask_warn(), really dont make it popPascal Rigaux2003-02-131-2/+2
* don't force pop_it on ask_warn'sPascal Rigaux2003-02-131-1/+0
class="hl str">'Polish', 'iso-8859-2', 'pl', 'pl' ], 'pt_BR' => [ 'Portuguese (Brazil)', 'iso-8859-1', 'pt', 'pt_BR:pt_PT:pt' ], 'pt_PT' => [ 'Portuguese (Portugal)', 'iso-8859-1', 'pt', 'pt_PT:pt_BR:pt' ], 'ro' => [ 'Romanian', 'iso-8859-2', 'ro', 'ro' ], 'ru' => [ 'Russian', 'koi8-r', 'ru', 'ru' ], 'sk' => [ 'Slovak', 'iso-8859-2', 'sk', 'sk' ], #- 'sr' => [ 'Serbian', 'iso-8859-5', 'sr', 'sr:sp' ], 'tr' => [ 'Turkish', 'iso-8859-9', 'tr', 'tr' ], 'uk' => [ 'Ukrainian', 'koi8-u', 'uk', 'uk' ], 'vi' => [ 'Vietnamese (TCVN)', 'tcvn', 'vi', 'vi_VN.tcvn:vi_VN.tcvn-5712:vi' ], 'vi_VN.viscii' => [ 'Vietnamese (VISCII)','viscii', 'vi', 'vi_VN.viscii:vi_VN.tcvn-viscii1.1-1:vi' ], 'wa' => [ 'Walon', 'iso-8859-1', 'wa', 'wa:fr_BE:fr' ], 'zh_TW.Big5' => [ 'Chinese (Big5)', 'Big5', 'zh_TW.Big5', 'zh_TW.Big5:zh_TW.big5:zh' ], 'zh_CN' => [ 'Chinese (GuoBiao)', 'gb2312', 'zh_CN', 'zh_CN.gb2312:zh' ], ); sub std2 { "-mdk-helvetica-medium-r-normal-*-*-$_[1]-*-*-*-*-$_[0]" } sub std_ { std2($_[0], 100), std2($_[0], 100) } sub std { std2($_[0], 100), std2($_[0], 80) } my %charsets = ( "armscii-8" => [ "arm8", "armscii8", std_("armscii-8") ], #- chinese needs special console driver for text mode "Big5" => [ "?????", "????", "-*-*-*-*-*-*-*-*-*-*-*-*-big5-0" ], "gb2312" => [ "?????", "????", "-isas-song ti-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0" ], "iso-8859-1" => [ "lat0-sun16", "iso15", std("iso8859-1") ], "iso-8859-2" => [ "lat2-sun16", "iso02", std("iso8859-2") ], "iso-8859-3" => [ "iso03.f16", "iso03", std_("iso8859-3") ], "iso-8859-4" => [ "lat4u-16", "iso04", std_("iso8859-4") ], "iso-8859-5" => [ "iso05.f16", "iso05", std("iso8859-5") ], #- arabic needs special console driver for text mode [acon] #- (and gtk support isn't done yet) "iso-8859-6" => [ "iso06.f16", "iso06", std_("iso8859-6") ], "iso-8859-7" => [ "iso07.f16", "iso07", std_("iso8859-7") ], #- hebrew needs special console driver for text mode (none yet) #- (and gtk support isn't done yet) "iso-8859-8" => [ "iso08.f16", "iso08", std_("iso8859-8") ], "iso-8859-9" => [ "lat5-16", "iso09", std("iso8859-9") ], "iso-8859-13" => [ "??????", "?????", std_("iso8859-13") ], "iso-8859-14" => [ "??????", "?????", std_("iso8859-14") ], "iso-8859-15" => [ "lat0-sun16", "iso15", std("iso8859-15") ], #- japanese needs special console driver for text mode [kon2] "jisx0208" => [ "????", "????", "-*-*-*-*-*-*-*-*-*-*-*-*-jisx*.*-0" ], "koi8-r" => [ "Cyr_a8x16", "koi2alt", std("koi8-r") ], "koi8-u" => [ "ruscii_8x16", "koi2alt", std("koi2-u") ], #- korean needs special console driver for text mode "ksc5601" => [ "?????", "?????", "-*-*-*-*-*-*-*-*-*-*-*-*-ksc5601.1987-*" ], "tcvn" => [ "tcvn8x16", "tcvn", std2("tcvn-5712", 130), std2("tcvn-5712", 100) ], "viscii" => [ "viscii10-8x16", "viscii", "-*-*-*-*-*-*-*-*-*-*-*-*-viscii1.1-1" ], ); #-###################################################################################### #- Functions #-###################################################################################### sub list { map { $_->[0] } values %languages } sub lang2text { $languages{$_[0]} && $languages{$_[0]}[0] } sub text2lang { my ($t) = @_; while (my ($k, $v) = each %languages) { lc($v->[0]) eq lc($t) and return $k; } die "unknown language $t"; } sub set { my ($lang, $prefix) = @_; if ($lang) { $ENV{LC_ALL} = $lang; $ENV{LANG} = $languages{$lang}[2]; $ENV{LANGUAGE} = $languages{$lang}[3]; $ENV{LINGUAS} = $languages{$lang}[3]; } else { # stick with the default (English) */ delete $ENV{LANG}; delete $ENV{LC_ALL}; delete $ENV{LINGUAS}; } commands::install_cpio("/usr/share/locale", $lang); } sub write { my ($prefix) = @_; my $lang = $ENV{LC_ALL}; $lang or return; local *F; open F, "> $prefix/etc/sysconfig/i18n" or die "failed to reset $prefix/etc/sysconfig/i18n for writing"; my $f = sub { $_[1] and print F "$_[0]=$_[1]\n"; }; &$f("LC_ALL", $lang); if (my $l = $languages{$lang}) { &$f("LANG", $l->[2]); &$f("LANGUAGE", $l->[3]); &$f("LINGUAS", $l->[3]); $l->[1] or return; if (my $c = $charsets{$l->[1]}) { &$f("SYSFONT", $c->[0]); &$f("SYSFONTACM", $c->[1]); my $p = "$prefix/usr/lib/kbd"; commands::cp("-f", "$p/consolefonts/$c->[0].psf.gz", glob_("$p/consoletrans/$c->[1]*"), "$prefix/etc/sysconfig/console"); } } } sub load_po($) { my ($lang) = @_; my ($s, $from, $to, $state, $fuzzy); $s .= "package po::I18N;\n"; $s .= "\%$lang = ("; my $f; -e ($f = "$_/po/$lang.po") and last foreach @INC; unless (-e $f) { -e ($f = "$_") and last foreach @INC; $f = commands::install_cpio("$f/po", "$lang.po"); } local *F; open F, $f; #- not returning here help avoiding reading the same multiple times. foreach (<F>) { /^msgstr/ and $state = 1; /^msgid/ && !$fuzzy and $state = 2; if (/^(#|$)/ && $state != 3) { $state = 3; $s .= qq("$from" => "$to",\n) if $from; $from = $to = ''; } $to .= (/"(.*)"/)[0] if $state == 1; $from .= (/"(.*)"/)[0] if $state == 2; $fuzzy = /^#, fuzzy/; } $s .= ");"; no strict "vars"; eval $s; !$@; } #-sub load_font { #- my ($charset) = @_; #- my $fontFile = "lat0-sun16"; #- #- if (my $c = $charsets{$charset}) { #- log::l("loading $charset font"); #- $fontFile = $c->[0]; #- } #- #- # text mode font #- log::l("loading font /usr/share/consolefonts/$fontFile"); #- #c::loadFont("/tmp/$fontFile") or log::l("error in loadFont: one of PIO_FONT PIO_UNIMAPCLR PIO_UNIMAP PIO_UNISCRNMAP failed: $!"); #- #print STDERR "\033(K"; #- #-} sub get_x_fontset { my ($lang) = @_; my $l = $languages{$lang} or return; my $c = $charsets{$l->[1]} or return; @$c[2..3]; } #-###################################################################################### #- Wonderful perl :( #-###################################################################################### 1;