[Fusionforge-commits] r17929 - in trunk/src: common/forum www/forum/admin www/pm/admin www/project/admin

Marc-Etienne VARGENAU vargenau at fusionforge.org
Tue Sep 10 15:07:35 CEST 2013


Author: vargenau
Date: 2013-09-10 15:07:35 +0200 (Tue, 10 Sep 2013)
New Revision: 17929

Modified:
   trunk/src/common/forum/ForumAdmin.class.php
   trunk/src/www/forum/admin/index.php
   trunk/src/www/pm/admin/index.php
   trunk/src/www/project/admin/roledelete.php
Log:
Improve messages

Modified: trunk/src/common/forum/ForumAdmin.class.php
===================================================================
--- trunk/src/common/forum/ForumAdmin.class.php	2013-09-10 12:46:18 UTC (rev 17928)
+++ trunk/src/common/forum/ForumAdmin.class.php	2013-09-10 13:07:35 UTC (rev 17929)
@@ -29,7 +29,7 @@
 	var $group_id;
 	var $p,$g;
 
-	function ForumAdmin($group_id) {
+	function __construct($group_id) {
 		$this->Error();
 		$this->group_id = $group_id;
 		if ($group_id) {
@@ -39,7 +39,7 @@
 			if (!$this->g->usesForum()) {
 				$this->setError(sprintf(_('%s does not use the Forum tool'),
 				    $this->g->getPublicName()));
-				return false;
+				return;
 			}
 		}
 	}
@@ -80,7 +80,7 @@
 
 		echo '
 			<p>
-			<a href="index.php?group_id='.$group_id.'&add_forum=1">'._('Add forum').'</a>';
+			<a href="index.php?group_id='.$group_id.'&add_forum=1">'._('Add Forum').'</a>';
 		echo '
 			| <a href="pending.php?action=view_pending&group_id=' . $group_id . '">' . _('Manage Pending Messages').'</a><br /></p>';
 	}
@@ -127,7 +127,8 @@
 	 *  Authorized - authorizes and returns true if the user is authorized for the group, or false.
 	 *
 	 *  @param  string	 The group id.
-	 */
+     *	@return bool
+     */
 
 	function Authorized($group_id) {
 		if (!$group_id) {
@@ -156,7 +157,8 @@
 	 *  ExecuteAction - Executes the action passed as parameter
 	 *
 	 *  @param  string	 action to execute.
-	 */
+     *	@return string
+     */
 	function ExecuteAction ($action) {
 		global $HTML;
 
@@ -234,7 +236,7 @@
 			if (!$count || $fm->isError()) {
 				exit_error($fm->getErrorMessage(),'forums');
 			} else {
-				$feedback = sprintf(ngettext('%1$s message deleted', '%1$s messages deleted', $count), $count);
+				$feedback = sprintf(ngettext('%s message deleted', '%s messages deleted', $count), $count);
 			}
 			return $feedback;
 		}
@@ -344,17 +346,17 @@
 				//<a href=\"javascript:msgdetail('$url');\">$onemsg[subject]</a>
 				$url = "http://www.google.com";
 				echo "
-				<tr" . $HTML->boxGetAltRowStyle($i++). ">
+				<tr " . $HTML->boxGetAltRowStyle($i++). ">
 					<td>$onemsg[forum_name]</td>
 					<td><a href=\"#\" onclick=\"window.open('pendingmsgdetail.php?msg_id=$onemsg[msg_id]&forum_id=$onemsg[group_forum_id]&group_id=$group_id','PendingMessageDetail','width=800,height=600,status=no,resizable=yes');\">$onemsg[subject]</a></td>
-					<td><div align=\"right\">" . html_build_select_box_from_assoc($options,"doaction[]",1) . "</div></td>
+					<td><div class=\"align-right\">" . html_build_select_box_from_assoc($options,"doaction[]",1) . "</div></td>
 				</tr>";
 			}
 
 			echo $HTML->listTableBottom();
 			echo '
 			<input type="hidden" name="msgids" value="' . $ids . '" />
-			<p align="right"><input type="submit" onclick="return confirmDel();" name="update" value="' . _('Update') . '" /></p>
+			<p class="align-right"><input type="submit" onclick="return confirmDel();" name="update" value="' . _('Update') . '" /></p>
 			</form>
 			';
 		}
