All hardcoded strings can be translated now

This commit is contained in:
Zachary Doll 2013-12-04 10:21:39 -06:00
parent 3d06de359f
commit 61d334ab44
34 changed files with 124 additions and 151 deletions

View File

@ -41,7 +41,7 @@ class ActionController extends DashboardController {
$this->Permission('Yaga.Reactions.Manage');
$this->AddSideMenu('action/settings');
$this->Title('Manage Reactions');
$this->Title(T('Manage Reactions'));
// 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('Add Action');
$this->Title(T('Add Action'));
if($ActionID) {
$this->Action = $this->ActionModel->GetAction($ActionID);
$this->Form->AddHidden('ActionID', $ActionID);
$Edit = TRUE;
$this->Title('Edit Action');
$this->Title(T('Edit Action'));
}
// 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('Action updated successfully!');
$this->InformMessage(T('Action updated successfully!'));
}
else {
$this->JsonTarget('#Actions', $NewActionRow, 'Append');
$this->InformMessage('Action added successfully!');
$this->InformMessage(T('Action added successfully!'));
}
}
}

View File

@ -40,7 +40,7 @@ class BadgeController extends DashboardController {
$this->Permission('Yaga.Badges.Manage');
$this->AddSideMenu('badge/settings');
$this->Title('Manage Badges');
$this->Title(T('Manage Badges'));
// 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('You cannot add or edit badges without rules!');
throw new Gdn_UserException(T('You cannot add or edit badges without rules!'));
}
$Edit = FALSE;
@ -111,10 +111,10 @@ class BadgeController extends DashboardController {
$this->Form->SetFormValue('RuleCriteria', $SerializedCriteria);
if($this->Form->Save()) {
if($Edit) {
$this->InformMessage('Badge updated successfully!');
$this->InformMessage(T('Badge updated successfully!'));
}
else {
$this->InformMessage('Badge added successfully!');
$this->InformMessage(T('Badge added successfully!'));
}
Redirect('/yaga/badge/settings');
}
@ -153,7 +153,7 @@ class BadgeController extends DashboardController {
*/
public function Toggle($BadgeID) {
if(!$this->Request->IsPostBack()) {
throw PermissionException('Javascript');
throw new Gdn_UserException(T('That must be done via Javascript'));
}
$this->Permission('Yaga.Badges.Manage');
$this->AddSideMenu('badge/settings');
@ -216,7 +216,7 @@ class BadgeController extends DashboardController {
// Only allow awarding if some badges exist
if(!$this->BadgeModel->GetBadgeCount()) {
throw ForbiddenException('award badges without any badges defined');
throw new Gdn_UserException(T('You cannot award badges without any badges defined.'));
}
$UserModel = Gdn::UserModel();

View File

@ -42,7 +42,7 @@ class BestOfController extends Gdn_Controller {
$Module->Selector = 'Score';
$this->SetData('Module', $Module);
$this->Title(T('Best Of'));
$this->Title(T('Best Of...'));
$this->Render('all');
}
}

View File

@ -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->SetData('Title', 'Gamification Settings');
$this->Title(T('Yaga.Settings', 'Gamification Settings'));
$this->ConfigurationModule = $ConfigModule;
$ConfigModule->RenderAll();
}

View File

@ -101,10 +101,10 @@ class RankController extends DashboardController {
if($this->Form->Save()) {
if($Edit) {
$this->InformMessage('Rank updated successfully!');
$this->InformMessage(T('Rank updated successfully!'));
}
else {
$this->InformMessage('Rank added successfully!');
$this->InformMessage(T('Rank added successfully!'));
}
Redirect('/yaga/rank/settings');
}
@ -206,7 +206,7 @@ class RankController extends DashboardController {
// Only allow awarding if some ranks exist
if(!$this->RankModel->GetRankCount()) {
throw ForbiddenException('award ranks without any ranks defined');
throw new Gdn_UserException(T('You cannot promote users without any ranks defined.'));
}
$UserModel = Gdn::UserModel();

View File

@ -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('Invalid Action');
throw new Gdn_UserException(T('Invalid Action'));
}
if(!Gdn::Session()->CheckPermission($Action->Permission)) {
@ -62,13 +62,13 @@ class ReactController extends Gdn_Controller {
$Anchor = '#Discussion_' . $DiscussionID . ' .ReactMenu';
}
else {
throw new Gdn_UserException('Invalid ID');
throw new Gdn_UserException(T('Invalid ID'));
}
$UserID = Gdn::Session()->UserID;
if($Discussion->InsertUserID == $UserID) {
throw new Gdn_UserException('You cannot react to your own content.');
throw new Gdn_UserException(T('You cannot react to your own content.'));
}
// 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('Invalid Action');
throw new Gdn_UserException(T('Invalid Action'));
}
if(!Gdn::Session()->CheckPermission($Action->Permission)) {
@ -107,13 +107,13 @@ class ReactController extends Gdn_Controller {
$Anchor = '#Comment_' . $CommentID . ' .ReactMenu';
}
else {
throw new Gdn_UserException('Invalid ID');
throw new Gdn_UserException(T('Invalid ID'));
}
$UserID = Gdn::Session()->UserID;
if($Comment->InsertUserID == $UserID) {
throw new Gdn_UserException('You cannot react to your own content.');
throw new Gdn_UserException(T('You cannot react to your own content.'));
}
// 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('Invalid Action');
throw new Gdn_UserException(T('Invalid Action'));
}
if(!Gdn::Session()->CheckPermission($Action->Permission)) {
@ -152,13 +152,13 @@ class ReactController extends Gdn_Controller {
$Anchor = '#Activity_' . $ActivityID . ' .ReactMenu';
}
else {
throw new Gdn_UserException('Invalid ID');
throw new Gdn_UserException(T('Invalid ID'));
}
$UserID = Gdn::Session()->UserID;
if($Activity['ActivityUserID'] == $UserID) {
throw new Gdn_UserException('You cannot react to your own content.');
throw new Gdn_UserException(T('You cannot react to your own content.'));
}
// It has passed through the gauntlet

View File

@ -72,7 +72,7 @@ class RulesController extends YagaController {
$this->RenderData($Data);
}
else {
$this->RenderException(new Gdn_UserException('Rule not found.'));
$this->RenderException(new Gdn_UserException(T('Rule not found.')));
}
}
}

View File

@ -13,7 +13,7 @@
* @param bool $Echo Should it be echoed?
* @return mixed String if $Echo is false, TRUE otherwise
*/
if(!function_exists('RenderActions')) {
if(!function_exists('RenderReactions')) {
function RenderReactions($ID, $Type, $Echo = TRUE) {
$Reactions = Yaga::ReactionModel()->GetAllReactions($ID, $Type);
@ -46,7 +46,7 @@ if(!function_exists('RenderActions')) {
* @param int $ID
* @param enum $Type 'discussion', 'activity', or 'comment'
*/
if(!function_exists('RenderActions')) {
if(!function_exists('RenderReactionRecord')) {
function RenderReactionRecord($ID, $Type) {
$Reactions = Yaga::ReactionModel()->GetAllReactions($ID, $Type);

View File

@ -188,7 +188,7 @@ class BadgeModel extends Gdn_Model {
'RecordType' => 'Badge',
'RecordID' => $BadgeID,
'Route' => '/badges/detail/' . $Badge->BadgeID . '/' . Gdn_Format::Url($Badge->Name),
'HeadlineFormat' => '{RegardingUserID,You} earned the <a href="{Url,html}">{Data.Name,text}</a> badge.',
'HeadlineFormat' => T('Yaga.HeadlineFormat.BadgeEarned', '{RegardingUserID,You} earned the <a href="{Url,html}">{Data.Name,text}</a> badge.'),
'Data' => array(
'Name' => $Badge->Name
),

View File

@ -145,7 +145,7 @@ class RankModel extends Gdn_Model {
'RecordType' => 'Rank',
'RecordID' => $RankID,
'Route' => '/ranks/detail/' . $Rank->RankID . '/' . Gdn_Format::Url($Rank->Name),
'HeadlineFormat' => '{RegardingUserID,You} have been promoted to {Data.Name,text}.',
'HeadlineFormat' => T('Yaga.HeadlineFormat.Promoted', '{RegardingUserID,You} have been promoted to {Data.Name,text}.'),
'Data' => array(
'Name' => $Rank->Name
),

View File

View File

@ -19,10 +19,10 @@ class BadgesModule extends Gdn_Module {
}
if(Gdn::Session()->UserID == $UserID) {
$this->Title = 'My Badges';
$this->Title = T('My Badges');
}
else {
$this->Title = 'Badges';
$this->Title = T('Badges');
}
$BadgeModel = new BadgeModel();

View File

@ -36,14 +36,14 @@ class AwardCombo implements YagaRule {
public function Form($Form) {
$Lengths = array(
'day' => 'Days',
'week' => 'Weeks',
'year' => 'Years'
'day' => T('Days'),
'week' => T('Weeks'),
'year' => T('Years')
);
$String = $Form->Label('Number of Badge Types', 'AwardCombo');
$String = $Form->Label(T('Number of Badge Types'), 'AwardCombo');
$String .= $Form->Textbox('Target');
$String .= $Form->Label('Time Frame');
$String .= $Form->Label(T('Time Frame'));
$String .= $Form->Textbox('Duration');
$String .= $Form->DropDown('Period', $Lengths);
@ -55,14 +55,12 @@ class AwardCombo implements YagaRule {
}
public function Description() {
$Description = '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('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.');
return $Description;
}
public function Name() {
return 'Award Combo';
return T('Award Combo');
}
}
?>

View File

@ -35,16 +35,16 @@ class CommentCount implements YagaRule{
public function Form($Form) {
$Comparisons = array(
'gt' => 'more than:',
'lt' => 'less than:',
'gte' => 'more than or equal to:'
'gt' => T('more than:'),
'lt' => T('less than:'),
'gte' => T('more than or equal to:')
);
$String = $Form->Label('Total comments', 'CommentCount');
$String .= 'User has ';
$String = $Form->Label(T('Total comments'), 'CommentCount');
$String .= T('User has ');
$String .= $Form->DropDown('Comparison', $Comparisons);
$String .= $Form->Textbox('Target');
$String .= ' comments';
$String .= T(' comments');
return $String;
}
@ -54,14 +54,12 @@ class CommentCount implements YagaRule{
}
public function Description() {
$Description = '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('This rule checks a users total comment count against the criteria. If the user has more comments than the criteria, this will return true.');
return $Description;
}
public function Name() {
return 'Comment Count Total';
return T('Comment Count Total');
}
}
?>

View File

@ -31,14 +31,14 @@ class CommentMarathon implements YagaRule {
public function Form($Form) {
$Lengths = array(
'day' => 'Days',
'week' => 'Weeks',
'year' => 'Years'
'day' => T('Days'),
'week' => T('Weeks'),
'year' => T('Years')
);
$String = $Form->Label('Number of Comments', 'Comment Marathon');
$String = $Form->Label(T('Number of Comments'), 'Comment Marathon');
$String .= $Form->Textbox('Target');
$String .= $Form->Label('Time Frame');
$String .= $Form->Label(T('Time Frame'));
$String .= $Form->Textbox('Duration');
$String .= $Form->DropDown('Period', $Lengths);
@ -50,14 +50,12 @@ class CommentMarathon implements YagaRule {
}
public function Description() {
$Description = '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('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.');
return $Description;
}
public function Name() {
return 'Comment Marathon';
return T('Comment Marathon');
}
}
?>

View File

@ -37,16 +37,16 @@ class DiscussionCount implements YagaRule{
public function Form($Form) {
$Comparisons = array(
'gt' => 'more than:',
'lt' => 'less than:',
'gte' => 'more than or equal to:'
'gt' => T('more than:'),
'lt' => T('less than:'),
'gte' => T('more than or equal to:')
);
$String = $Form->Label('Total Discussions', 'DiscussionCount');
$String .= 'User has ';
$String = $Form->Label(T('Total Discussions'), 'DiscussionCount');
$String .= T('User has ');
$String .= $Form->DropDown('Comparison', $Comparisons);
$String .= $Form->Textbox('Target');
$String .= ' discussions';
$String .= T(' discussions');
return $String;
}
@ -56,14 +56,12 @@ class DiscussionCount implements YagaRule{
}
public function Description() {
$Description = 'This rule checks a users discussion count against the criteria. It will return true once the comparision is true.';
$Description = T('This rule checks a users discussion count against the criteria. It will return true once the comparision is true.');
return $Description;
}
public function Name() {
return 'Discussion Count Total';
return T('Discussion Count Total');
}
}
?>

View File

@ -31,14 +31,12 @@ class HasMentioned implements YagaRule{
}
public function Description() {
$Description = 'This rule checks a users comment for mentions. If the user mentions someone, this will return true.';
$Description = T('This rule checks a users comment for mentions. If the user mentions someone, this will return true.');
return $Description;
}
public function Name() {
return 'Mention';
return T('Mention');
}
}
?>

View File

@ -33,7 +33,7 @@ class HolidayVisit implements YagaRule {
$Days[$i] = $i;
}
$String = $Form->Label('Holiday date', 'HolidayVisit');
$String = $Form->Label(T('Holiday date'), 'HolidayVisit');
$String .= $Form->DropDown('Month', $Months);
$String .= $Form->DropDown('Day', $Days);
return $String;
@ -44,14 +44,12 @@ class HolidayVisit implements YagaRule {
}
public function Description() {
$Description = '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('This rule checks a users visit date against the target date. If they visited on the same day of the year, it is awarded.');
return $Description;
}
public function Name() {
return 'Holiday Visit';
return T('Holiday Visit');
}
}
?>

View File

@ -22,12 +22,12 @@ class LengthOfService implements YagaRule {
public function Form($Form) {
$Lengths = array(
'day' => 'Days',
'week' => 'Weeks',
'year' => 'Years'
'day' => T('Days'),
'week' => T('Weeks'),
'year' => T('Years')
);
$String = $Form->Label('Time Served', 'LengthOfService');
$String = $Form->Label(T('Time Served'), 'LengthOfService');
$String .= $Form->Textbox('Duration');
$String .= $Form->DropDown('Period', $Lengths);
@ -39,14 +39,12 @@ class LengthOfService implements YagaRule {
}
public function Description() {
$Description = '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('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.');
return $Description;
}
public function Name() {
return 'Length of Service';
return T('Length of Service');
}
}
?>

View File

@ -23,14 +23,12 @@ class ManualAward implements YagaRule {
}
public function Description() {
$Description = 'This rule will <strong>never</strong> be awarded <em>automatically</em> and should be kept disabled. Use it for custom badges you want to hand out manually.';
$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.');
return $Description;
}
public function Name() {
return 'Manual Award';
return T('Manual Award');
}
}
?>

View File

@ -36,12 +36,12 @@ class NewbieComment implements YagaRule{
public function Form($Form) {
$Lengths = array(
'day' => 'Days',
'week' => 'Weeks',
'year' => 'Years'
'day' => T('Days'),
'week' => T('Weeks'),
'year' => T('Years')
);
$String = $Form->Label('User Newbness', 'NewbieComment');
$String = $Form->Label(T('User Newbness'), 'NewbieComment');
$String .= $Form->Textbox('Duration');
$String .= $Form->DropDown('Period', $Lengths);
@ -53,14 +53,12 @@ class NewbieComment implements YagaRule{
}
public function Description() {
$Description = 'This rule checks if a comment is placed on a newbs first discussion. If it is, this will return true.';
$Description = T('This rule checks if a comment is placed on a newbs first discussion. If it is, this will return true.');
return $Description;
}
public function Name() {
return 'Comment on New User\'s Discussion';
return T("Comment on New User's Discussion");
}
}
?>

View File

@ -27,14 +27,12 @@ class PhotoExists implements YagaRule {
}
public function Description() {
$Description = 'This rule returns true if the user has uploaded a profile photo';
$Description = T('This rule returns true if the user has uploaded a profile photo.');
return $Description;
}
public function Name() {
return 'User has Avatar';
return T('User has Avatar');
}
}
?>

View File

@ -36,8 +36,8 @@ class ReactionCount implements YagaRule{
$Reactions[$Action->ActionID] = $Action->Name;
}
$String = $Form->Label('Total reactions', 'ReactionCount');
$String .= 'User has ';
$String = $Form->Label(T('Total reactions'), 'ReactionCount');
$String .= T('User has ');
$String .= $Form->Textbox('Target');
$String .= $Form->DropDown('ActionID', $Reactions);
@ -49,14 +49,12 @@ class ReactionCount implements YagaRule{
}
public function Description() {
$Description = '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('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.');
return $Description;
}
public function Name() {
return 'Reaction Count Total';
return T('Reaction Count Total');
}
}
?>

View File

@ -26,9 +26,9 @@ class ReflexComment implements YagaRule{
}
public function Form($Form) {
$String = $Form->Label('Time to Comment', 'ReflexComment');
$String = $Form->Label(T('Time to Comment'), 'ReflexComment');
$String .= $Form->Textbox('Seconds');
$String .= ' seconds.';
$String .= T(' seconds.');
return $String;
}
@ -38,14 +38,12 @@ class ReflexComment implements YagaRule{
}
public function Description() {
$Description = 'This rule checks if a comment is placed within x seconds. If it is, this will return true.';
$Description = T('This rule checks if a comment is placed within x seconds. If it is, this will return true.');
return $Description;
}
public function Name() {
return 'Comment on New Discussion Quickly';
return T('Comment on New Discussion Quickly');
}
}
?>

View File

@ -27,8 +27,8 @@ class SocialConnection implements YagaRule{
'Facebook' => 'Facebook'
);
$String = $Form->Label('Social Networks', 'SocialConnection');
$String .= 'User has connect to: ';
$String = $Form->Label(T('Social Networks'), 'SocialConnection');
$String .= T('User has connect to: ');
$String .= $Form->DropDown('SocialNetwork', $SocialNetworks);
return $String;
@ -39,14 +39,12 @@ class SocialConnection implements YagaRule{
}
public function Description() {
$Description = 'This rule checks if a user has connected to the target social network. If the user has, this will return true.';
$Description = T('This rule checks if a user has connected to the target social network. If the user has, this will return true.');
return $Description;
}
public function Name() {
return 'Social Connections';
return T('Social Connections');
}
}
?>

View File

@ -47,4 +47,3 @@ interface YagaRule {
*/
public function Description();
}
?>

View File

@ -17,15 +17,15 @@ class YagaHooks implements Gdn_IPlugin {
$Section = 'Gamification';
$Attrs = array('class' => $Section);
$Menu->AddItem($Section, $Section, FALSE, $Attrs);
$Menu->AddLink($Section, 'Settings', 'configure', 'Garden.Settings.Manage');
$Menu->AddLink($Section, T('Settings'), 'configure', 'Garden.Settings.Manage');
if(C('Yaga.Reactions.Enabled')) {
$Menu->AddLink($Section, 'Reactions', 'action/settings', 'Yaga.Reactions.Manage');
$Menu->AddLink($Section, T('Reactions'), 'action/settings', 'Yaga.Reactions.Manage');
}
if(C('Yaga.Badges.Enabled')) {
$Menu->AddLink($Section, 'Badges', 'badge/settings', 'Yaga.Badges.Manage');
$Menu->AddLink($Section, T('Badges'), 'badge/settings', 'Yaga.Badges.Manage');
}
if(C('Yaga.Ranks.Enabled')) {
$Menu->AddLink($Section, 'Ranks', 'rank/settings', 'Yaga.Ranks.Manage');
$Menu->AddLink($Section, T('Ranks'), 'rank/settings', 'Yaga.Ranks.Manage');
}
}
@ -92,7 +92,7 @@ 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('Reactions', 'reactions', 'profile', 'Yaga');
$Sender->SetTabView(T('Reactions'), 'reactions', 'profile', 'Yaga');
$Sender->AddJsFile('jquery.expander.js');
$Sender->AddJsFile('reactions.js', 'yaga');

View File

@ -51,7 +51,7 @@ echo $this->Form->Errors();
?>
</li>
<li id="AdvancedActionSettings">
<span>Advanced Settings</span>
<span><?php echo T('Advanced Settings'); ?></span>
<div>
<?php
echo $this->Form->Label('CSS Class', 'CssClass');

View File

@ -3,8 +3,8 @@
// TODO: Consider using a reusable help_functions file like core
echo Wrap($this->Title(), 'h1');
echo Wrap(Wrap('Add or edit the available actions that can be used as reactions.', 'div'), 'div', array('class' => 'Wrap'));
echo Wrap(Anchor('Add Action', 'yaga/action/add', array('class' => 'Popup SmallButton')), 'div', array('class' => 'Wrap'));
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'));
?>
<h3><?php echo T('Current Reactions'); ?></h3>
<ol id="Actions" class="Sortable">

View File

@ -4,20 +4,20 @@
$Rules = $this->Data('Rules');
echo Wrap($this->Title(), 'h1');
echo Wrap(Wrap('Add or edit the available badges that can be earned.', 'div'), 'div', array('class' => 'Wrap'));
echo Wrap(Anchor('Add Badge', 'yaga/badge/add', array('class' => 'SmallButton')), 'div', array('class' => 'Wrap'));
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'));
?>
<table id="Badges" class="AltRows">
<thead>
<tr>
<th>Image</th>
<th>Name</th>
<th>Description</th>
<th>Rule</th>
<th>Award Value</th>
<th>Active</th>
<th>Options</th>
<th><?php echo T('Image'); ?></th>
<th><?php echo T('Name'); ?></th>
<th><?php echo T('Description'); ?></th>
<th><?php echo T('Rule'); ?></th>
<th><?php echo T('Award Value'); ?></th>
<th><?php echo T('Active'); ?></th>
<th><?php echo T('Options'); ?></th>
</tr>
</thead>
<tbody>

View File

@ -14,7 +14,7 @@ foreach($this->Data('Badges') as $Badge) {
if($Badge->UserID == Gdn::Session()->UserID) {
$ReadClass = '';
$AwardDescription = 'You earned this badge ' . Gdn_Format::Date($Badge->DateInserted, 'html') . ' from ' . $Badge->InsertUserName;
$AwardDescription = T('You earned this badge ') . Gdn_Format::Date($Badge->DateInserted, 'html') . T(' from ') . $Badge->InsertUserName;
if($Badge->Reason) {
$AwardDescription .= ': "' . $Badge->Reason . '"';
}

View File

@ -2,7 +2,7 @@
/* Copyright 2013 Zachary Doll */
echo '<div id="Badges" class="Column PanelColumn">';
echo '<h4>' . T($this->Title) . '</h4>';
echo '<h4>' . $this->Title . '</h4>';
echo '<div class="PhotoGrid">';
foreach($this->Data as $Badge) {
echo Anchor(

View File

@ -2,7 +2,7 @@
/* Copyright 2013 Zachary Doll */
echo '<div class="Box Leaderboard">';
echo '<h4>' . T($this->Title) . '</h4>';
echo '<h4>' . $this->Title . '</h4>';
echo '<ul class="PanelInfo">';
foreach($this->Data as $Leader) {

View File

@ -2,20 +2,20 @@
/* Copyright 2013 Zachary Doll */
echo Wrap($this->Title(), 'h1');
echo Wrap(Wrap('Add or edit the available ranks that can be earned.', 'div'), 'div', array('class' => 'Wrap'));
echo Wrap(Anchor('Add Rank', 'yaga/rank/add', array('class' => 'SmallButton')), 'div', array('class' => 'Wrap'));
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'));
?>
<table id="Actions" class="AltRows">
<thead>
<tr>
<th>Image</th>
<th>Name</th>
<th>Description</th>
<th>Points Required</th>
<th>Permission Award</th>
<th>Auto Award</th>
<th>Options</th>
<th><?php echo T('Image'); ?></th>
<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('Auto Award'); ?></th>
<th><?php echo T('Options'); ?></th>
</tr>
</thead>
<tbody>