madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22698: LJSUP-13301: Main page optimization

Committer: sbelyaev
LJSUP-13301: Main page optimization
U   trunk/cgi-bin/LJ/Widget/RecentComments.pm
Modified: trunk/cgi-bin/LJ/Widget/RecentComments.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/RecentComments.pm	2012-08-20 09:22:41 UTC (rev 22697)
+++ trunk/cgi-bin/LJ/Widget/RecentComments.pm	2012-08-20 09:37:10 UTC (rev 22698)
@@ -9,6 +9,17 @@
     return qw( stc/widgets/recentcomments.css );
 }
 
+my @_ml_strings = (
+    'widget.recentcomments.title',
+    'widget.recentcomments.viewall',
+    'widget.recentcomments.anon',
+    'widget.recentcomments.nocomments',
+    'widget.recentcomments.nosubject',
+    'widget.recentcomments.commentheading',
+    'widget.recentcomments.link',
+    'widget.recentcomments.reply',
+);
+
 # args
 #   user: optional $u whose recent received comments we should get (remote is default)
 #   limit: number of recent comments to show, or 3
@@ -20,6 +31,9 @@
     return "" unless $u;
     return "" if $u->is_identity;
 
+    my $lncode = LJ::Lang::get_effective_lang();
+    LJ::Lang::get_text_multi($lncode, undef, \@_ml_strings);
+
     my $limit = defined $opts{limit} ? $opts{limit} : 3;
 
     my @comments = $u->get_recent_talkitems($limit, memcache => 1);

Tags: livejournal, madeon, pm, sbelyaev
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments