From: <var...@us...> - 2011-03-01 09:32:58
|
Revision: 7939 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7939&view=rev Author: vargenau Date: 2011-03-01 09:32:52 +0000 (Tue, 01 Mar 2011) Log Message: ----------- Better translation mechanism Modified Paths: -------------- trunk/lib/diff.php Modified: trunk/lib/diff.php =================================================================== --- trunk/lib/diff.php 2011-02-04 16:35:28 UTC (rev 7938) +++ trunk/lib/diff.php 2011-03-01 09:32:52 UTC (rev 7939) @@ -44,7 +44,7 @@ foreach ($words as $word) { // new-line should only come as first char of word. - if ($word === "") + if ($word === "") continue; if ($word[0] == "\n") { $this->_group .= " "; @@ -220,13 +220,13 @@ $version = $request->getArg('version'); $previous = $request->getArg('previous'); } - + // abort if page doesn't exist $dbi = $request->getDbh(); $page = $request->getPage(); $current = $page->getCurrentRevision(false); if ($current->getVersion() < 1) { - $html = HTML::div(array('class'=>'wikitext','id'=>'difftext'), + $html = HTML::div(array('class'=>'wikitext','id'=>'difftext'), HTML::p(fmt("I'm sorry, there is no such page as %s.", WikiLink($pagename, 'unknown')))); require_once('lib/Template.php'); @@ -317,14 +317,16 @@ if ($diff->isEmpty()) { $html->pushContent(HTML::hr(), - HTML::p(_("Content of versions "), $old->getVersion(), - _(" and "), $new->getVersion(), _(" is identical."))); + HTML::p(sprintf(_("Content of versions %1$s and %2$s is identical."), + $old->getVersion(), + $new->getVersion()))); // If two consecutive versions have the same content, it is because the page was // renamed, or metadata changed: ACL, owner, markup. // We give the reason by printing the summary. if (($new->getVersion() - $old->getVersion()) == 1) { - $html->pushContent(HTML::p(_("Version "), $new->getVersion(), - _(" was created because: "), $new->get('summary'))); + $html->pushContent(HTML::p(sprintf(_("Version %1$s was created because: %2$s"), + $new->getVersion(), + $new->get('summary')))); } } else { $fmt = new HtmlUnifiedDiffFormatter; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |