[Fusionforge-commits] r15109 - in trunk/src: common/docman common/docman/include common/tracker/views www/tracker www/tracker/admin

Roland Mas lolando at fusionforge.org
Mon Mar 12 10:34:46 CET 2012


Author: lolando
Date: 2012-03-12 10:34:46 +0100 (Mon, 12 Mar 2012)
New Revision: 15109

Modified:
   trunk/src/common/docman/DocumentGroup.class.php
   trunk/src/common/docman/include/DocumentGroupHTML.class.php
   trunk/src/common/tracker/views/form-adminroadmap.php
   trunk/src/www/tracker/admin/index.php
   trunk/src/www/tracker/roadmap.php
Log:
Rephrase a few gettext invocations to make translation easier

Modified: trunk/src/common/docman/DocumentGroup.class.php
===================================================================
--- trunk/src/common/docman/DocumentGroup.class.php	2012-03-12 09:34:34 UTC (rev 15108)
+++ trunk/src/common/docman/DocumentGroup.class.php	2012-03-12 09:34:46 UTC (rev 15109)
@@ -422,7 +422,7 @@
 			$this->fetchData($this->getID());
 			return true;
 		} else {
-			$this->setOnUpdateError(_('Error') . _(': ') .db_error());
+			$this->setOnUpdateError(sprintf(_('Error: %s'), db_error()));
 			return false;
 		}
 	}

Modified: trunk/src/common/docman/include/DocumentGroupHTML.class.php
===================================================================
--- trunk/src/common/docman/include/DocumentGroupHTML.class.php	2012-03-12 09:34:34 UTC (rev 15108)
+++ trunk/src/common/docman/include/DocumentGroupHTML.class.php	2012-03-12 09:34:46 UTC (rev 15109)
@@ -39,7 +39,7 @@
 			return false;
 		}
 		if ($Group->isError()) {
-			$this->setError(_('Error') . _(': ') . $Group->getErrorMessage());
+			$this->setError(sprintf(_('Error: %s'), $Group->getErrorMessage()));
 			return false;
 		}
 		$this->Group =& $Group;

