Committer: wisest-owl
LJSUP-12215: Suspend reason for publicU trunk/cgi-bin/LJ/Widget/ErrorPage.pm U trunk/htdocs/error-page.bml.text
Modified: trunk/cgi-bin/LJ/Widget/ErrorPage.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/ErrorPage.pm 2012-05-17 09:12:05 UTC (rev 11971) +++ trunk/cgi-bin/LJ/Widget/ErrorPage.pm 2012-05-17 09:49:38 UTC (rev 11972) @@ -135,9 +135,18 @@ 'suspended_post' => sub { my %args = @_; my $journal_username = $args{'journal_username'}; + my $suspend_reason = $args{'journal'}->prop ('suspend_reason'); + + my $description_ml_var = '.errorpage.suspended_post.description.alien'; + if ($suspend_reason) { + $description_ml_var = '.errorpage.suspended_post.description.alien.reason'; + } my $ml_description = LJ::Lang::ml( - '.errorpage.suspended_post.description.alien', - { 'username' => $journal_username }, + $description_ml_var, + { + 'username' => $journal_username, + 'suspend_reason' => $suspend_reason, + }, ); return { @@ -172,19 +181,27 @@ my $remote_equals_journal = $args{'remote_equals_journal'}; my $remote = $args{'remote'}; my $can_view_reason = LJ::check_priv($remote,'historyview','suspend'); + my $suspend_reason = $args{'journal'}->prop ('suspend_reason'); my $ml_description = ''; + my $description_ml_var = ''; if ($remote_equals_journal) { - $ml_description = LJ::Lang::ml( - '.errorpage.suspended.description.owner', - { 'username' => $journal_username }, - ); + $description_ml_var = '.errorpage.suspended.description.owner'; + if ($suspend_reason) { + $description_ml_var = '.errorpage.suspended.description.owner.reason'; + } } else { - $ml_description = LJ::Lang::ml( - '.errorpage.suspended.description.alien', - { 'username' => $journal_username }, - ); + $description_ml_var = '.errorpage.suspended.description.alien'; + if ($suspend_reason) { + $description_ml_var = '.errorpage.suspended.description.alien.reason'; + } } + $ml_description = LJ::Lang::ml($description_ml_var, + { + 'username' => $journal_username, + 'suspend_reason' => $suspend_reason, + }, + ); # using direct DB request because # there are no reading methods for statushistory Modified: trunk/htdocs/error-page.bml.text =================================================================== --- trunk/htdocs/error-page.bml.text 2012-05-17 09:12:05 UTC (rev 11971) +++ trunk/htdocs/error-page.bml.text 2012-05-17 09:49:38 UTC (rev 11972) @@ -114,15 +114,21 @@ .errorpage.suspended.description.alien|staleness=1 .errorpage.suspended.description.alien=This journal has been suspended, all posts of this journal are not available for reading. For confidentiality reasons we can not discuss the reasons for which the account was frozen, with someone else other than the account holder. +.errorpage.suspended.description.alien.suspend=This journal has been suspended, all posts of this journal are not available for reading. For confidentiality reasons we can not discuss the reasons for which the account was frozen, with someone else other than the account holder. The reason for this suspension is [[suspend_reason]]. + .errorpage.suspended.description.owner|staleness=1 .errorpage.suspended.description.owner=Your journal has been suspended, all posts of this journal are not available for reading. +.errorpage.suspended.description.owner.suspend=Your journal has been suspended, all posts of this journal are not available for reading. The reason for this suspension is [[suspend_reason]]. + .errorpage.suspended.title|staleness=1 .errorpage.suspended.title=Suspended Journal .errorpage.suspended_post.description.alien|staleness=1 .errorpage.suspended_post.description.alien=This entry has been suspended and not available for reading. For confidentiality reasons we can not discuss the reasons for which the entry was frozen, with someone else other than the account holder. +.errorpage.suspended_post.description.alien.reason=This entry has been suspended and not available for reading. For confidentiality reasons we can not discuss the reasons for which the entry was frozen, with someone else other than the account holder. The reason for this suspension is [[suspend_reason]]. + .errorpage.suspended_photo_album.description=You cannot view this photo/album because it has been suspended. .errorpage.suspended_photo_album.title=Suspended