Шурик (fortl) wrote in changelog,
Шурик
fortl
changelog

[ljcom] r10130: LJSUP-7874 SMS notification - new featur...

Committer: aurbanowich
LJSUP-7874 SMS notification - new features
U   trunk/cgi-bin/LJ/Event/NewVGift.pm
Modified: trunk/cgi-bin/LJ/Event/NewVGift.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/NewVGift.pm	2011-02-25 09:01:46 UTC (rev 10129)
+++ trunk/cgi-bin/LJ/Event/NewVGift.pm	2011-02-25 09:05:42 UTC (rev 10130)
@@ -12,10 +12,13 @@
 }
 
 sub as_string {
-    my $self = shift;
+    my ($self, $u) = @_;
+    my $lang = ($u && $u->prop('browselang')) || $LJ::DEFAULT_LANG;
 
-    return $self->event_journal->display_username .
-        " has received a new virtual gift.";
+# [[journal]] has received a new virtual gift.
+    return LJ::Lang::get_text($lang, 'notification.sms.newvgift', undef, {
+        journal => $self->event_journal->display_username,
+    });
 }
 
 sub as_alert {
@@ -41,11 +44,6 @@
         " has received a new <a href='" . $gift->detail_url . "'>virtual gift</a>.";
 }
 
-sub as_sms {
-    my $self = shift;
-    return $self->as_string;
-}
-
 sub vgift_name {
     my $self = shift;
     my $gift = $self->vgift;

Tags: fortl, ljcom, pm
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