afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-05-10 04:36 am

[dw-free] English-strip /interests.bml

[commit: http://hg.dwscoalition.org/dw-free/rev/3ebbb8567fee]

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

English strip /interests.bml

Patch by [personal profile] kareila.

Files modified:
  • htdocs/interests.bml
  • htdocs/interests.bml.text
--------------------------------------------------------------------------------
diff -r e2bec4716500 -r 3ebbb8567fee htdocs/interests.bml
--- a/htdocs/interests.bml	Sun May 10 03:39:01 2009 +0000
+++ b/htdocs/interests.bml	Sun May 10 04:35:49 2009 +0000
@@ -39,7 +39,7 @@ body<=
         $ret .= " p?>";
 
         my $rows = LJ::Stats::get_popular_interests();
-        return "Sorry, interest data currently unavailable." unless @$rows;
+        return $ML{'.error.nodata'} unless @$rows;
 
         my %interests;
         foreach my $int_array (@$rows)
@@ -380,7 +380,7 @@ body<=
 
         my $check_int = $GET{int} || $interest;
         if (LJ::run_hook("interest_search_ignore", query => $check_int, intid => $intid)) {
-            return "<?h1 $ML{'Error'} h1?><?p Sorry, we're unable to help you find users matching the interests you've provided. p?>";
+            return "<?h1 $ML{'Error'} h1?><?p $ML{'.error.ignored'} p?>";
         }
 
         my $e_int = LJ::ehtml($GET{int});
@@ -402,17 +402,14 @@ body<=
         $ret .= "</table>";
 
         # no results
-        return qq{
-            $ret
-                <?h1 Relevant communities h1?>
-                <?p There are no communities interested in <b>"$e_int</b>." You can
-                <a href="$LJ::SITEROOT/community/create.bml"> create one</a>! p?>
-
-                <?h1 Interested users h1?>
-                <?p There are no users interested in <b>$e_int</b>. If you are interested in this 
-                and would like to be added to this list, <a href='$LJ::SITEROOT/manage/profile/'>click here</a>. 
-                More fun stuff can be found on the <a href='$LJ::SITEROOT/interests.bml'>interests page</a>. p?>
-        } unless $interest;
+        unless ( $interest ) {
+            $ret .= "<?h1 $ML{'.nocomms.header'} h1?><?p ";
+            $ret .= BML::ml( '.nocomms.text', { 'int' => $e_int, 'aopts' => qq(href="$LJ::SITEROOT/community/create.bml") } );
+            $ret .= " p?><?h1 $ML{'.nousers.header'} h1?><?p ";
+            $ret .= BML::ml( '.nousers.text', { 'int' => $e_int, 'aopts_manage' => "href='$LJ::SITEROOT/manage/profile/'", 'aopts_int' => "href='$LJ::SITEROOT/interests.bml'" } );
+            $ret .= "p?>";
+            return $ret;
+        } 
 
         $intid += 0;
 
@@ -459,10 +456,9 @@ body<=
 
                 $list .= " <small class='lastupdated'>(";
                 if ($updated->{$_->id} > 0) {
-                    $list .= "Updated ";
-                    $list .= LJ::ago_text(time() - $updated->{$_->id});
+                    $list .= BML::ml( '.lastupdated.true', { 'time' => LJ::ago_text( time() - $updated->{$_->id} ) } );
                 } else {
-                    $list .= "Never updated";
+                    $list .= BML::ml( '.lastupdated.false' );
                 }
                 $list .= ")</small>";
 
diff -r e2bec4716500 -r 3ebbb8567fee htdocs/interests.bml.text
--- a/htdocs/interests.bml.text	Sun May 10 03:39:01 2009 +0000
+++ b/htdocs/interests.bml.text	Sun May 10 04:35:49 2009 +0000
@@ -50,6 +50,10 @@ When you're done, click "Save Changes".
 
 .error.findsim_do.intnotfound=Interest wasn't found.
 
+.error.ignored=Sorry, we're unable to help you find users matching the interests you've provided.
+
+.error.nodata=Sorry, interest data currently unavailable.
+
 .error.nointerests=The selected user does not exist or has not specified any interests.
 
 .findsim.searchwait=<b>Please note:</b> Search will take several seconds.  Be patient.
@@ -92,6 +96,10 @@ When you're done, click "Save Changes".
 
 .interests.viewpop=View popular interests
 
+.lastupdated.false=Never updated
+
+.lastupdated.true=Updated [[time]]
+
 .login.enterinfo=Enter your username and password to modify your interests.
 
 .login.proceed=Proceed...
@@ -100,7 +108,15 @@ When you're done, click "Save Changes".
 
 .morestuff2=More fun stuff can be found on the <a [[aopts]]>interests page</a>.
 
+.nocomms.header=Relevant communities
+
+.nocomms.text=There are no communities interested in "<b>[[int]]</b>." You can <a [[aopts]]>create one</a>!
+
 .nointerests.text2=Don't have any interests listed? Add some by going to the <a [[aopts]]>Edit Personal Information</a> page.
+
+.nousers.header=Interested users
+
+.nousers.text=There are no users interested in <b>[[int]]</b>. If you are interested in this and would like to be added to this list, <a [[aopts_manage]]>click here</a>. More fun stuff can be found on the <a [[aopts_int]]>interests page</a>.
 
 .popular.disabled=Sorry, the popular interests feature is unavailable.
 
--------------------------------------------------------------------------------