Modified: trunk/src/common/tracker/views/form-adminroadmap.php
===================================================================
--- trunk/src/common/tracker/views/form-adminroadmap.php	2012-03-12 09:34:34 UTC (rev 15108)
+++ trunk/src/common/tracker/views/form-adminroadmap.php	2012-03-12 09:34:46 UTC (rev 15109)
@@ -66,7 +66,7 @@
 	$roadmap_list = getArrayFromRequest('roadmap_list');
 
 	if (! $roadmap_name) {
-		$error_msg .= _("Can't create or rename roadmap")._(': ')._('name is empty');
+		$error_msg .= _("Can't create or rename roadmap: name is empty");
 	}
 	else {
 		$roadmap = new Roadmap($group, $roadmap_id);
@@ -189,7 +189,7 @@
 	?>
 	<form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&admin_roadmap=1' ?>" method="post">
 	<?php
-	echo '<p>'._('Name'). _(': ') . '<input type="text" name="roadmap_name" value="'.$roadmap->getName().'" size="40" /></p>';
+	echo '<p>'._('Name: ') . '<input type="text" name="roadmap_name" value="'.$roadmap->getName().'" size="40" /></p>';
 
 	if ($roadmap_id) {
 		echo '<input type="hidden" name="roadmap_id" value="'.$roadmap_id.'" />';

Modified: trunk/src/www/tracker/admin/index.php
===================================================================
--- trunk/src/www/tracker/admin/index.php	2012-03-12 09:34:34 UTC (rev 15108)
+++ trunk/src/www/tracker/admin/index.php	2012-03-12 09:34:46 UTC (rev 15109)
@@ -183,7 +183,7 @@
 			$error_msg .= _('Unable to create ArtifactCanned Object');
 		} else {
 			if (!$acr->delete()) {
-				$error_msg .= _('Error') . _(': ') . $acr->getErrorMessage();
+				$error_msg .= sprintf(_('Error: %s'), $acr->getErrorMessage());
 				$acr->clearError();
 			} else {
 				$feedback .= _('Canned Response Deleted');

Modified: trunk/src/www/tracker/roadmap.php
===================================================================
--- trunk/src/www/tracker/roadmap.php	2012-03-12 09:34:34 UTC (rev 15108)
+++ trunk/src/www/tracker/roadmap.php	2012-03-12 09:34:46 UTC (rev 15109)
@@ -172,7 +172,7 @@
 
 $atfh = new ArtifactTypeFactoryHtml($group);
 if (!$atfh || !is_object($atfh) || $atfh->isError()) {
-	exit_error(_('Error')._(': ')._('could Not Get ArtifactTypeFactoryHtml'), 'tracker');
+	exit_error(_('Error: could Not Get ArtifactTypeFactoryHtml'), 'tracker');
 }
 
 $template = getIntFromRequest('template', 0);
@@ -198,7 +198,7 @@
 if ($roadmap_name) {
 	$selected_roadmap = $roadmap_factory->getRoadmapByName($roadmap_name, true);
 	if (! is_object($selected_roadmap)) {
-		$error_msg .= _('Error')._(': ').sprintf(_('roadmap %s is not available'), $roadmap_name);
+		$error_msg .= sprintf(_('Error: roadmap %s is not available'), $roadmap_name);
 		local_exit();
 	}
 	else {
@@ -208,7 +208,7 @@
 elseif($roadmap_id) {
 	$selected_roadmap = $roadmap_factory->getRoadmapByID($roadmap_id, true);
 	if (! is_object($selected_roadmap)) {
-		$error_msg .= _('Error')._(': ').sprintf(_('roadmap %s is not available'), 'ID='.$roadmap_id);
+		$error_msg .= sprintf(_('Error: roadmap %s is not available'), 'ID='.$roadmap_id);
 		local_exit();
 	}
 	else {
@@ -220,7 +220,7 @@
 	if ($roadmap_id) {
 		$selected_roadmap = new Roadmap($group, $roadmap_id);
 		if (! is_object($selected_roadmap)) {
-			$error_msg .= _('Error')._(': ').sprintf(_('roadmap %s is not available'), 'ID='.$roadmap_id);
+			$error_msg .= sprintf(_('Error: roadmap %s is not available'), 'ID='.$roadmap_id);
 			local_exit();
 		}
 	}
@@ -235,7 +235,7 @@
 }
 $release_order = array_reverse($selected_roadmap->getReleases());
 if ($selected_release && ! in_array($selected_release, $release_order)) {
-	$error_msg .= _('Error')._(': ').sprintf(_('release %s is not available'), $selected_release);
+	$error_msg .= sprintf(_('Error: release %s is not available'), $selected_release);
 	local_exit();
 }
 
@@ -411,7 +411,7 @@
 		echo '<table class="fullwidth"><tr>'."\n";
 
 		if (! empty($roadmaps) && ! $selected_release) {
-			echo '<td class="align-center">' . _("Roadmap") . _(": ") . '<select name="roadmap" id="roadmap">'."\n";
+			echo '<td class="align-center">' . _("Roadmap: ") . '<select name="roadmap" id="roadmap">'."\n";
 			foreach ($roadmaps as $roadmap) {
 				echo '<option value="'.$roadmap->getID().'"'.($roadmap->getID() == $roadmap_id ? ' selected="selected"' : '').' >'.$roadmap->getName().'</option>'."\n";
 			}
@@ -419,7 +419,7 @@
 		}
 
 		if (! $selected_release) {
-			echo '<td class="align-center">'._('Number of release(s) to display')._(': ');
+			echo '<td class="align-center">'._('Number of release(s) to display: ');
 			echo '<select name="nb_release" id="nb_release" >';
 			foreach (array(1, 2, 4, 8) as $nb) {
 				echo '<option value="'.$nb.'"'.($nb_release == $nb ? ' selected="selected"' : '').' >'.$nb.'</option>';
@@ -432,7 +432,7 @@
 					getStringFromServer('PHP_SELF').'?group_id='.$group_id.($roadmap_id ? '&roadmap_id='.$roadmap_id : ''));
 		}
 
-		echo '<td class="align-center">' . _("Display graphs") . _(": ") . '<select name="display_graph" id="display_graph">'."\n";
+		echo '<td class="align-center">' . _("Display graphs: ") . '<select name="display_graph" id="display_graph">'."\n";
 		if (! $selected_release) {
 			echo '<option value="2"'.($display_graph == 2 ? ' selected="selected"' : '').' >'._('Only last').'</option>'."\n";
 		}




More information about the Fusionforge-commits mailing list