madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[ljcom] r12069: LJSUP-12262: Push notifications localiza...

Committer: sbelyaev
LJSUP-12262: Push notifications localization improvements
U   trunk/cgi-bin/LJ/Event/NewVGift.pm
U   trunk/cgi-bin/LJ/Event/SupOfficialPost.pm
U   trunk/cgi-bin/LJ/Event/UserPurging.pm
Modified: trunk/cgi-bin/LJ/Event/NewVGift.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/NewVGift.pm	2012-06-06 08:39:13 UTC (rev 12068)
+++ trunk/cgi-bin/LJ/Event/NewVGift.pm	2012-06-06 10:52:10 UTC (rev 12069)
@@ -197,14 +197,16 @@
 sub as_push {
     my $self = shift;
     my $u = shift;
+    my $lang = shift;
 
-    return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.newvgift", 1, {
+    return LJ::Lang::get_text($lang, "esn.push.notification.newvgift", 1, {
         user        => $self->event_journal->user(),
     })
 }
 
 sub as_push_payload {
     my $self = shift;
+    my $lang = shift;
     return { 't' => 18,
              'u' => $self->event_journal->user(),
              'g' => $self->arg1(),

Modified: trunk/cgi-bin/LJ/Event/SupOfficialPost.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/SupOfficialPost.pm	2012-06-06 08:39:13 UTC (rev 12068)
+++ trunk/cgi-bin/LJ/Event/SupOfficialPost.pm	2012-06-06 10:52:10 UTC (rev 12069)
@@ -35,13 +35,16 @@
 sub as_push {
     my $self = shift;
     my $u = shift;
-    return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.supoffcialpost", 1, {
+    my $lang = shift;
+
+    return LJ::Lang::get_text($lang, "esn.push.notification.supoffcialpost", 1, {
         community => $self->event_journal->user,
     })
 }
 
 sub as_push_payload {
     my $self = shift;
+    my $self = shift;
     return { 't' => 2,
              'p' => $self->arg1,
            };

Modified: trunk/cgi-bin/LJ/Event/UserPurging.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/UserPurging.pm	2012-06-06 08:39:13 UTC (rev 12068)
+++ trunk/cgi-bin/LJ/Event/UserPurging.pm	2012-06-06 10:52:10 UTC (rev 12069)
@@ -135,14 +135,16 @@
 }
 
 sub as_push {
-    my ($self, $u) = @_;
-    return LJ::Lang::get_text($u->prop('browselang'), "esn.push.notification.eventtrackusernamepurged", 1, {
+    my ($self, $u, $lang) = @_;
+
+    return LJ::Lang::get_text($lang, "esn.push.notification.eventtrackusernamepurged", 1, {
         user => $self->u->user
     })
 }
 
 sub as_push_payload {
     my $self = shift;
+    my $lang = shift;
     
     return { 't' => 24,
              'j' => $self->u->user,

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