[livejournal] r20853: LJSUP-10876 (Comments notifications - ti...
Committer: ailyin
LJSUP-10876 (Comments notifications - titles)U trunk/bin/upgrading/en.dat U trunk/cgi-bin/LJ/Event/JournalNewComment.pm
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat 2011-12-23 11:58:36 UTC (rev 20852)
+++ trunk/bin/upgrading/en.dat 2011-12-23 12:18:25 UTC (rev 20853)
@@ -2149,35 +2149,53 @@
esn.mail_comments.subject.comment_you_edited|staleness=1
esn.mail_comments.subject.comment_you_edited=Comment you edited...
+esn.mail_comments.subject.comment_you_edited.entry_subject=Comment you edited in "[[subject]]...
+
esn.mail_comments.subject.comment_you_posted|staleness=1
esn.mail_comments.subject.comment_you_posted=Comment you posted...
+esn.mail_comments.subject.comment_you_posted.entry_subject=Comment you posted in "[[subject]]"...
+
esn.mail_comments.subject.edit_reply_to_an_entry|staleness=1
esn.mail_comments.subject.edit_reply_to_an_entry=Edited reply to an entry...
+esn.mail_comments.subject.edit_reply_to_an_entry.entry_subject=Edited reply to "[[subject]]...
+
esn.mail_comments.subject.edit_reply_to_a_comment|staleness=1
esn.mail_comments.subject.edit_reply_to_a_comment=Edited reply to a comment...
+esn.mail_comments.subject.edit_reply_to_a_comment.entry_subject=Edited reply to a comment in "[[subject]]...
+
esn.mail_comments.subject.edit_reply_to_your_comment|staleness=1
esn.mail_comments.subject.edit_reply_to_your_comment=Edited reply to your comment...
+esn.mail_comments.subject.edit_reply_to_your_comment.entry_subject=Edited reply to your comment in "[[subject]]"...
+
esn.mail_comments.subject.edit_reply_to_your_entry|staleness=1
esn.mail_comments.subject.edit_reply_to_your_entry=Edited reply to your entry...
-esn.mail_comments.subject.entry_subject=Reply to "[[subject]]"...
+esn.mail_comments.subject.edit_reply_to_your_entry.entry_subject=Edited reply to your entry "[[subject]]"...
esn.mail_comments.subject.reply_to_an_entry|staleness=1
esn.mail_comments.subject.reply_to_an_entry=Reply to an entry...
+esn.mail_comments.subject.reply_to_an_entry.entry_subject=Reply to "[[subject]]"...
+
esn.mail_comments.subject.reply_to_a_comment|staleness=1
esn.mail_comments.subject.reply_to_a_comment=Reply to a comment...
+esn.mail_comments.subject.reply_to_a_comment.entry_subject=Reply to a comment in "[[subject]]"...
+
esn.mail_comments.subject.reply_to_your_comment|staleness=1
esn.mail_comments.subject.reply_to_your_comment=Reply to your comment...
+esn.mail_comments.subject.reply_to_your_comment.entry_subject=Reply to your comment in "[[subject]]"...
+
esn.mail_comments.subject.reply_to_your_entry|staleness=1
esn.mail_comments.subject.reply_to_your_entry=Reply to your entry...
+esn.mail_comments.subject.reply_to_your_entry.entry_subject=Reply to your entry "[[subject]]"...
+
esn.manage_community|staleness=1
esn.manage_community=[[openlink]]Manage your communities[[closelink]]
Modified: trunk/cgi-bin/LJ/Event/JournalNewComment.pm
===================================================================
--- trunk/cgi-bin/LJ/Event/JournalNewComment.pm 2011-12-23 11:58:36 UTC (rev 20852)
+++ trunk/cgi-bin/LJ/Event/JournalNewComment.pm 2011-12-23 12:18:25 UTC (rev 20853)
@@ -114,13 +114,6 @@
my $key = 'esn.mail_comments.subject.';
if ( my $comment_subject = $self->comment->subject_orig ) {
return LJ::strip_html($comment_subject);
- } elsif ( my $entry_subject = $self->comment->entry->subject_raw ) {
- return LJ::Lang::get_text(
- $lang,
- 'esn.mail_comments.subject.entry_subject',
- undef,
- { 'subject' => LJ::strip_html($entry_subject) },
- );
} elsif (LJ::u_equals($self->comment->poster, $u)) {
$key .= $edited ? 'comment_you_edited' : 'comment_you_posted';
} elsif ($self->comment->parent) {
@@ -136,7 +129,14 @@
$key .= LJ::u_equals($self->comment->entry->poster, $u) ? 'reply_to_your_entry' : 'reply_to_an_entry';
}
}
- return LJ::Lang::get_text($lang, $key);
+
+ my $ml_params = {};
+ if ( my $entry_subject = $self->comment->entry->subject_raw ) {
+ $key .= '.entry_subject';
+ $ml_params->{'subject'} = LJ::strip_html($entry_subject);
+ };
+
+ return LJ::Lang::get_text( $lang, $key, undef, $ml_params );
}
sub as_email_string {
