From 4c5be6dcf1bea95db215ba9629da58bc70ca1875 Mon Sep 17 00:00:00 2001 From: Zachary Doll Date: Mon, 17 Mar 2014 13:00:48 -0500 Subject: [PATCH] Added translations to post reactions rule. Closes issue #23 --- library/rules/class.postreactions.php | 4 ++-- locale/en-CA/definitions.php | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/library/rules/class.postreactions.php b/library/rules/class.postreactions.php index b666dd6..85170e1 100644 --- a/library/rules/class.postreactions.php +++ b/library/rules/class.postreactions.php @@ -53,11 +53,11 @@ class PostReactions implements YagaRule { $ActionList = ''; foreach($Actions as $Action) { - $ActionList .= Wrap(sprintf(T("# of %s's:"), $Action->Name) . ' ' . $Form->Textbox('ActionID_' . $Action->ActionID, array('class' => 'SmallInput')), 'li'); + $ActionList .= Wrap(sprintf(T('Yaga.Rules.PostReactions.LabelFormat'), $Action->Name) . ' ' . $Form->Textbox('ActionID_' . $Action->ActionID, array('class' => 'SmallInput')), 'li'); } if($ActionList == '') { - $String .= 'No actions defined.'; + $String .= T('Yaga.Error.NoActions'); } else { $String .= Wrap($ActionList, 'ul'); diff --git a/locale/en-CA/definitions.php b/locale/en-CA/definitions.php index 786f082..9a7a04e 100755 --- a/locale/en-CA/definitions.php +++ b/locale/en-CA/definitions.php @@ -78,6 +78,7 @@ $Definition['Promoted Content'] = 'Promoted Content'; $Definition['Yaga.Error.ReactToOwn'] = 'You cannot react to your own content.'; $Definition['Yaga.Error.NoRules'] = 'You cannot add or edit badges without rules!'; $Definition['Yaga.Error.Rule404'] = 'Rule not found.'; +$Definition['Yaga.Error.NoActions'] = 'There are no actions defined.'; $Definition['Yaga.Error.NoBadges'] = 'You cannot award badges without any badges defined.'; $Definition['Yaga.Error.NoRanks'] = 'You cannot promote users without any ranks defined.'; $Definition['Yaga.Error.NeedJS'] = 'That must be done via Javascript'; @@ -174,6 +175,10 @@ $Definition['Yaga.Rules.NewbieComment.Desc'] = 'Award this badge if a comment is $Definition['Yaga.Rules.NewbieComment.Criteria.Head'] = 'User Newbness'; $Definition['Yaga.Rules.PhotoExists'] = 'User has Avatar'; $Definition['Yaga.Rules.PhotoExists.Desc'] = 'Award this badge if the user has uploaded a profile photo.'; +$Definition['Yaga.Rules.PostReactions'] = 'Post Reaction Count'; +$Definition['Yaga.Rules.PostReactions.Desc'] = 'Award this badge if the user has a single post with the specified reaction counts.'; +$Definition['Yaga.Rules.PostReactions.Criteria.Head'] = 'Reaction Counts'; +$Definition['Yaga.Rules.PostReactions.LabelFormat'] = "# of %s's:"; $Definition['Yaga.Rules.QnAAnserCount'] = 'Accepted Answers (QnA Plugin required)'; $Definition['Yaga.Rules.QnAAnserCount.Desc'] = 'Award this badge if the user has accepted answers that fit the criteria.'; $Definition['Yaga.Rules.QnAAnserCount.Criteria.Head'] = 'How many accepted answers?';