From aa69629a3c7905deda0a1d8768c36b6d1fc8e93b Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 4 Feb 2009 21:13:04 +0000 Subject: [PATCH] MINOR Added translatable error message for MemberTableField git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@71389 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/MemberTableField.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/code/MemberTableField.php b/code/MemberTableField.php index 5eb19972..43f12c98 100755 --- a/code/MemberTableField.php +++ b/code/MemberTableField.php @@ -170,10 +170,23 @@ class MemberTableField extends ComplexTableField { // TODO add javascript to highlight added row (problem: might not show up due to sorting/filtering) FormResponse::update_dom_id($this->id(), $this->renderWith($this->template), true); - FormResponse::status_message(_t('MemberTableField.ADDEDTOGROUP','Added member to group'), 'good'); + FormResponse::status_message( + _t( + 'MemberTableField.ADDEDTOGROUP','Added member to group' + ), + 'good' + ); } else { - FormResponse::status_message(Convert::raw2xml("I couldn't add that user to this group:\n\n" . $valid->starredlist()), 'bad'); + $message = sprintf( + _t( + 'MemberTableField.ERRORADDINGUSER', + 'There was an error adding the user to the group: %s' + ), + Convert::raw2xml($valid->starredList()) + ); + + FormResponse::status_message($message, 'bad'); } return FormResponse::respond();