fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2012-01-06 09:14 am

[dw-free] "You've been invited to $community" email subject not stripped

[commit: http://hg.dwscoalition.org/dw-free/rev/ae95ffb56e68]

http://bugs.dwscoalition.org/show_bug.cgi?id=4074

English-strip this string.

Patch by [personal profile] ninetydegrees.

Files modified:
  • bin/upgrading/deadphrases.dat
  • bin/upgrading/en.dat
  • cgi-bin/LJ/Event/CommunityInvite.pm
--------------------------------------------------------------------------------
diff -r 72327f6453d4 -r ae95ffb56e68 bin/upgrading/deadphrases.dat
--- a/bin/upgrading/deadphrases.dat	Fri Jan 06 17:11:38 2012 +0800
+++ b/bin/upgrading/deadphrases.dat	Fri Jan 06 17:14:32 2012 +0800
@@ -1492,4 +1492,6 @@
 
 general /profile.bml.label.gizmo
 general /profile.bml.label.gizmo3
-general /manage/profile/index.bml.chat.gizmo
\ No newline at end of file
+general /manage/profile/index.bml.chat.gizmo
+
+general esn.comm_invite.subject
\ No newline at end of file
diff -r 72327f6453d4 -r ae95ffb56e68 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat	Fri Jan 06 17:11:38 2012 +0800
+++ b/bin/upgrading/en.dat	Fri Jan 06 17:14:32 2012 +0800
@@ -1054,7 +1054,7 @@
 You can:
 .
 
-esn.comm_invite.subject=You've been invited to join [[user]]
+esn.comm_invite.email.subject=You've been invited to join [[community]]
 
 esn.comm_join_approve.email_subject=Your request to join [[community]] community
 
diff -r 72327f6453d4 -r ae95ffb56e68 cgi-bin/LJ/Event/CommunityInvite.pm
--- a/cgi-bin/LJ/Event/CommunityInvite.pm	Fri Jan 06 17:11:38 2012 +0800
+++ b/cgi-bin/LJ/Event/CommunityInvite.pm	Fri Jan 06 17:14:32 2012 +0800
@@ -29,7 +29,7 @@
 sub is_common { 0 }
 
 my @_ml_strings = (
-    'esn.comm_invite.subject',      # "You've been invited to join [[user]]"
+    'esn.comm_invite.email.subject',# "You've been invited to join [[community]]"
     'esn.comm_invite.email',        # 'Hi [[user]],
                                     #
                                     # [[maintainer]] has invited you to join the community [[community]]!
@@ -42,8 +42,10 @@
 );
 
 sub as_email_subject {
-    my $self = shift;
-    return sprintf "You've been invited to join %s", $self->comm->user;
+    my ($self, $u) = @_;
+    my $cu      = $self->comm;
+    my $lang    = $u->prop( 'browselang' );
+    return LJ::Lang::get_text( $lang, 'esn.comm_invite.email.subject', undef, { 'community' => $cu->user } );
 }
 
 sub _as_email {
--------------------------------------------------------------------------------