Skip to content

Commit

Permalink
Merge pull request #3878 from mzorz/issue/3877-comment-type-hard-to-t…
Browse files Browse the repository at this point in the history
…ranslate

changed empty comments strings to be absolute per CommentStatus type
  • Loading branch information
maxme committed Mar 22, 2016
2 parents 8c1bfc6 + d58d347 commit f380ada
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,18 @@ public String onShowEmptyViewMessage(EmptyViewMessageType emptyViewMsgType) {
if (filter == null || CommentStatus.UNKNOWN.equals(filter)) {
return getString(R.string.comments_empty_list);
} else {
return getString(R.string.comments_empty_list_filtered, mCommentStatusFilter.getLabel().toLowerCase());
switch (mCommentStatusFilter) {
case APPROVED:
return getString(R.string.comments_empty_list_filtered_approved);
case UNAPPROVED:
return getString(R.string.comments_empty_list_filtered_pending);
case SPAM:
return getString(R.string.comments_empty_list_filtered_spam);
case TRASH:
return getString(R.string.comments_empty_list_filtered_trashed);
default:
return getString(R.string.comments_empty_list);
}
}

} else {
Expand Down
5 changes: 4 additions & 1 deletion WordPress/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@
<string name="comment_status_all">All</string>
<string name="edit_comment">Edit comment</string>
<string name="comments_empty_list">No comments</string>
<string name="comments_empty_list_filtered">No %s comments</string>
<string name="comments_empty_list_filtered_approved">No Approved comments</string>
<string name="comments_empty_list_filtered_pending">No Pending comments</string>
<string name="comments_empty_list_filtered_spam">No Spam comments</string>
<string name="comments_empty_list_filtered_trashed">No Trashed comments</string>
<string name="comment_reply_to_user">Reply to %s</string>
<string name="comment_trashed">Comment trashed</string>
<string name="comment_spammed">Comment marked as spam</string>
Expand Down

0 comments on commit f380ada

Please sign in to comment.