fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-06-16 06:32 am

[dw-free] index for /security has mislabeled link

[commit: http://hg.dwscoalition.org/dw-free/rev/50dd0a1c36d4]

http://bugs.dwscoalition.org/show_bug.cgi?id=3735

Use the correct ml key -- one access and one private, not two private. Pass
in the ml key rather than the parsed string (so it will show up properly in
uselang=debug)

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/User.pm
  • views/journal/security.tt
--------------------------------------------------------------------------------
diff -r 502514c7ccec -r 50dd0a1c36d4 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Thu Jun 16 11:18:48 2011 +0800
+++ b/cgi-bin/LJ/User.pm	Thu Jun 16 14:30:44 2011 +0800
@@ -8878,23 +8878,23 @@
 
                 my $path = $view eq "read" ? "/read/security" : "/security";
                 @levels  = ( { link => LJ::create_url( "$path/public", viewing_style => 1 ),
-                                    name => LJ::Lang::ml( "label.security.public" ) } );
+                                name_ml => "label.security.public" } );
 
                 if ( $u->is_comm ) {
                     push @levels, { link => LJ::create_url( "$path/access", viewing_style => 1 ),
-                                    name => LJ::Lang::ml( "label.security.members" ) }
+                                    name_ml => "label.security.members" }
                                 if $remote && $remote->member_of( $u );
 
                     push @levels, { link => LJ::create_url( "$path/private", viewing_style => 1 ),
-                                    name => LJ::Lang::ml( "label.security.maintainers" ) }
+                                    name_ml => "label.security.maintainers" }
                                 if $remote && $remote->can_manage_other( $u );
                 } else {
                     push @levels, { link => LJ::create_url( "$path/access", viewing_style => 1 ),
-                                    name => LJ::Lang::ml( "label.security.accesslist" ) }
+                                    name_ml => "label.security.accesslist" }
                                 if $u->trusts( $remote );
 
                     push @levels, { link => LJ::create_url( "$path/private", viewing_style => 1 ),
-                                    name => LJ::Lang::ml( "label.security.accesslist" ) }
+                                    name_ml => "label.security.private" }
                                 if $u->equals( $remote );
                 }
 
diff -r 502514c7ccec -r 50dd0a1c36d4 views/journal/security.tt
--- a/views/journal/security.tt	Thu Jun 16 11:18:48 2011 +0800
+++ b/views/journal/security.tt	Thu Jun 16 14:30:44 2011 +0800
@@ -5,7 +5,7 @@
 <p>[% ".filter.levels" | ml %]</p>
 <ul>
     [% FOREACH level IN levels %]
-        <li><a href="[%level.link%]">[%level.name%]</a></li>
+        <li><a href="[%level.link%]">[% level.name_ml | ml %]</a></li>
     [% END %]
 </ul>
 [% END %]
--------------------------------------------------------------------------------