[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.7-1011-gca47b7b
Alex Vandiver
alexmv at bestpractical.com
Wed Dec 22 19:54:47 EST 2010
The branch, 3.9-trunk has been updated
via ca47b7bd7f669143034fb2d50dd89993721cecff (commit)
via a76a951eb47a8d00b17ecdd434c8cbbfb0ef4752 (commit)
from 42c487b8f36d1af80563fa84b565963f974cb946 (commit)
Summary of changes:
t/i18n/caching.t | 36 ++++++++++++++++++++++++++++++++++++
t/i18n/default.t | 9 ++++++++-
2 files changed, 44 insertions(+), 1 deletions(-)
create mode 100644 t/i18n/caching.t
- Log -----------------------------------------------------------------
commit a76a951eb47a8d00b17ecdd434c8cbbfb0ef4752
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Dec 22 19:53:56 2010 -0500
Add a TODO test for sending the right lang= attribute on the <html> block
diff --git a/t/i18n/default.t b/t/i18n/default.t
index 764a67f..6c26b62 100644
--- a/t/i18n/default.t
+++ b/t/i18n/default.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use RT::Test nodata => 1, tests => 10;
+use RT::Test nodata => 1;
my ($baseurl, $m) = RT::Test->started_ok;
$m->get_ok('/');
@@ -10,6 +10,7 @@ $m->title_is('Login');
$m->get_ok('/', { 'Accept-Language' => 'x-klingon' });
$m->title_is('Login', 'unavailable language fallback to en');
+$m->content_contains('<html lang="en">');
$m->add_header('Accept-Language' => 'zh-tw,zh;q=0.8,en-gb;q=0.5,en;q=0.3');
$m->get_ok('/');
@@ -17,3 +18,9 @@ use utf8;
Encode::_utf8_on($m->{content});
$m->title_is('ç»å
¥', 'Page title properly translated to chinese');
$m->content_contains('å¯ç¢¼','Password properly translated');
+{
+ local $TODO = "We fail to correctly advertise the langauage in the <html> block";
+ $m->content_contains('<html lang="zh-tw">');
+}
+
+undef $m;
commit ca47b7bd7f669143034fb2d50dd89993721cecff
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Dec 22 19:54:43 2010 -0500
Add a TODO test for the recently-discovered I18N caching bug
diff --git a/t/i18n/caching.t b/t/i18n/caching.t
new file mode 100644
index 0000000..3ea80da
--- /dev/null
+++ b/t/i18n/caching.t
@@ -0,0 +1,36 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+
+use RT::Test;
+
+{
+ my $french = RT::User->new(RT->SystemUser);
+ $french->LoadOrCreateByEmail('french at example.com');
+ $french->SetName('french');
+ $french->SetLang('fr');
+ $french->SetPrivileged(1);
+ $french->SetPassword('password');
+ $french->PrincipalObj->GrantRight(Right => 'SuperUser');
+}
+
+
+my ($baseurl, $m) = RT::Test->started_ok;
+$m->login( root => "password" );
+$m->get_ok('/Prefs/Other.html');
+$m->content_lacks('Commentaires','Lacks translated french');
+$m->get_ok( "/NoAuth/Logout.html" );
+
+$m->login( french => "password" );
+$m->get_ok('/Prefs/Other.html');
+$m->content_contains('Commentaires','Has translated french');
+$m->get_ok( "/NoAuth/Logout.html" ); # ->logout fails because it's translated
+
+$m->login( root => "password" );
+$m->get_ok('/Prefs/Other.html');
+{
+ local $TODO = "Per-process caching bug";
+ $m->content_lacks('Commentaires','Lacks translated french');
+}
+
+undef $m;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list