Synced locale up with definitions in use. Also namespaced most definitions
This commit is contained in:
parent
61d334ab44
commit
c4bd5b5f15
@ -41,7 +41,7 @@ class ActionController extends DashboardController {
|
||||
$this->Permission('Yaga.Reactions.Manage');
|
||||
$this->AddSideMenu('action/settings');
|
||||
|
||||
$this->Title(T('Manage Reactions'));
|
||||
$this->Title(T('Yaga.ManageReactions'));
|
||||
|
||||
// Get list of actions from the model and pass to the view
|
||||
$this->SetData('Actions', $this->ActionModel->GetActions());
|
||||
@ -60,12 +60,12 @@ class ActionController extends DashboardController {
|
||||
$this->Form->SetModel($this->ActionModel);
|
||||
|
||||
$Edit = FALSE;
|
||||
$this->Title(T('Add Action'));
|
||||
$this->Title(T('Yaga.AddAction'));
|
||||
if($ActionID) {
|
||||
$this->Action = $this->ActionModel->GetAction($ActionID);
|
||||
$this->Form->AddHidden('ActionID', $ActionID);
|
||||
$Edit = TRUE;
|
||||
$this->Title(T('Edit Action'));
|
||||
$this->Title(T('Yaga.EditAction'));
|
||||
}
|
||||
|
||||
// TODO: Autoload these, or something
|
||||
@ -109,11 +109,11 @@ class ActionController extends DashboardController {
|
||||
Wrap($Action->Name, 'span', array('class' => 'ReactLabel')), 'div', array('class' => 'Preview Reactions')), 'div', array('class' => 'Action')), 'li', array('id' => 'Action_' . $Action->ActionID));
|
||||
if($Edit) {
|
||||
$this->JsonTarget('#Action_' . $this->Action->ActionID, $NewActionRow, 'ReplaceWith');
|
||||
$this->InformMessage(T('Action updated successfully!'));
|
||||
$this->InformMessage(T('Yaga.ActionUpdated'));
|
||||
}
|
||||
else {
|
||||
$this->JsonTarget('#Actions', $NewActionRow, 'Append');
|
||||
$this->InformMessage(T('Action added successfully!'));
|
||||
$this->InformMessage(T('Yaga.ActionAdded'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class BadgeController extends DashboardController {
|
||||
$this->Permission('Yaga.Badges.Manage');
|
||||
$this->AddSideMenu('badge/settings');
|
||||
|
||||
$this->Title(T('Manage Badges'));
|
||||
$this->Title(T('Yaga.ManageBadges'));
|
||||
|
||||
// Get list of badges from the model and pass to the view
|
||||
$this->SetData('Badges', $this->BadgeModel->GetBadges());
|
||||
@ -62,7 +62,7 @@ class BadgeController extends DashboardController {
|
||||
|
||||
// Only allow editing if some rules exist
|
||||
if(!RulesController::GetRules()) {
|
||||
throw new Gdn_UserException(T('You cannot add or edit badges without rules!'));
|
||||
throw new Gdn_UserException(T('Yaga.Error.NoRules'));
|
||||
}
|
||||
|
||||
$Edit = FALSE;
|
||||
@ -111,10 +111,10 @@ class BadgeController extends DashboardController {
|
||||
$this->Form->SetFormValue('RuleCriteria', $SerializedCriteria);
|
||||
if($this->Form->Save()) {
|
||||
if($Edit) {
|
||||
$this->InformMessage(T('Badge updated successfully!'));
|
||||
$this->InformMessage(T('Yaga.BadgeUpdated'));
|
||||
}
|
||||
else {
|
||||
$this->InformMessage(T('Badge added successfully!'));
|
||||
$this->InformMessage(T('Yaga.BadgeAdded'));
|
||||
}
|
||||
Redirect('/yaga/badge/settings');
|
||||
}
|
||||
@ -153,7 +153,7 @@ class BadgeController extends DashboardController {
|
||||
*/
|
||||
public function Toggle($BadgeID) {
|
||||
if(!$this->Request->IsPostBack()) {
|
||||
throw new Gdn_UserException(T('That must be done via Javascript'));
|
||||
throw new Gdn_UserException(T('Yaga.Error.NeedJS'));
|
||||
}
|
||||
$this->Permission('Yaga.Badges.Manage');
|
||||
$this->AddSideMenu('badge/settings');
|
||||
@ -191,7 +191,7 @@ class BadgeController extends DashboardController {
|
||||
|
||||
if (Gdn::Session()->ValidateTransientKey($TransientKey)) {
|
||||
$this->BadgeModel->SetField($BadgeID, 'Photo', NULL);
|
||||
$this->InformMessage(T('Badge photo has been deleted.'));
|
||||
$this->InformMessage(T('Yaga.BadgePhotoDeleted'));
|
||||
}
|
||||
|
||||
if ($this->_DeliveryType == DELIVERY_TYPE_ALL) {
|
||||
@ -216,7 +216,7 @@ class BadgeController extends DashboardController {
|
||||
|
||||
// Only allow awarding if some badges exist
|
||||
if(!$this->BadgeModel->GetBadgeCount()) {
|
||||
throw new Gdn_UserException(T('You cannot award badges without any badges defined.'));
|
||||
throw new Gdn_UserException(T('Yaga.Error.NoBadges'));
|
||||
}
|
||||
|
||||
$UserModel = Gdn::UserModel();
|
||||
@ -242,7 +242,7 @@ class BadgeController extends DashboardController {
|
||||
if($Validation->Validate($this->Request->Post())) {
|
||||
$FormValues = $this->Form->FormValues();
|
||||
if($this->BadgeModel->UserHasBadge($FormValues['UserID'], $FormValues['BadgeID'])) {
|
||||
$this->Form->AddError($User->Name . T(' already has this badge!'), 'BadgeID');
|
||||
$this->Form->AddError(sprintf(T('Yaga.BadgeAlreadyAwarded'), $User->Name), 'BadgeID');
|
||||
// Need to respecify the user id
|
||||
$this->Form->AddHidden('UserID', $User->UserID);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ class BadgesController extends Gdn_Controller {
|
||||
* This renders out the full list of badges
|
||||
*/
|
||||
public function All() {
|
||||
$this->Title(T('All Badges'));
|
||||
$this->Title(T('Yaga.AllBadges'));
|
||||
|
||||
$UserID = Gdn::Session()->UserID;
|
||||
// Get list of badges from the model and pass to the view
|
||||
@ -78,7 +78,7 @@ class BadgesController extends Gdn_Controller {
|
||||
$this->SetData('UserBadgeAward', $UserBadgeAward);
|
||||
$this->SetData('Badge', $Badge);
|
||||
|
||||
$this->Title(T('View Badge: ') . $Badge->Name);
|
||||
$this->Title(T('Yaga.ViewBadge') . $Badge->Name);
|
||||
|
||||
$this->Render();
|
||||
}
|
||||
|
@ -37,12 +37,12 @@ class BestOfController extends Gdn_Controller {
|
||||
* This renders out the full list of badges
|
||||
*/
|
||||
public function All() {
|
||||
$this->Title(T('Best of Everything'));
|
||||
$this->Title(T('Yaga.BestOfEverything'));
|
||||
$Module = new PromotedContentModule();
|
||||
$Module->Selector = 'Score';
|
||||
|
||||
$this->SetData('Module', $Module);
|
||||
$this->Title(T('Best Of...'));
|
||||
$this->Title(T('Yaga.BestOf'));
|
||||
$this->Render('all');
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ class ConfigureController extends DashboardController {
|
||||
'Yaga.LeaderBoard.Limit' => array('LabelCode' => 'Maximum number of leaders to show', 'Control' => 'Textbox', 'Options' => array('Size' => 45, 'class' => 'SmallInput'))
|
||||
));
|
||||
$this->AddSideMenu('configure');
|
||||
$this->Title(T('Yaga.Settings', 'Gamification Settings'));
|
||||
$this->Title(T('Yaga.Settings'));
|
||||
$this->ConfigurationModule = $ConfigModule;
|
||||
$ConfigModule->RenderAll();
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class RankController extends DashboardController {
|
||||
$this->Permission('Yaga.Ranks.Manage');
|
||||
$this->AddSideMenu('rank/settings');
|
||||
|
||||
$this->Title(T('Manage Ranks'));
|
||||
$this->Title(T('Yaga.ManageRanks'));
|
||||
|
||||
// Get list of ranks from the model and pass to the view
|
||||
$this->SetData('Ranks', $this->RankModel->GetRanks());
|
||||
@ -59,13 +59,13 @@ class RankController extends DashboardController {
|
||||
$this->AddSideMenu('rank/settings');
|
||||
$this->Form->SetModel($this->RankModel);
|
||||
|
||||
$this->Title(T('Add Rank'));
|
||||
$this->Title(T('Yaga.AddRank'));
|
||||
$Edit = FALSE;
|
||||
if($RankID) {
|
||||
$this->Rank = $this->RankModel->GetRank($RankID);
|
||||
$this->Form->AddHidden('RankID', $RankID);
|
||||
$Edit = TRUE;
|
||||
$this->Title(T('Edit Rank'));
|
||||
$this->Title(T('Yaga.EditRank'));
|
||||
}
|
||||
|
||||
// Load up all permissions
|
||||
@ -101,10 +101,10 @@ class RankController extends DashboardController {
|
||||
|
||||
if($this->Form->Save()) {
|
||||
if($Edit) {
|
||||
$this->InformMessage(T('Rank updated successfully!'));
|
||||
$this->InformMessage(T('Yaga.RankUpdated'));
|
||||
}
|
||||
else {
|
||||
$this->InformMessage(T('Rank added successfully!'));
|
||||
$this->InformMessage(T('Yaga.RankAdded'));
|
||||
}
|
||||
Redirect('/yaga/rank/settings');
|
||||
}
|
||||
@ -181,7 +181,7 @@ class RankController extends DashboardController {
|
||||
|
||||
if (Gdn::Session()->ValidateTransientKey($TransientKey)) {
|
||||
$this->RankModel->SetField($RankID, 'Photo', NULL);
|
||||
$this->InformMessage(T('Rank photo has been deleted.'));
|
||||
$this->InformMessage(T('Yaga.RankPhotoDeleted'));
|
||||
}
|
||||
|
||||
if ($this->_DeliveryType == DELIVERY_TYPE_ALL) {
|
||||
@ -206,7 +206,7 @@ class RankController extends DashboardController {
|
||||
|
||||
// Only allow awarding if some ranks exist
|
||||
if(!$this->RankModel->GetRankCount()) {
|
||||
throw new Gdn_UserException(T('You cannot promote users without any ranks defined.'));
|
||||
throw new Gdn_UserException(T('Yaga.Error.NoRanks'));
|
||||
}
|
||||
|
||||
$UserModel = Gdn::UserModel();
|
||||
@ -232,7 +232,7 @@ class RankController extends DashboardController {
|
||||
if($Validation->Validate($this->Request->Post())) {
|
||||
$FormValues = $this->Form->FormValues();
|
||||
if($this->RankModel->UserHasRank($FormValues['UserID'], $FormValues['RankID'])) {
|
||||
$this->Form->AddError($User->Name . T(' already has this rank!'), 'RankID');
|
||||
$this->Form->AddError(sprintf(T('Yaga.RankAlreadyAttained'), $User->Name), 'RankID');
|
||||
// Need to respecify the user id
|
||||
$this->Form->AddHidden('UserID', $User->UserID);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class ReactController extends Gdn_Controller {
|
||||
|
||||
// Make sure the action exists and the user is allowed to react
|
||||
if(!$Action) {
|
||||
throw new Gdn_UserException(T('Invalid Action'));
|
||||
throw new Gdn_UserException(T('Yaga.InvalidAction'));
|
||||
}
|
||||
|
||||
if(!Gdn::Session()->CheckPermission($Action->Permission)) {
|
||||
@ -62,13 +62,13 @@ class ReactController extends Gdn_Controller {
|
||||
$Anchor = '#Discussion_' . $DiscussionID . ' .ReactMenu';
|
||||
}
|
||||
else {
|
||||
throw new Gdn_UserException(T('Invalid ID'));
|
||||
throw new Gdn_UserException(T('Yaga.InvalidID'));
|
||||
}
|
||||
|
||||
$UserID = Gdn::Session()->UserID;
|
||||
|
||||
if($Discussion->InsertUserID == $UserID) {
|
||||
throw new Gdn_UserException(T('You cannot react to your own content.'));
|
||||
throw new Gdn_UserException(T('Yaga.Error.ReactToOwn'));
|
||||
}
|
||||
|
||||
// It has passed through the gauntlet
|
||||
@ -93,7 +93,7 @@ class ReactController extends Gdn_Controller {
|
||||
|
||||
// Make sure the action exists and the user is allowed to react
|
||||
if(!$Action) {
|
||||
throw new Gdn_UserException(T('Invalid Action'));
|
||||
throw new Gdn_UserException(T('Yaga.InvalidAction'));
|
||||
}
|
||||
|
||||
if(!Gdn::Session()->CheckPermission($Action->Permission)) {
|
||||
@ -107,13 +107,13 @@ class ReactController extends Gdn_Controller {
|
||||
$Anchor = '#Comment_' . $CommentID . ' .ReactMenu';
|
||||
}
|
||||
else {
|
||||
throw new Gdn_UserException(T('Invalid ID'));
|
||||
throw new Gdn_UserException(T('Yaga.InvalidID'));
|
||||
}
|
||||
|
||||
$UserID = Gdn::Session()->UserID;
|
||||
|
||||
if($Comment->InsertUserID == $UserID) {
|
||||
throw new Gdn_UserException(T('You cannot react to your own content.'));
|
||||
throw new Gdn_UserException(T('Yaga.Error.ReactToOwn'));
|
||||
}
|
||||
|
||||
// It has passed through the gauntlet
|
||||
@ -138,7 +138,7 @@ class ReactController extends Gdn_Controller {
|
||||
|
||||
// Make sure the action exists and the user is allowed to react
|
||||
if(!$Action) {
|
||||
throw new Gdn_UserException(T('Invalid Action'));
|
||||
throw new Gdn_UserException(T('Yaga.InvalidAction'));
|
||||
}
|
||||
|
||||
if(!Gdn::Session()->CheckPermission($Action->Permission)) {
|
||||
@ -152,13 +152,13 @@ class ReactController extends Gdn_Controller {
|
||||
$Anchor = '#Activity_' . $ActivityID . ' .ReactMenu';
|
||||
}
|
||||
else {
|
||||
throw new Gdn_UserException(T('Invalid ID'));
|
||||
throw new Gdn_UserException(T('Yaga.InvalidID'));
|
||||
}
|
||||
|
||||
$UserID = Gdn::Session()->UserID;
|
||||
|
||||
if($Activity['ActivityUserID'] == $UserID) {
|
||||
throw new Gdn_UserException(T('You cannot react to your own content.'));
|
||||
throw new Gdn_UserException(T('Yaga.Error.ReactToOwn'));
|
||||
}
|
||||
|
||||
// It has passed through the gauntlet
|
||||
|
@ -72,7 +72,7 @@ class RulesController extends YagaController {
|
||||
$this->RenderData($Data);
|
||||
}
|
||||
else {
|
||||
$this->RenderException(new Gdn_UserException(T('Rule not found.')));
|
||||
$this->RenderException(new Gdn_UserException(T('Yaga.Error.Rule404')));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,148 @@
|
||||
<?php if (!defined('APPLICATION')) exit();
|
||||
$Definition['Yaga.Settings'] = 'Yaga Settings';
|
||||
$Definition['Yaga.Reason'] = 'Reason (optional)';
|
||||
|
||||
// Actions
|
||||
$Definition['Yaga.Reactions'] = 'Reactions';
|
||||
$Definition['Yaga.Actions.Current'] = 'Current Reactions';
|
||||
$Definition['Yaga.ManageReactions'] = 'Manage Reactions';
|
||||
$Definition['Yaga.AddAction'] = 'Add Action';
|
||||
$Definition['Yaga.EditAction'] = 'Edit Action';
|
||||
$Definition['Yaga.ActionUpdated'] = 'Action updated successfully!';
|
||||
$Definition['Yaga.ActionAdded'] = 'Action added successfully!';
|
||||
$Definition['Yaga.InvalidAction'] = 'Invalid Action';
|
||||
$Definition['Yaga.InvalidID'] = 'Invalid ID';
|
||||
$Definition['Yaga.Actions.Settings.Desc'] = 'Add or edit the available actions that can be used as reactions.';
|
||||
|
||||
// Badges
|
||||
$Definition['Yaga.Badges'] = 'Badges';
|
||||
$Definition['Yaga.Badge'] = 'Badge';
|
||||
$Definition['Yaga.ManageBadges'] = 'Manage Badges';
|
||||
$Definition['Yaga.AddBadge'] = 'Add Badge';
|
||||
$Definition['Yaga.EditBadge'] = 'Edit Badge';
|
||||
$Definition['Yaga.BadgeUpdated'] = 'Badge updated successfully!';
|
||||
$Definition['Yaga.BadgeAdded'] = 'Badge added successfully!';
|
||||
$Definition['Yaga.BadgePhotoDeleted'] = 'Badge photo has been deleted.';
|
||||
$Definition['Yaga.BadgeAlreadyAwarded'] = '%s already has this badge!';
|
||||
$Definition['Yaga.AllBadges'] = 'All Badges';
|
||||
$Definition['Yaga.ViewBadge'] = 'View Badge: ';
|
||||
$Definition['Yaga.MyBadges'] = 'My Badges';
|
||||
$Definition['Yaga.Badge.Award'] = 'Give Badge';
|
||||
$Definition['Yaga.Badge.GiveTo'] = 'Give a Badge to %s';
|
||||
$Definition['Yaga.Badges.Settings.Desc'] = 'Add or edit the available badges that can be earned.';
|
||||
$Definition['Yaga.Badge.Earned.Format'] = 'You earned this badge on %s from %s';
|
||||
$Definition['Yaga.Badge.Earned'] = 'You earned this badge';
|
||||
$Definition['Yaga.Badge.EarnedBySingle'] = '%s person has earned this badge.';
|
||||
$Definition['Yaga.Badge.EarnedByPlural'] = '%s people have earned this badge.';
|
||||
$Definition['Yaga.Badge.EarnedByNone'] = 'Nobody has earned this badge yet.';
|
||||
$Definition['Yaga.Badge.RecentRecipients'] = 'Most recent recipients';
|
||||
|
||||
// Ranks
|
||||
$Definition['Yaga.Ranks'] = 'Ranks';
|
||||
$Definition['Yaga.Rank'] = 'Rank';
|
||||
$Definition['Yaga.ManageRanks'] = 'Manage Ranks';
|
||||
$Definition['Yaga.AddRank'] = 'Add Rank';
|
||||
$Definition['Yaga.EditRank'] = 'Edit Rank';
|
||||
$Definition['Yaga.RankUpdated'] = 'Rank updated successfully!';
|
||||
$Definition['Yaga.RankAdded'] = 'Rank added successfully!';
|
||||
$Definition['Yaga.RankPhotoDeleted'] = 'Rank photo has been deleted.';
|
||||
$Definition['Yaga.RankAlreadyAttained'] = '%s already has this rank!';
|
||||
$Definition['Yaga.Rank.Award'] = 'Give Rank';
|
||||
$Definition['Yaga.Ranks.Settings.Desc'] = 'Add or edit the available ranks that can be earned.';
|
||||
|
||||
// Best Of...
|
||||
$Definition['Yaga.BestOfEverything'] = 'Best of Everything';
|
||||
$Definition['Yaga.BestOf'] = 'Best Of...';
|
||||
$Definition['Promoted Content'] = 'Promoted Content';
|
||||
|
||||
// Error Strings
|
||||
$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.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';
|
||||
|
||||
// Activities
|
||||
$Definition['Yaga.HeadlineFormat.BadgeEarned'] = '{RegardingUserID,You} earned the <a href="{Url,html}">{Data.Name,text}</a> badge.';
|
||||
$Definition['Yaga.HeadlineFormat.Promoted'] = '{RegardingUserID,You} have been promoted to {Data.Name,text}.';
|
||||
|
||||
// Leaderboard Module
|
||||
$Definition['Yaga.LeaderBoard.AllTime'] = 'All Time Leaders';
|
||||
$Definition['Yaga.LeaderBoard.Week'] = "This Week's Leaders";
|
||||
$Definition['Yaga.LeaderBoard.Month'] = "This Month's Leaders";
|
||||
$Definition['Yaga.LeaderBoard.Year'] = "This Years's Leaders";
|
||||
|
||||
// Notifications
|
||||
$Definition['Yaga.Notifications.Badges'] = 'Notify me when I earn a badge.';
|
||||
$Definition['Yaga.Notifications.Ranks'] = 'Notify me when I am promoted in rank.';
|
||||
|
||||
// Misc
|
||||
$Definition['Edit'] = 'Edit';
|
||||
$Definition['Delete'] = 'Delete';
|
||||
$Definition['Image'] = 'Image';
|
||||
$Definition['Rule'] = 'Rule';
|
||||
$Definition['Active'] = 'Active';
|
||||
$Definition['Options'] = 'Options';
|
||||
$Definition['Name'] = 'Name';
|
||||
$Definition['Description'] = 'Description';
|
||||
$Definition['None'] = 'None';
|
||||
$Definition['Icon'] = 'Icon';
|
||||
$Definition['Tooltip'] = 'Tooltip';
|
||||
$Definition['Award Value'] = 'Award Value';
|
||||
$Definition['Elevated Permission'] = 'Elevated Permission';
|
||||
$Definition['Points Required'] = 'Points Required';
|
||||
$Definition['Role Award'] = 'Role Award';
|
||||
$Definition['Auto Award'] = 'Auto Award';
|
||||
$Definition['Enabled'] = 'Enabled';
|
||||
$Definition['Disabled'] = 'Disabled';
|
||||
|
||||
// Rules
|
||||
$Definition['Days'] = 'Days';
|
||||
$Definition['Weeks'] = 'Weeks';
|
||||
$Definition['Years'] = 'Years';
|
||||
$Definition['more than:'] = 'more than:';
|
||||
$Definition['less than:'] = 'less than:';
|
||||
$Definition['more than or equal to:'] = 'more than or equal to:';
|
||||
$Definition['User has'] = 'User has';
|
||||
$Definition['Number of Badge Types'] = 'Number of Badge Types';
|
||||
$Definition['Time Frame'] = 'Time Frame';
|
||||
$Definition['Number of Comments'] = 'Number of Comments';
|
||||
$Definition['Time Frame'] = 'Time Frame';
|
||||
$Definition['Total Comments'] = 'Total Comments';
|
||||
$Definition['Total Discussions'] = 'Total Discussions';
|
||||
$Definition['Holiday date'] = 'Holiday date';
|
||||
$Definition['Time Served'] = 'Time Served';
|
||||
$Definition['User Newbness'] = 'User Newbness';
|
||||
$Definition['Total Reactions'] = 'Total Reactions';
|
||||
$Definition['Time to Comment'] = 'Time to Comment';
|
||||
$Definition['seconds.'] = 'seconds.';
|
||||
$Definition['Social Networks'] = 'Social Networks';
|
||||
$Definition['User has connect to: '] = 'User has connect to: ';
|
||||
|
||||
$Definition['Yaga.Rules.AwardCombo'] = 'Award Combo';
|
||||
$Definition['Yaga.Rules.AwardCombo.Desc'] = 'This rule checks a users badge award type count within the past day. If it is a greater than or equal to the target, it will return true.';
|
||||
$Definition['Yaga.Rules.CommentCount'] = 'Comment Count Total';
|
||||
$Definition['Yaga.Rules.CommentCount.Desc'] = 'This rule checks a users total comment count against the criteria. If the user has more comments than the criteria, this will return true.';
|
||||
$Definition['Yaga.Rules.CommentMarathon'] = 'Comment Marathon';
|
||||
$Definition['Yaga.Rules.CommentMarathon.Desc'] = 'This rule checks a users comment count within the past duratio. If it is a greater than or equal to the target, it will return true.';
|
||||
$Definition['Yaga.Rules.DiscussionCount'] = 'Discussion Count Total';
|
||||
$Definition['Yaga.Rules.DiscussionCount.Desc'] = 'This rule checks a users total discussion count against the criteria. It will return true once the comparison is true.';
|
||||
$Definition['Yaga.Rules.HasMentioned'] = 'Mention';
|
||||
$Definition['Yaga.Rules.HasMentioned.Desc'] = 'This rule checks a users comment for mentions. If the user mentions someone, this will return true.';
|
||||
$Definition['Yaga.Rules.HolidayVisit'] = 'Holiday Visit';
|
||||
$Definition['Yaga.Rules.HolidayVisit.Desc'] = 'This rule checks a users visit date against the target date. If they visited on the same day of the year, it is awarded.';
|
||||
$Definition['Yaga.Rules.LengthOfService'] = 'Length of Service';
|
||||
$Definition['Yaga.Rules.LengthOfService.Desc'] = 'This rule checks a users join date against the current date. It will return true if the account is older than the specified number of days, weeks, or years.';
|
||||
$Definition['Yaga.Rules.ManualAward'] = 'Manual Award';
|
||||
$Definition['Yaga.Rules.ManualAward.Desc'] = 'This rule will <strong>never</strong> be awarded <em>automatically</em> and should be kept disabled. Use it for badges you want to hand out manually.';
|
||||
$Definition['Yaga.Rules.NewbieComment'] = "Comment on New User's Discussion";
|
||||
$Definition['Yaga.Rules.NewbieComment.Desc'] = 'This rule checks if a comment is placed on a newbs first discussion. If it is, this will return true.';
|
||||
$Definition['Yaga.Rules.PhotoExists'] = 'User has Avatar';
|
||||
$Definition['Yaga.Rules.PhotoExists.Desc'] = 'This rule returns true if the user has uploaded a profile photo.';
|
||||
$Definition['Yaga.Rules.ReactionCount'] = 'Reaction Count Total';
|
||||
$Definition['Yaga.Rules.ReactionCount.Desc'] = 'This rule checks a users reaction count against the target. It will return true once the user has as many or more than the given reactions count.';
|
||||
$Definition['Yaga.Rules.ReflexComment'] = 'Comment on New Discussion Quickly';
|
||||
$Definition['Yaga.Rules.ReflexComment.Desc'] = 'This rule checks if a comment is placed within x seconds. If it is, this will return true.';
|
||||
$Definition['Yaga.Rules.SocialConnection'] = 'Social Connections';
|
||||
$Definition['Yaga.Rules.SocialConnection.Desc'] = 'This rule checks if a user has connected to the target social network. If the user has, this will return true.';
|
||||
|
@ -188,7 +188,7 @@ class BadgeModel extends Gdn_Model {
|
||||
'RecordType' => 'Badge',
|
||||
'RecordID' => $BadgeID,
|
||||
'Route' => '/badges/detail/' . $Badge->BadgeID . '/' . Gdn_Format::Url($Badge->Name),
|
||||
'HeadlineFormat' => T('Yaga.HeadlineFormat.BadgeEarned', '{RegardingUserID,You} earned the <a href="{Url,html}">{Data.Name,text}</a> badge.'),
|
||||
'HeadlineFormat' => T('Yaga.HeadlineFormat.BadgeEarned'),
|
||||
'Data' => array(
|
||||
'Name' => $Badge->Name
|
||||
),
|
||||
|
@ -145,7 +145,7 @@ class RankModel extends Gdn_Model {
|
||||
'RecordType' => 'Rank',
|
||||
'RecordID' => $RankID,
|
||||
'Route' => '/ranks/detail/' . $Rank->RankID . '/' . Gdn_Format::Url($Rank->Name),
|
||||
'HeadlineFormat' => T('Yaga.HeadlineFormat.Promoted', '{RegardingUserID,You} have been promoted to {Data.Name,text}.'),
|
||||
'HeadlineFormat' => T('Yaga.HeadlineFormat.Promoted'),
|
||||
'Data' => array(
|
||||
'Name' => $Rank->Name
|
||||
),
|
||||
|
@ -19,10 +19,10 @@ class BadgesModule extends Gdn_Module {
|
||||
}
|
||||
|
||||
if(Gdn::Session()->UserID == $UserID) {
|
||||
$this->Title = T('My Badges');
|
||||
$this->Title = T('Yaga.MyBadges');
|
||||
}
|
||||
else {
|
||||
$this->Title = T('Badges');
|
||||
$this->Title = T('Yaga.Badges');
|
||||
}
|
||||
|
||||
$BadgeModel = new BadgeModel();
|
||||
|
@ -32,16 +32,16 @@ class LeaderBoardModule extends Gdn_Module {
|
||||
$this->Data = $Leaders;
|
||||
switch($SlotType) {
|
||||
case 'a':
|
||||
$this->Title = T('All Time Leaders');
|
||||
$this->Title = T('Yaga.LeaderBoard.AllTime');
|
||||
break;
|
||||
case 'w':
|
||||
$this->Title = T("This Week's Leaders");
|
||||
$this->Title = T('Yaga.LeaderBoard.Week');
|
||||
break;
|
||||
case 'm':
|
||||
$this->Title = T("This Month's Leaders");
|
||||
$this->Title = T('Yaga.LeaderBoard.Month');
|
||||
break;
|
||||
case 'y':
|
||||
$this->Title = T("This Years's Leaders");
|
||||
$this->Title = T('Yaga.LeaderBoard.Year');
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,9 @@ class AwardCombo implements YagaRule {
|
||||
'year' => T('Years')
|
||||
);
|
||||
|
||||
$String = $Form->Label(T('Number of Badge Types'), 'AwardCombo');
|
||||
$String = $Form->Label('Number of Badge Types', 'AwardCombo');
|
||||
$String .= $Form->Textbox('Target');
|
||||
$String .= $Form->Label(T('Time Frame'));
|
||||
$String .= $Form->Label('Time Frame');
|
||||
$String .= $Form->Textbox('Duration');
|
||||
$String .= $Form->DropDown('Period', $Lengths);
|
||||
|
||||
@ -55,12 +55,12 @@ class AwardCombo implements YagaRule {
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks a users badge award type count within the past day. If it is a greater than or equal to the target, it will return true.');
|
||||
$Description = T('Yaga.Rules.AwardCombo.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Award Combo');
|
||||
return T('Yaga.Rules.AwardCombo');
|
||||
}
|
||||
}
|
||||
|
@ -40,11 +40,11 @@ class CommentCount implements YagaRule{
|
||||
'gte' => T('more than or equal to:')
|
||||
);
|
||||
|
||||
$String = $Form->Label(T('Total comments'), 'CommentCount');
|
||||
$String .= T('User has ');
|
||||
$String = $Form->Label('Total comments', 'CommentCount');
|
||||
$String .= T('User has') . ' ';
|
||||
$String .= $Form->DropDown('Comparison', $Comparisons);
|
||||
$String .= $Form->Textbox('Target');
|
||||
$String .= T(' comments');
|
||||
$String .= ' ' . T('comments');
|
||||
|
||||
return $String;
|
||||
}
|
||||
@ -54,12 +54,12 @@ class CommentCount implements YagaRule{
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks a users total comment count against the criteria. If the user has more comments than the criteria, this will return true.');
|
||||
$Description = T('Yaga.Rules.CommentCount.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Comment Count Total');
|
||||
return T('Yaga.Rules.CommentCount');
|
||||
}
|
||||
}
|
||||
|
@ -36,9 +36,9 @@ class CommentMarathon implements YagaRule {
|
||||
'year' => T('Years')
|
||||
);
|
||||
|
||||
$String = $Form->Label(T('Number of Comments'), 'Comment Marathon');
|
||||
$String = $Form->Label('Number of Comments', 'CommentMarathon');
|
||||
$String .= $Form->Textbox('Target');
|
||||
$String .= $Form->Label(T('Time Frame'));
|
||||
$String .= $Form->Label('Time Frame');
|
||||
$String .= $Form->Textbox('Duration');
|
||||
$String .= $Form->DropDown('Period', $Lengths);
|
||||
|
||||
@ -50,12 +50,12 @@ class CommentMarathon implements YagaRule {
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks a users comment count within the past duratio. If it is a greater than or equal to the target, it will return true.');
|
||||
$Description = T('Yaga.Rules.CommentMarathon.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Comment Marathon');
|
||||
return T('Yaga.Rules.CommentMarathon');
|
||||
}
|
||||
}
|
||||
|
@ -42,11 +42,11 @@ class DiscussionCount implements YagaRule{
|
||||
'gte' => T('more than or equal to:')
|
||||
);
|
||||
|
||||
$String = $Form->Label(T('Total Discussions'), 'DiscussionCount');
|
||||
$String .= T('User has ');
|
||||
$String = $Form->Label('Total Discussions', 'DiscussionCount');
|
||||
$String .= T('User has') . ' ';
|
||||
$String .= $Form->DropDown('Comparison', $Comparisons);
|
||||
$String .= $Form->Textbox('Target');
|
||||
$String .= T(' discussions');
|
||||
$String .= ' ' . T('discussions');
|
||||
|
||||
return $String;
|
||||
}
|
||||
@ -56,12 +56,12 @@ class DiscussionCount implements YagaRule{
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks a users discussion count against the criteria. It will return true once the comparision is true.');
|
||||
$Description = T('Yaga.Rules.DiscussionCount.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Discussion Count Total');
|
||||
return T('Yaga.Rules.DiscussionCount');
|
||||
}
|
||||
}
|
||||
|
@ -31,12 +31,12 @@ class HasMentioned implements YagaRule{
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks a users comment for mentions. If the user mentions someone, this will return true.');
|
||||
$Description = T('Yaga.Rules.HasMentioned.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Mention');
|
||||
return T('Yaga.Rules.HasMentioned');
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class HolidayVisit implements YagaRule {
|
||||
$Days[$i] = $i;
|
||||
}
|
||||
|
||||
$String = $Form->Label(T('Holiday date'), 'HolidayVisit');
|
||||
$String = $Form->Label('Holiday date', 'HolidayVisit');
|
||||
$String .= $Form->DropDown('Month', $Months);
|
||||
$String .= $Form->DropDown('Day', $Days);
|
||||
return $String;
|
||||
@ -44,12 +44,12 @@ class HolidayVisit implements YagaRule {
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks a users visit date against the target date. If they visited on the same day of the year, it is awarded.');
|
||||
$Description = T('Yaga.Rules.HolidayVisit.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Holiday Visit');
|
||||
return T('Yaga.Rules.HolidayVisit');
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class LengthOfService implements YagaRule {
|
||||
'year' => T('Years')
|
||||
);
|
||||
|
||||
$String = $Form->Label(T('Time Served'), 'LengthOfService');
|
||||
$String = $Form->Label('Time Served', 'LengthOfService');
|
||||
$String .= $Form->Textbox('Duration');
|
||||
$String .= $Form->DropDown('Period', $Lengths);
|
||||
|
||||
@ -39,12 +39,12 @@ class LengthOfService implements YagaRule {
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks a users join date against the current date. It will return true if the account is older than the specified number of days, weeks, or years.');
|
||||
$Description = T('Yaga.Rules.LengthOfService.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Length of Service');
|
||||
return T('Yaga.Rules.LengthOfService');
|
||||
}
|
||||
}
|
||||
|
@ -23,12 +23,12 @@ class ManualAward implements YagaRule {
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule will <strong>never</strong> be awarded <em>automatically</em> and should be kept disabled. Use it for badges you want to hand out manually.');
|
||||
$Description = T('Yaga.Rules.ManualAward.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Manual Award');
|
||||
return T('Yaga.Rules.ManualAward');
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class NewbieComment implements YagaRule{
|
||||
'year' => T('Years')
|
||||
);
|
||||
|
||||
$String = $Form->Label(T('User Newbness'), 'NewbieComment');
|
||||
$String = $Form->Label('User Newbness', 'NewbieComment');
|
||||
$String .= $Form->Textbox('Duration');
|
||||
$String .= $Form->DropDown('Period', $Lengths);
|
||||
|
||||
@ -53,12 +53,12 @@ class NewbieComment implements YagaRule{
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks if a comment is placed on a newbs first discussion. If it is, this will return true.');
|
||||
$Description = T('Yaga.Rules.NewbieComment.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T("Comment on New User's Discussion");
|
||||
return T('Yaga.Rules.NewbieComment');
|
||||
}
|
||||
}
|
||||
|
@ -27,12 +27,12 @@ class PhotoExists implements YagaRule {
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule returns true if the user has uploaded a profile photo.');
|
||||
$Description = T('Yaga.Rules.PhotoExists.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('User has Avatar');
|
||||
return T('Yaga.Rules.PhotoExists');
|
||||
}
|
||||
}
|
||||
|
@ -36,8 +36,8 @@ class ReactionCount implements YagaRule{
|
||||
$Reactions[$Action->ActionID] = $Action->Name;
|
||||
}
|
||||
|
||||
$String = $Form->Label(T('Total reactions'), 'ReactionCount');
|
||||
$String .= T('User has ');
|
||||
$String = $Form->Label('Total Reactions', 'ReactionCount');
|
||||
$String .= T('User has') . ' ';
|
||||
$String .= $Form->Textbox('Target');
|
||||
$String .= $Form->DropDown('ActionID', $Reactions);
|
||||
|
||||
@ -49,12 +49,12 @@ class ReactionCount implements YagaRule{
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks a users reaction count against the target. It will return true once the user has as many or more than the given reactions count.');
|
||||
$Description = T('Yaga.Rules.ReactionCount.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Reaction Count Total');
|
||||
return T('Yaga.Rules.ReactionCount');
|
||||
}
|
||||
}
|
||||
|
@ -26,9 +26,9 @@ class ReflexComment implements YagaRule{
|
||||
}
|
||||
|
||||
public function Form($Form) {
|
||||
$String = $Form->Label(T('Time to Comment'), 'ReflexComment');
|
||||
$String = $Form->Label('Time to Comment', 'ReflexComment');
|
||||
$String .= $Form->Textbox('Seconds');
|
||||
$String .= T(' seconds.');
|
||||
$String .= ' ' . T('seconds.');
|
||||
|
||||
return $String;
|
||||
}
|
||||
@ -38,12 +38,12 @@ class ReflexComment implements YagaRule{
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks if a comment is placed within x seconds. If it is, this will return true.');
|
||||
$Description = T('Yaga.Rules.ReflexComment.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Comment on New Discussion Quickly');
|
||||
return T('Yaga.Rules.ReflexComment');
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class SocialConnection implements YagaRule{
|
||||
'Facebook' => 'Facebook'
|
||||
);
|
||||
|
||||
$String = $Form->Label(T('Social Networks'), 'SocialConnection');
|
||||
$String = $Form->Label('Social Networks', 'SocialConnection');
|
||||
$String .= T('User has connect to: ');
|
||||
$String .= $Form->DropDown('SocialNetwork', $SocialNetworks);
|
||||
|
||||
@ -39,12 +39,12 @@ class SocialConnection implements YagaRule{
|
||||
}
|
||||
|
||||
public function Description() {
|
||||
$Description = T('This rule checks if a user has connected to the target social network. If the user has, this will return true.');
|
||||
$Description = T('Yaga.Rules.SocialConnection.Desc');
|
||||
return $Description;
|
||||
|
||||
}
|
||||
|
||||
public function Name() {
|
||||
return T('Social Connections');
|
||||
return T('Yaga.Rules.SocialConnection');
|
||||
}
|
||||
}
|
||||
|
@ -19,13 +19,13 @@ class YagaHooks implements Gdn_IPlugin {
|
||||
$Menu->AddItem($Section, $Section, FALSE, $Attrs);
|
||||
$Menu->AddLink($Section, T('Settings'), 'configure', 'Garden.Settings.Manage');
|
||||
if(C('Yaga.Reactions.Enabled')) {
|
||||
$Menu->AddLink($Section, T('Reactions'), 'action/settings', 'Yaga.Reactions.Manage');
|
||||
$Menu->AddLink($Section, T('Yaga.Reactions'), 'action/settings', 'Yaga.Reactions.Manage');
|
||||
}
|
||||
if(C('Yaga.Badges.Enabled')) {
|
||||
$Menu->AddLink($Section, T('Badges'), 'badge/settings', 'Yaga.Badges.Manage');
|
||||
$Menu->AddLink($Section, T('Yaga.Badges'), 'badge/settings', 'Yaga.Badges.Manage');
|
||||
}
|
||||
if(C('Yaga.Ranks.Enabled')) {
|
||||
$Menu->AddLink($Section, T('Ranks'), 'rank/settings', 'Yaga.Ranks.Manage');
|
||||
$Menu->AddLink($Section, T('Yaga.Ranks'), 'rank/settings', 'Yaga.Ranks.Manage');
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,8 +91,8 @@ class YagaHooks implements Gdn_IPlugin {
|
||||
|
||||
// Tell the ProfileController what tab to load
|
||||
$Sender->GetUserInfo($UserReference, $Username, $UserID);
|
||||
$Sender->_SetBreadcrumbs(T('Reactions'), UserUrl($Sender->User, '', 'reactions'));
|
||||
$Sender->SetTabView(T('Reactions'), 'reactions', 'profile', 'Yaga');
|
||||
$Sender->_SetBreadcrumbs(T('Yaga.Reactions'), UserUrl($Sender->User, '', 'reactions'));
|
||||
$Sender->SetTabView(T('Yaga.Reactions'), 'reactions', 'profile', 'Yaga');
|
||||
|
||||
$Sender->AddJsFile('jquery.expander.js');
|
||||
$Sender->AddJsFile('reactions.js', 'yaga');
|
||||
@ -309,13 +309,13 @@ class YagaHooks implements Gdn_IPlugin {
|
||||
*/
|
||||
public function ProfileController_AfterPreferencesDefined_Handler($Sender) {
|
||||
if(C('Yaga.Badges.Enabled')) {
|
||||
$Sender->Preferences['Notifications']['Email.Badges'] = T('Notify me when I earn a badge.');
|
||||
$Sender->Preferences['Notifications']['Popup.Badges'] = T('Notify me when I earn a badge.');
|
||||
$Sender->Preferences['Notifications']['Email.Badges'] = T('Yaga.Notifications.Badges');
|
||||
$Sender->Preferences['Notifications']['Popup.Badges'] = T('Yaga.Notifications.Badges');
|
||||
}
|
||||
|
||||
if(C('Yaga.Ranks.Enabled')) {
|
||||
$Sender->Preferences['Notifications']['Email.Ranks'] = T('Notify me when I am promoted in rank.');
|
||||
$Sender->Preferences['Notifications']['Popup.Ranks'] = T('Notify me when I am promoted in rank.');
|
||||
$Sender->Preferences['Notifications']['Email.Ranks'] = T('Yaga.Notifications.Ranks');
|
||||
$Sender->Preferences['Notifications']['Popup.Ranks'] = T('Yaga.Notifications.Ranks');
|
||||
}
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ class YagaHooks implements Gdn_IPlugin {
|
||||
if(Gdn::Session()->IsValid()) {
|
||||
if(CheckPermission('Yaga.Badges.Add')) {
|
||||
$Sender->EventArguments['ProfileOptions'][] = array(
|
||||
'Text' => Sprite('SpRibbon') . ' ' . T('Give Badge'),
|
||||
'Text' => Sprite('SpRibbon') . ' ' . T('Yaga.Badge.Award'),
|
||||
'Url' => '/badge/award/' . $Sender->User->UserID,
|
||||
'CssClass' => 'Popup'
|
||||
);
|
||||
@ -336,7 +336,7 @@ class YagaHooks implements Gdn_IPlugin {
|
||||
|
||||
if(CheckPermission('Yaga.Ranks.Add')) {
|
||||
$Sender->EventArguments['ProfileOptions'][] = array(
|
||||
'Text' => Sprite('SpModeratorActivities') . ' ' . T('Promote'),
|
||||
'Text' => Sprite('SpModeratorActivities') . ' ' . T('Yaga.Rank.Promote'),
|
||||
'Url' => '/rank/promote/' . $Sender->User->UserID,
|
||||
'CssClass' => 'Popup'
|
||||
);
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php if(!defined('APPLICATION')) exit();
|
||||
/* Copyright 2013 Zachary Doll */
|
||||
if(property_exists($this, 'Action')) {
|
||||
echo Wrap(T('Edit Action'), 'h1');
|
||||
echo Wrap(T('Yaga.EditAction'), 'h1');
|
||||
}
|
||||
else {
|
||||
echo Wrap(T('Add Action'), 'h1');
|
||||
echo Wrap(T('Yaga.AddAction'), 'h1');
|
||||
}
|
||||
|
||||
$OriginalCssClass = $this->Form->GetValue('CssClass');
|
||||
@ -54,7 +54,7 @@ echo $this->Form->Errors();
|
||||
<span><?php echo T('Advanced Settings'); ?></span>
|
||||
<div>
|
||||
<?php
|
||||
echo $this->Form->Label('CSS Class', 'CssClass');
|
||||
echo $this->Form->Label('Css Class', 'CssClass');
|
||||
echo $this->Form->TextBox('CssClass');
|
||||
?>
|
||||
</div>
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
// TODO: Consider using a reusable help_functions file like core
|
||||
echo Wrap($this->Title(), 'h1');
|
||||
echo Wrap(Wrap(T('Add or edit the available actions that can be used as reactions.'), 'div'), 'div', array('class' => 'Wrap'));
|
||||
echo Wrap(Anchor(T('Add Action'), 'yaga/action/add', array('class' => 'Popup SmallButton')), 'div', array('class' => 'Wrap'));
|
||||
echo Wrap(Wrap(T('Yaga.Actions.Settings.Desc'), 'div'), 'div', array('class' => 'Wrap'));
|
||||
echo Wrap(Anchor(T('Yaga.AddAction'), 'yaga/action/add', array('class' => 'Popup SmallButton')), 'div', array('class' => 'Wrap'));
|
||||
?>
|
||||
<h3><?php echo T('Current Reactions'); ?></h3>
|
||||
<h3><?php echo T('Yaga.Actions.Current'); ?></h3>
|
||||
<ol id="Actions" class="Sortable">
|
||||
<?php
|
||||
foreach($this->Data('Actions') as $Action) {
|
||||
|
@ -5,11 +5,11 @@
|
||||
$Rules = RulesController::GetRules();
|
||||
|
||||
if(property_exists($this, 'Badge')) {
|
||||
echo Wrap(T('Edit Badge'), 'h1');
|
||||
echo Wrap(T('Yaga.EditBadge'), 'h1');
|
||||
$RuleClass = $this->Badge->RuleClass;
|
||||
}
|
||||
else {
|
||||
echo Wrap(T('Add Badge'), 'h1');
|
||||
echo Wrap(T('Yaga.AddBadge'), 'h1');
|
||||
reset($Rules);
|
||||
$RuleClass = key($Rules);
|
||||
}
|
||||
|
@ -5,18 +5,18 @@ $Badges = $this->Data('Badges');
|
||||
$Username = $this->Data('Username', 'Unknown');
|
||||
|
||||
echo '<div id="UserBadgeForm">';
|
||||
echo Wrap(T('Give a Badge to ') . $Username, 'h1');
|
||||
echo Wrap(sprintf(T('Yaga.Badge.GiveTo'), $Username), 'h1');
|
||||
echo $this->Form->Open();
|
||||
echo $this->Form->Errors();
|
||||
|
||||
echo Wrap(
|
||||
Wrap(
|
||||
$this->Form->Label('Badge', 'BadgeID') .
|
||||
$this->Form->Label('Yaga.Badge', 'BadgeID') .
|
||||
$this->Form->Dropdown('BadgeID', $Badges),
|
||||
'li') .
|
||||
|
||||
Wrap(
|
||||
$this->Form->Label('Reason (optional)', 'Reason') .
|
||||
$this->Form->Label('Yaga.Reason', 'Reason') .
|
||||
$this->Form->TextBox('Reason', array('Multiline' => TRUE)),
|
||||
'li') .
|
||||
Wrap(
|
||||
@ -25,6 +25,6 @@ echo Wrap(
|
||||
'ul'
|
||||
);
|
||||
|
||||
echo $this->Form->Close('Give Badge');
|
||||
echo $this->Form->Close('Yaga.Badge.Award');
|
||||
|
||||
echo '</div>';
|
||||
|
@ -4,8 +4,8 @@
|
||||
$Rules = $this->Data('Rules');
|
||||
|
||||
echo Wrap($this->Title(), 'h1');
|
||||
echo Wrap(Wrap(T('Add or edit the available badges that can be earned.'), 'div'), 'div', array('class' => 'Wrap'));
|
||||
echo Wrap(Anchor(T('Add Badge'), 'yaga/badge/add', array('class' => 'SmallButton')), 'div', array('class' => 'Wrap'));
|
||||
echo Wrap(Wrap(T('Yaga.Badges.Settings.Desc'), 'div'), 'div', array('class' => 'Wrap'));
|
||||
echo Wrap(Anchor(T('Yaga.AddBadge'), 'yaga/badge/add', array('class' => 'SmallButton')), 'div', array('class' => 'Wrap'));
|
||||
|
||||
?>
|
||||
<table id="Badges" class="AltRows">
|
||||
|
@ -14,7 +14,7 @@ foreach($this->Data('Badges') as $Badge) {
|
||||
|
||||
if($Badge->UserID == Gdn::Session()->UserID) {
|
||||
$ReadClass = '';
|
||||
$AwardDescription = T('You earned this badge ') . Gdn_Format::Date($Badge->DateInserted, 'html') . T(' from ') . $Badge->InsertUserName;
|
||||
$AwardDescription = sprintf(T('Yaga.Badge.Earned.Format'), Gdn_Format::Date($Badge->DateInserted, 'html'), $Badge->InsertUserName);
|
||||
if($Badge->Reason) {
|
||||
$AwardDescription .= ': "' . $Badge->Reason . '"';
|
||||
}
|
||||
|
@ -18,21 +18,21 @@ echo '<div class="Badge-Earned">';
|
||||
if($UserBadgeAward) {
|
||||
echo Wrap(
|
||||
UserPhoto(Gdn::Session()->User) .
|
||||
T('You earned this badge') . ' ' .
|
||||
T('Yaga.Badge.Earned') . ' ' .
|
||||
Wrap(Gdn_Format::Date($UserBadgeAward->DateInserted, 'html'), 'span', array('class' => 'DateReceived')),
|
||||
'div',
|
||||
array('class' => 'EarnedThisBadge'));
|
||||
}
|
||||
|
||||
if($AwardCount) {
|
||||
echo Wrap(Plural($AwardCount, '%s person has earned this badge.', '%s people have earned this badge.'), 'p', array('class' => 'BadgeCountDisplay'));
|
||||
echo Wrap(Plural($AwardCount, 'Yaga.Badge.EarnedBySingle', 'Yaga.Badge.EarnedByPlural'), 'p', array('class' => 'BadgeCountDisplay'));
|
||||
}
|
||||
else {
|
||||
echo Wrap(T('Nobody has earned this badge yet.'), 'p');
|
||||
echo Wrap(T('Yaga.Badge.EarnedByNone'), 'p');
|
||||
}
|
||||
|
||||
if($RecentAwards) {
|
||||
echo Wrap(T('Most recent recipients'), 'h2');
|
||||
echo Wrap(T('Yaga.Badge.RecentRecipients'), 'h2');
|
||||
echo '<div class="RecentRecipients">';
|
||||
foreach($RecentAwards as $Award) {
|
||||
$User = UserBuilder($Award);
|
||||
|
@ -5,18 +5,18 @@ $Ranks = $this->Data('Ranks');
|
||||
$Username = $this->Data('Username', 'Unknown');
|
||||
|
||||
echo '<div id="UserRankForm">';
|
||||
echo Wrap(T('Give a Rank to ') . $Username, 'h1');
|
||||
echo Wrap(T('Yaga.Rank.Promote') . ' ' . $Username, 'h1');
|
||||
echo $this->Form->Open();
|
||||
echo $this->Form->Errors();
|
||||
|
||||
echo Wrap(
|
||||
Wrap(
|
||||
$this->Form->Label('Rank', 'RankID') .
|
||||
$this->Form->Label('Yaga.Rank', 'RankID') .
|
||||
$this->Form->Dropdown('RankID', $Ranks),
|
||||
'li') .
|
||||
|
||||
Wrap(
|
||||
$this->Form->Label('Reason (optional)', 'Reason') .
|
||||
$this->Form->Label('Yaga.Reason', 'Reason') .
|
||||
$this->Form->TextBox('Reason', array('Multiline' => TRUE)),
|
||||
'li') .
|
||||
Wrap(
|
||||
@ -25,6 +25,6 @@ echo Wrap(
|
||||
'ul'
|
||||
);
|
||||
|
||||
echo $this->Form->Close('Give Rank');
|
||||
echo $this->Form->Close('Yaga.Rank.Award');
|
||||
|
||||
echo '</div>';
|
||||
|
@ -2,8 +2,8 @@
|
||||
/* Copyright 2013 Zachary Doll */
|
||||
|
||||
echo Wrap($this->Title(), 'h1');
|
||||
echo Wrap(Wrap(T('Add or edit the available ranks that can be earned.'), 'div'), 'div', array('class' => 'Wrap'));
|
||||
echo Wrap(Anchor(T('Add Rank'), 'yaga/rank/add', array('class' => 'SmallButton')), 'div', array('class' => 'Wrap'));
|
||||
echo Wrap(Wrap(T('Yaga.Ranks.Settings.Desc'), 'div'), 'div', array('class' => 'Wrap'));
|
||||
echo Wrap(Anchor(T('Yaga.AddRank'), 'yaga/rank/add', array('class' => 'SmallButton')), 'div', array('class' => 'Wrap'));
|
||||
|
||||
?>
|
||||
<table id="Actions" class="AltRows">
|
||||
@ -13,7 +13,7 @@ echo Wrap(Anchor(T('Add Rank'), 'yaga/rank/add', array('class' => 'SmallButton')
|
||||
<th><?php echo T('Name'); ?></th>
|
||||
<th><?php echo T('Description'); ?></th>
|
||||
<th><?php echo T('Points Required'); ?></th>
|
||||
<th><?php echo T('Permission Award'); ?></th>
|
||||
<th><?php echo T('Role Award'); ?></th>
|
||||
<th><?php echo T('Auto Award'); ?></th>
|
||||
<th><?php echo T('Options'); ?></th>
|
||||
</tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user