[Rt-commit] r14522 - in rt/3.8/trunk: sbin share/html/Install
ruz at bestpractical.com
ruz at bestpractical.com
Fri Jul 25 11:20:28 EDT 2008
Author: ruz
Date: Fri Jul 25 11:20:12 2008
New Revision: 14522
Modified:
rt/3.8/trunk/bin/standalone_httpd.in
rt/3.8/trunk/sbin/rt-server.in
rt/3.8/trunk/share/html/Install/index.html
Log:
* add language selector to the first page of configuration wizard
Modified: rt/3.8/trunk/bin/standalone_httpd.in
==============================================================================
--- rt/3.8/trunk/bin/standalone_httpd.in (original)
+++ rt/3.8/trunk/bin/standalone_httpd.in Fri Jul 25 11:20:12 2008
@@ -110,6 +110,9 @@
die "Since your configuration exists but is not writable, I'm refusing to do anything.\n";
}
+ RT->Config->Set( 'LexiconLanguages' => '*' );
+ RT::I18N->Init;
+
RT->InstallMode(1);
} else {
RT->ConnectToDatabase();
Modified: rt/3.8/trunk/sbin/rt-server.in
==============================================================================
--- rt/3.8/trunk/sbin/rt-server.in (original)
+++ rt/3.8/trunk/sbin/rt-server.in Fri Jul 25 11:20:12 2008
@@ -109,6 +109,9 @@
die "Since your configuration exists but is not writable, I'm refusing to do anything.\n";
}
+ RT->Config->Set( 'LexiconLanguages' => '*' );
+ RT::I18N->Init;
+
RT->InstallMode(1);
} else {
RT->ConnectToDatabase();
Modified: rt/3.8/trunk/share/html/Install/index.html
==============================================================================
--- rt/3.8/trunk/share/html/Install/index.html (original)
+++ rt/3.8/trunk/share/html/Install/index.html Fri Jul 25 11:20:12 2008
@@ -51,6 +51,19 @@
% return if $locked;
+<form method="post">
+
+<h1><% loc('Language.') %></h1>
+
+<div class="select-lang">
+<&|/l&>Select another language</&>:
+<& /Elements/SelectLang,
+ Name => 'Lang',
+ Default => $lang_handle? $lang_handle->language_tag : undef,
+&>
+<input type="submit" class="button" name="ChangeLang" value="<% loc('Change') %>" />
+</div>
+
<h1><% loc('What is RT?') %></h1>
<div class="intro">
@@ -70,9 +83,7 @@
<&|/l&>If you already have a working RT server and database, you should take this opportunity to make sure that your database server is running and that the RT server can connect to it. Once you've done that, stop and start the RT server.</p></&>
</div>
-<form method="post">
-<input type="hidden" name="Run" value="1" />
-<& /Elements/Submit, Label => loc( "Let's go!") &>
+<& /Elements/Submit, Label => loc( "Let's go!"), Name => 'Run' &>
</form>
</&>
@@ -111,9 +122,21 @@
}
RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . 'Install/DatabaseType.html');
+} elsif ( $ChangeLang && $Lang ) {
+ # hackish, but works
+ $session{'CurrentUser'} = new RT::CurrentUser;
+ $session{'CurrentUser'}->LanguageHandle( $Lang );
}
+my $lang_handle = do { local $@;
+ eval {
+ ($session{'CurrentUser'} || RT::CurrentUser->new($RT::SystemUser->Id))
+ ->LanguageHandle
+ }
+};
</%init>
<%args>
$Run => 0
+$ChangeLang => undef
+$Lang => undef
</%args>
More information about the Rt-commit
mailing list