Committer: gprochaev
LJSUP-6482U trunk/bin/upgrading/en.dat U trunk/cgi-bin/LJ/Event/JournalNewComment.pm
Modified: trunk/bin/upgrading/en.dat =================================================================== --- trunk/bin/upgrading/en.dat 2010-09-14 09:52:54 UTC (rev 17370) +++ trunk/bin/upgrading/en.dat 2010-09-14 11:19:35 UTC (rev 17371) @@ -4289,6 +4289,22 @@ settings.zipcode=ZIP Code +sms.journalnewcomment.edit_reply_your_comment=[[user]] edited a reply to your comment + +sms.journalnewcomment.edit_reply_a_comment=[[user]] edited a reply to a comment + +sms.journalnewcomment.replied_your_comment=[[user]] replied to your comment + +sms.journalnewcomment.replied_a_comment=[[user]] replied to a comment + +sms.journalnewcomment.edit_reply_your_post=[[user]] edited a reply to your post + +sms.journalnewcomment.edit_reply_a_post=[[user]] edited a reply to a post + +sms.journalnewcomment.replied_your_post=[[user]] replied to your post + +sms.journalnewcomment.replied_a_post=[[user]] replied to a post + Sorry|notes=typically used to announce that the requested action can't be done. Sorry=Sorry Modified: trunk/cgi-bin/LJ/Event/JournalNewComment.pm =================================================================== --- trunk/cgi-bin/LJ/Event/JournalNewComment.pm 2010-09-14 09:52:54 UTC (rev 17370) +++ trunk/cgi-bin/LJ/Event/JournalNewComment.pm 2010-09-14 11:19:35 UTC (rev 17371) @@ -3,6 +3,8 @@ use Scalar::Util qw(blessed); use Class::Autouse qw(LJ::Comment LJ::HTML::Template); use Carp qw(croak); +use LJ::API::BitLy; +use LJ::Bitly; use base 'LJ::Event'; # we don't allow subscriptions to comments on friends' journals, so @@ -224,21 +226,33 @@ my $msg; + my $lang = $self->comment->poster ? $self->comment->poster->prop('browselang') : $LJ::DEFAULT_LANG; if ($self->comment->parent) { if ($edited) { - $msg = LJ::u_equals($self->comment->parent->poster, $u) ? "$user edited a reply to your comment: " : "$user edited a reply to a comment: "; + $msg = LJ::u_equals($self->comment->parent->poster, $u) + ? LJ::Lang::get_text($lang, 'sms.journalnewcomment.edit_reply_your_comment', undef, { user => $user } ) + : LJ::Lang::get_text($lang, 'sms.journalnewcomment.edit_reply_a_comment', undef, { user => $user } ); } else { - $msg = LJ::u_equals($self->comment->parent->poster, $u) ? "$user replied to your comment: " : "$user replied to a comment: "; + $msg = LJ::u_equals($self->comment->parent->poster, $u) + ? LJ::Lang::get_text($lang, 'sms.journalnewcomment.replied_your_comment', undef, { user => $user } ) + : LJ::Lang::get_text($lang, 'sms.journalnewcomment.replied_a_comment', undef, { user => $user } ); } } else { if ($edited) { - $msg = LJ::u_equals($self->comment->entry->poster, $u) ? "$user edited a reply to your post: " : "$user edited a reply to a post: "; + $msg = LJ::u_equals($self->comment->entry->poster, $u) + ? LJ::Lang::get_text($lang, 'sms.journalnewcomment.edit_reply_your_post', undef, { user => $user } ) + : LJ::Lang::get_text($lang, 'sms.journalnewcomment.edit_reply_a_post', undef, { user => $user } ); } else { - $msg = LJ::u_equals($self->comment->entry->poster, $u) ? "$user replied to your post: " : "$user replied to a post: "; + $msg = LJ::u_equals($self->comment->entry->poster, $u) + ? LJ::Lang::get_text($lang, 'sms.journalnewcomment.replied_your_post', undef, { user => $user } ) + : LJ::Lang::get_text($lang, 'sms.journalnewcomment.replied_a_post', undef, { user => $user } ); } } - return $msg . $self->comment->body_text; + #my $tinyurl = LJ::API::BitLy->shorten($self->comment->url); + my $tinyurl = LJ::Bitly->to_short($self->comment->url); + + return $msg . " " . $tinyurl; } sub content {