[Rt-commit] r14933 - in rt/3.8/branches/3.8.1-releng: . lib lib/RT/Test share/html/Admin/Tools

falcone at bestpractical.com falcone at bestpractical.com
Fri Aug 8 16:28:19 EDT 2008


Author: falcone
Date: Fri Aug  8 16:28:17 2008
New Revision: 14933

Added:
   rt/3.8/branches/3.8.1-releng/t/i18n/
   rt/3.8/branches/3.8.1-releng/t/i18n/default.t
Modified:
   rt/3.8/branches/3.8.1-releng/   (props changed)
   rt/3.8/branches/3.8.1-releng/UPGRADING.mysql
   rt/3.8/branches/3.8.1-releng/lib/RT.pm.in
   rt/3.8/branches/3.8.1-releng/lib/RT/Test/Web.pm
   rt/3.8/branches/3.8.1-releng/share/html/Admin/Tools/Configuration.html

Log:
- Merge //mirror/bps-public/rt/3.8/trunk to //mirror/bps-public/rt/3.8/branches/3.8.1-releng

Modified: rt/3.8/branches/3.8.1-releng/UPGRADING.mysql
==============================================================================
--- rt/3.8/branches/3.8.1-releng/UPGRADING.mysql	(original)
+++ rt/3.8/branches/3.8.1-releng/UPGRADING.mysql	Fri Aug  8 16:28:17 2008
@@ -17,7 +17,7 @@
 etc/upgrade/schema.mysql-4.0-4.1.pl that generates SQL queries to upgrade schema of
 the DB. Run it:
 
-    perl etc/upgrade/schema.mysql-4.0-4.1.pl > sql.queries
+    perl etc/upgrade/schema.mysql-4.0-4.1.pl db user pass > sql.queries
 
 5) Check sanity of sql queries or consult with your DBA
 

Modified: rt/3.8/branches/3.8.1-releng/lib/RT.pm.in
==============================================================================
--- rt/3.8/branches/3.8.1-releng/lib/RT.pm.in	(original)
+++ rt/3.8/branches/3.8.1-releng/lib/RT.pm.in	Fri Aug  8 16:28:17 2008
@@ -558,7 +558,10 @@
 our @PLUGINS = ();
 sub Plugins {
     my $self = shift;
-    @PLUGINS = $self->InitPlugins  unless (@PLUGINS);
+    unless (@PLUGINS) {
+        $self->InitPluginPaths;
+        @PLUGINS = $self->InitPlugins;
+    }
     return \@PLUGINS;
 }
 
@@ -590,9 +593,13 @@
 
 =cut
 
+{
+my $PluginPathsInited = 0;
 sub InitPluginPaths {
     my $self = shift || __PACKAGE__;
 
+    return @INC if $PluginPathsInited;
+
     my @lib_dirs = $self->PluginDirs('lib');
 
     my @tmp_inc;
@@ -603,8 +610,10 @@
             push @tmp_inc, $_;
         }
     }
+    $PluginPathsInited = 1;
     @INC = @tmp_inc;
 }
+}
 
 =head2 InitPlugins
 

Modified: rt/3.8/branches/3.8.1-releng/lib/RT/Test/Web.pm
==============================================================================
--- rt/3.8/branches/3.8.1-releng/lib/RT/Test/Web.pm	(original)
+++ rt/3.8/branches/3.8.1-releng/lib/RT/Test/Web.pm	Fri Aug  8 16:28:17 2008
@@ -62,7 +62,9 @@
     if ( $url =~ m{^/} ) {
         $url = $self->rt_base_url . $url;
     }
-    return $self->SUPER::get_ok($url, @_);
+    my $rv = $self->SUPER::get_ok($url, @_);
+    Test::More::diag "Couldn't get $url" unless $rv;
+    return $rv;
 }
 
 sub rt_base_url {

Modified: rt/3.8/branches/3.8.1-releng/share/html/Admin/Tools/Configuration.html
==============================================================================
--- rt/3.8/branches/3.8.1-releng/share/html/Admin/Tools/Configuration.html	(original)
+++ rt/3.8/branches/3.8.1-releng/share/html/Admin/Tools/Configuration.html	Fri Aug  8 16:28:17 2008
@@ -115,3 +115,10 @@
 <pre>
 <% Config::myconfig() %>
 </pre>
+
+<h2><&|/l&>Perl Include Paths (@INC)</&></h2>
+<pre>
+% foreach my $inc (@INC) {
+<% $inc %>
+% }
+</pre>

Added: rt/3.8/branches/3.8.1-releng/t/i18n/default.t
==============================================================================
--- (empty file)
+++ rt/3.8/branches/3.8.1-releng/t/i18n/default.t	Fri Aug  8 16:28:17 2008
@@ -0,0 +1,24 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+
+use Test::More tests => 7;
+use RT::Test;
+
+my ($baseurl, $m) = RT::Test->started_ok;
+$m->get_ok('/');
+$m->title_is('Login');
+
+$m->get_ok('/', { 'Accept-Language' => 'x-klingon' });
+$m->title_is('Login', 'unavailable language fallback to en');
+
+$m->add_header('Accept-Language' => 'zh-tw,zh;q=0.8,en-gb;q=0.5,en;q=0.3');
+$m->get_ok('/');
+use utf8;
+use Devel::Peek;
+Encode::_utf8_on($m->{content});
+TODO: {
+    local $TODO = 'login page should be l10n';
+    $m->title_is('登入');
+};
+


More information about the Rt-commit mailing list