@@ -433,7 +435,7 @@
 						$has_followups = db_result($res1,0,"has_followups");
 						$most_recent_date = db_result($res1,0,"most_recent_date");
 						if ($fm->insertreleasedmsg($group_forum_id,$subject, $body,$post_date, $thread_id, $is_followup_to,$posted_by,$has_followups,time())) {
-							$feedback .= "( $subject ) " . _('Pending message released') . "<br />";
+							$feedback .= "($subject) " . _('Pending message released') . "<br />";
 							if (db_numrows($res2)>0) {
 								//if there's an attachment
 								$am = NEW AttachManager();//object that will handle and insert the attachment into the db
@@ -455,11 +457,11 @@
 							$deleteok = true;
 						} else {
 							if ($fm->isError()) {
-							    if ( $fm->getErrorMessage() == (_('Couldn\'t Update Master Thread parent with current time')) ) {
+							    if ( $fm->getErrorMessage() == (_('Could not Update Master Thread parent with current time')) ) {
 							    	//the thread which the message was replying to doesn't exist any more
-							    	$feedback .= "( " . $subject . " ) " . _('The thread which the message was posted to doesn\'t exist anymore, please delete the message.');
+							    	$feedback .= "( " . $subject . " ) " . _('The thread which the message was posted to doesn\'t exist anymore, please delete the message.') . "<br />";
 							    } else {
-									$error_msg .= "$msg_id - " . $fm->getErrorMessage();
+									$error_msg .= "$msg_id - " . $fm->getErrorMessage() . "<br />";
 							    }
 								$deleteok = false;
 							}

Modified: trunk/src/www/forum/admin/index.php
===================================================================
--- trunk/src/www/forum/admin/index.php	2013-09-10 12:46:18 UTC (rev 17928)
+++ trunk/src/www/forum/admin/index.php	2013-09-10 13:07:35 UTC (rev 17929)
@@ -171,7 +171,7 @@
 
 	$f = new Forum ($g,$group_forum_id);
 
-	forum_header(array('title'=>_('Delete')));
+	forum_header(array('title'=>_('Permanently Delete Forum'));
 	echo '<p>
 			<strong>'._('You are about to permanently and irretrievably delete this entire forum and all its contents!').'</strong><br />
 			</p>
@@ -180,8 +180,8 @@
 			<input type="hidden" name="deleteforum" value="y" />
 			<input type="hidden" name="group_id" value="'.$group_id.'" />
 			<input type="hidden" name="group_forum_id" value="'.$group_forum_id.'" />
-			<input type="checkbox" name="sure" value="1" />'._('I\'m Sure').'<br />
-			<input type="checkbox" name="really_sure" value="1" />'._('I\'m Really Sure').'<br />
+			<input type="checkbox" name="sure" value="1" />'._('I am Sure').'<br />
+			<input type="checkbox" name="really_sure" value="1" />'._('I am Really Sure').'<br />
 			<input type="submit" name="submit" value="'._('Delete').'" />
 			</form>';
 	forum_footer(array());
@@ -370,7 +370,7 @@
 		$farr = $ff->getForums();
 
 		if ($ff->isError()) {
-			echo '<p class="error">'.sprintf(_('No Forums Found For %s'), $g->getPublicName())
+			echo '<p class="error">'.sprintf(_('No Forums Found for %s'), $g->getPublicName())
                  . $ff->getErrorMessage().'</p>';
 			forum_footer(array());
 			exit;

Modified: trunk/src/www/pm/admin/index.php
===================================================================
--- trunk/src/www/pm/admin/index.php	2013-09-10 12:46:18 UTC (rev 17928)
+++ trunk/src/www/pm/admin/index.php	2013-09-10 13:07:35 UTC (rev 17929)
@@ -175,7 +175,7 @@
 	session_require_perm ('pm', $pg->getID(), 'manager') ;
 
 	$title = sprintf(_('Add Categories to: %s'), $pg->getName());
-	pm_header(array ('title'=>$title));
+	pm_header(array('title'=>$title));
 
 	/*
 		List of possible categories for this ArtifactType
@@ -404,7 +404,7 @@
 
 	if (count($pg_arr) < 1 || $pg_arr == false) {
 		echo '<p class="information">' . _('No Subprojects Found in this Project') . '</p>';
-		echo '<p>' . _('You may add new Subprojects using the "Add a Subproject" link above.') . '</p>';
+		echo '<p>' . _('You may add new Subprojects using the “Add a Subproject” link above.') . '</p>';
 		echo db_error();
 	} else {
 		for ($i=0; $i<count($pg_arr); $i++) {

Modified: trunk/src/www/project/admin/roledelete.php
===================================================================
--- trunk/src/www/project/admin/roledelete.php	2013-09-10 12:46:18 UTC (rev 17928)
+++ trunk/src/www/project/admin/roledelete.php	2013-09-10 13:07:35 UTC (rev 17929)
@@ -78,7 +78,7 @@
 
 <form action="<?php echo getStringFromServer('PHP_SELF') ?>?group_id=<?php echo $group_id ?>&role_id=<?php echo $role_id ?>" method="post">
 <p>
-<input name="sure" value="1" type="checkbox" /><?php echo _("I'm Sure") ?><br />
+<input name="sure" value="1" type="checkbox" /><?php echo _("I am Sure") ?><br />
 </p>
 
 <p>




More information about the Fusionforge-commits mailing list