<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[GlotPress][718] trunk: Remove trailing whitespace, pass 2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://glotpress.trac.wordpress.org/changeset/718">718</a></dd>
<dt>Author</dt> <dd>nbachiyski</dd>
<dt>Date</dt> <dd>2012-10-31 00:32:02 +0000 (Wed, 31 Oct 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove trailing whitespace, pass 2</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkgpincludesadvancedpermissionsphp">trunk/gp-includes/advanced-permissions.php</a></li>
<li><a href="#trunkgpincludesassetsloaderphp">trunk/gp-includes/assets-loader.php</a></li>
<li><a href="#trunkgpincludesclassbpoptionsphp">trunk/gp-includes/class.bp-options.php</a></li>
<li><a href="#trunkgpincludescliphp">trunk/gp-includes/cli.php</a></li>
<li><a href="#trunkgpincludesformatsformat_androidphp">trunk/gp-includes/formats/format_android.php</a></li>
<li><a href="#trunkgpincludesformatsformat_pomophp">trunk/gp-includes/formats/format_pomo.php</a></li>
<li><a href="#trunkgpincludesformatsformat_resxphp">trunk/gp-includes/formats/format_resx.php</a></li>
<li><a href="#trunkgpincludesformatsformat_rrcphp">trunk/gp-includes/formats/format_rrc.php</a></li>
<li><a href="#trunkgpincludesformatsformat_stringsphp">trunk/gp-includes/formats/format_strings.php</a></li>
<li><a href="#trunkgpincludesinstallupgradephp">trunk/gp-includes/install-upgrade.php</a></li>
<li><a href="#trunkgpincludesl10nphp">trunk/gp-includes/l10n.php</a></li>
<li><a href="#trunkgpincludespluginphp">trunk/gp-includes/plugin.php</a></li>
<li><a href="#trunkgpincludesrouterphp">trunk/gp-includes/router.php</a></li>
<li><a href="#trunkgpincludesroutesloginphp">trunk/gp-includes/routes/login.php</a></li>
<li><a href="#trunkgpincludesroutesprojectphp">trunk/gp-includes/routes/project.php</a></li>
<li><a href="#trunkgpincludesroutestranslationsetphp">trunk/gp-includes/routes/translation-set.php</a></li>
<li><a href="#trunkgpincludesroutestranslationphp">trunk/gp-includes/routes/translation.php</a></li>
<li><a href="#trunkgpincludesschemaphp">trunk/gp-includes/schema.php</a></li>
<li><a href="#trunkgpincludesstringsphp">trunk/gp-includes/strings.php</a></li>
<li><a href="#trunkgpincludestemplatephp">trunk/gp-includes/template.php</a></li>
<li><a href="#trunkgpincludesthingspermissionphp">trunk/gp-includes/things/permission.php</a></li>
<li><a href="#trunkgpincludesthingsprojectphp">trunk/gp-includes/things/project.php</a></li>
<li><a href="#trunkgpincludesthingstranslationsetphp">trunk/gp-includes/things/translation-set.php</a></li>
<li><a href="#trunkgpincludesthingstranslationphp">trunk/gp-includes/things/translation.php</a></li>
<li><a href="#trunkgpincludesthingsuserphp">trunk/gp-includes/things/user.php</a></li>
<li><a href="#trunkgpincludesthingsvalidatorpermissionphp">trunk/gp-includes/things/validator-permission.php</a></li>
<li><a href="#trunkgpincludesvalidationphp">trunk/gp-includes/validation.php</a></li>
<li><a href="#trunkgploadphp">trunk/gp-load.php</a></li>
<li><a href="#trunkgptemplatesheaderphp">trunk/gp-templates/header.php</a></li>
<li><a href="#trunkgptemplateshelperfunctionsphp">trunk/gp-templates/helper-functions.php</a></li>
<li><a href="#trunkgptemplatesinstallphp">trunk/gp-templates/install.php</a></li>
<li><a href="#trunkgptemplatesloginphp">trunk/gp-templates/login.php</a></li>
<li><a href="#trunkgptemplatesprojectformphp">trunk/gp-templates/project-form.php</a></li>
<li><a href="#trunkgptemplatesprojectpermissionsphp">trunk/gp-templates/project-permissions.php</a></li>
<li><a href="#trunkgptemplatesprojectphp">trunk/gp-templates/project.php</a></li>
<li><a href="#trunkgptemplatestranslationrowphp">trunk/gp-templates/translation-row.php</a></li>
<li><a href="#trunkgptemplatestranslationsetformphp">trunk/gp-templates/translation-set-form.php</a></li>
<li><a href="#trunkgptemplatestranslationsphp">trunk/gp-templates/translations.php</a></li>
<li><a href="#trunklocaleslocalesphp">trunk/locales/locales.php</a></li>
<li><a href="#trunkpomoentryphp">trunk/pomo/entry.php</a></li>
<li><a href="#trunkpomomophp">trunk/pomo/mo.php</a></li>
<li><a href="#trunkpomopophp">trunk/pomo/po.php</a></li>
<li><a href="#trunkpomostreamsphp">trunk/pomo/streams.php</a></li>
<li><a href="#trunkpomotranslationsphp">trunk/pomo/translations.php</a></li>
<li><a href="#trunkscriptsaddadminphp">trunk/scripts/add-admin.php</a></li>
<li><a href="#trunkscriptsexportphp">trunk/scripts/export.php</a></li>
<li><a href="#trunkscriptsimportoriginalsphp">trunk/scripts/import-originals.php</a></li>
<li><a href="#trunkscriptsimportphp">trunk/scripts/import.php</a></li>
<li><a href="#trunkscriptsrecheckwarningsphp">trunk/scripts/recheck-warnings.php</a></li>
<li><a href="#trunkscriptsregeneratepathsphp">trunk/scripts/regenerate-paths.php</a></li>
<li><a href="#trunkscriptsremovemultiplecurrentsphp">trunk/scripts/remove-multiple-currents.php</a></li>
<li><a href="#trunkscriptsupgradesetpermissionsphp">trunk/scripts/upgrade-set-permissions.php</a></li>
<li><a href="#trunkscriptswipepermissionsphp">trunk/scripts/wipe-permissions.php</a></li>
<li><a href="#trunkscriptswporg2slugphp">trunk/scripts/wporg2slug.php</a></li>
<li><a href="#trunktallphp">trunk/t/all.php</a></li>
<li><a href="#trunktlibfactoryphp">trunk/t/lib/factory.php</a></li>
<li><a href="#trunktlibtestcaseroutephp">trunk/t/lib/testcase-route.php</a></li>
<li><a href="#trunktlibtestcasephp">trunk/t/lib/testcase.php</a></li>
<li><a href="#trunkttest_format_androidphp">trunk/t/test_format_android.php</a></li>
<li><a href="#trunkttest_format_resxphp">trunk/t/test_format_resx.php</a></li>
<li><a href="#trunkttest_format_rrcphp">trunk/t/test_format_rrc.php</a></li>
<li><a href="#trunkttest_linksphp">trunk/t/test_links.php</a></li>
<li><a href="#trunkttest_miscphp">trunk/t/test_misc.php</a></li>
<li><a href="#trunkttest_mophp">trunk/t/test_mo.php</a></li>
<li><a href="#trunkttest_noop_translationsphp">trunk/t/test_noop_translations.php</a></li>
<li><a href="#trunkttest_permissionsphp">trunk/t/test_permissions.php</a></li>
<li><a href="#trunkttest_pophp">trunk/t/test_po.php</a></li>
<li><a href="#trunkttest_templatephp">trunk/t/test_template.php</a></li>
<li><a href="#trunkttest_thingphp">trunk/t/test_thing.php</a></li>
<li><a href="#trunkttest_translation_entryphp">trunk/t/test_translation_entry.php</a></li>
<li><a href="#trunkttest_translationsphp">trunk/t/test_translations.php</a></li>
<li><a href="#trunkttest_urlsphp">trunk/t/test_urls.php</a></li>
<li><a href="#trunkttest_userphp">trunk/t/test_user.php</a></li>
<li><a href="#trunkttests_routestest_route_translation_setphp">trunk/t/tests_routes/test_route_translation_set.php</a></li>
<li><a href="#trunkttests_testlibtest_default_factoriesphp">trunk/t/tests_testlib/test_default_factories.php</a></li>
<li><a href="#trunkttests_testlibtest_factoryphp">trunk/t/tests_testlib/test_factory.php</a></li>
<li><a href="#trunkttests_thingstest_thing_originalphp">trunk/t/tests_things/test_thing_original.php</a></li>
<li><a href="#trunkttests_thingstest_thing_projectphp">trunk/t/tests_things/test_thing_project.php</a></li>
<li><a href="#trunkttests_thingstest_thing_translationphp">trunk/t/tests_things/test_thing_translation.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkgpincludesadvancedpermissionsphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/advanced-permissions.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/advanced-permissions.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/advanced-permissions.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">                 $set = GP::$translation_set-&gt;get( $args['object_id'] );
</span><span class="cx">         return $args['user']-&gt;can( 'approve', GP::$validator_permission-&gt;object_type,
</span><span class="cx">                 GP::$validator_permission-&gt;object_id( $set-&gt;project_id, $set-&gt;locale, $set-&gt;slug ) );
</span><del>-        
</del><ins>+
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> add_filter( 'can_user', 'gp_recurse_project_permissions', 10, 2 );
</span></span></pre></div>
<a id="trunkgpincludesassetsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/assets-loader.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/assets-loader.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/assets-loader.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx">         // TODO: get text direction for current locale
</span><span class="cx">         //$styles-&gt;text_direction = 'rtl' == get_bloginfo( 'text_direction' ) ? 'rtl' : 'ltr';
</span><span class="cx">         $styles-&gt;text_direction = 'ltr';
</span><del>-        
</del><ins>+
</ins><span class="cx">         $styles-&gt;add( 'base', '/style.css', array(), '20120410' );
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkgpincludesclassbpoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/class.bp-options.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/class.bp-options.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/class.bp-options.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx">         function prefix() {
</span><span class="cx">                 return 'bp_glotpress_';
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function get($option) {
</span><span class="cx">                 switch ($option) {
</span><span class="cx">                         case 'application_id':
</span><span class="lines">@@ -38,15 +38,15 @@
</span><span class="cx">                                 break;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function add($option, $value) {
</span><span class="cx">                 return BP_Options::update($option, $value);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function update($option, $value) {
</span><span class="cx">                 return bb_update_option(BP_Options::prefix() . $option, $value);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function delete($option) {
</span><span class="cx">                 return bb_delete_option(BP_Options::prefix() . $option);
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkgpincludescliphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/cli.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/cli.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/cli.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,11 +1,11 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><span class="cx"> class GP_CLI {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $short_options = '';
</span><span class="cx">         var $program_name = '';
</span><span class="cx">         var $usage = '';
</span><del>-        
</del><ins>+
</ins><span class="cx">         function __construct() {
</span><span class="cx">                 global $argv;
</span><span class="cx">                 if ( gp_array_get( $_SERVER, 'HTTP_HOST' ) ) {
</span><span class="lines">@@ -14,21 +14,21 @@
</span><span class="cx">                 if ( !defined( 'STDERR' ) ) {
</span><span class="cx">                         define( 'STDERR', fopen( 'php://stderr', 'w' ) );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $this-&gt;program_name = array_shift( $argv );
</span><span class="cx">                 $this-&gt;options = getopt( $this-&gt;short_options );
</span><span class="cx">                 $this-&gt;args = $argv;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function usage() {
</span><span class="cx">                 $this-&gt;error( 'php '.$this-&gt;program_name.' '.$this-&gt;usage );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function to_stderr( $text, $no_new_line = false ) {
</span><span class="cx">                 $text .= ($no_new_line? '' : &quot;\n&quot;);
</span><span class="cx">                 fwrite( STDERR, $text );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function error( $message, $exit_code = 1 ) {
</span><span class="cx">                 $this-&gt;to_stderr( $message );
</span><span class="cx">                 exit( $exit_code );
</span><span class="lines">@@ -36,29 +36,29 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class GP_Translation_Set_Script extends GP_CLI {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $short_options = 'p:l:t:';
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $usage = &quot;-p &lt;project-path&gt; -l &lt;locale&gt; [-t &lt;translation-set-slug&gt;]&quot;;
</span><del>-        
</del><ins>+
</ins><span class="cx">         function run() {
</span><span class="cx">                 if ( !isset( $this-&gt;options['l'] ) || !isset( $this-&gt;options['p'] ) ) {
</span><span class="cx">                         $this-&gt;usage();
</span><span class="cx">                 }
</span><span class="cx">                 $this-&gt;project = GP::$project-&gt;by_path( $this-&gt;options['p'] );
</span><span class="cx">                 if ( !$this-&gt;project ) $this-&gt;error( __('Project not found!') );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $this-&gt;locale = GP_Locales::by_slug( $this-&gt;options['l'] );
</span><span class="cx">                 if ( !$this-&gt;locale ) $this-&gt;error( __('Locale not found!') );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $this-&gt;options['t'] = gp_array_get( $this-&gt;options, 't', 'default' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $this-&gt;translation_set = GP::$translation_set-&gt;by_project_id_slug_and_locale( $this-&gt;project-&gt;id, $this-&gt;options['t'], $this-&gt;locale-&gt;slug );
</span><span class="cx">                 if ( !$this-&gt;translation_set ) $this-&gt;error( __('Translation set not found!') );
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;action_on_translation_set( $this-&gt;translation_set );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function action_on_translation_set( $translation_set ) {
</span><span class="cx">                 // define this function in a subclass
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkgpincludesformatsformat_androidphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/formats/format_android.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/formats/format_android.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/formats/format_android.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><span class="cx"> class GP_Format_Android {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $extension = 'xml';
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $exported = '';
</span><del>-        
</del><ins>+
</ins><span class="cx">         function line( $string, $prepend_tabs = 0 ) {
</span><span class="cx">                 $this-&gt;exported .= str_repeat( &quot;\t&quot;, $prepend_tabs ) . &quot;$string\n&quot;;
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         function print_exported_file( $project, $locale, $translation_set, $entries ) {
</span><span class="cx">                 $this-&gt;exported = '';
</span><span class="cx">                 $this-&gt;line( '&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;' );
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx">                 $this-&gt;line( '&lt;/resources&gt;' );
</span><span class="cx">                 return $this-&gt;exported;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function read_translations_from_file( $file_name, $project = null ) {
</span><span class="cx">                 if ( is_null( $project ) ) return false;
</span><span class="cx">                 $translations = $this-&gt;read_originals_from_file( $file_name );
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">                 $new_translations = new Translations;
</span><span class="cx">                 foreach( $translations-&gt;entries as $key =&gt; $entry ) {
</span><span class="cx">                         // we have been using read_originals_from_file to parse the file
</span><del>-                        // so we need to swap singular and translation                        
</del><ins>+                        // so we need to swap singular and translation
</ins><span class="cx">                         $entry-&gt;translations = array( $entry-&gt;singular );
</span><span class="cx">                         $entry-&gt;singular = null;
</span><span class="cx">                         foreach( $originals as $original ) {
</span><span class="lines">@@ -46,11 +46,11 @@
</span><span class="cx">                                 error_log( sprintf( __(&quot;Missing context %s in project #%d&quot;), $entry-&gt;context, $project-&gt;id ) );
</span><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         $new_translations-&gt;add_entry( $entry );
</span><span class="cx">                 }
</span><span class="cx">                 return $new_translations;
</span><del>-                
</del><ins>+
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function read_originals_from_file( $file_name ) {
</span><span class="lines">@@ -69,11 +69,11 @@
</span><span class="cx">                 return $entries;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        
</del><ins>+
</ins><span class="cx">         function unescape( $string ) {
</span><del>-                return stripcslashes( $string );                
</del><ins>+                return stripcslashes( $string );
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function escape( $string ) {
</span><span class="cx">                 $string = addcslashes( $string, &quot;'\n&quot;);
</span><span class="cx">                 $string = str_replace( array( '&amp;', '&lt;' ), array( '&amp;amp;', '&amp;lt;' ), $string );
</span></span></pre></div>
<a id="trunkgpincludesformatsformat_pomophp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/formats/format_pomo.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/formats/format_pomo.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/formats/format_pomo.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><span class="cx"> class GP_Format_PO {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $extension = 'po';
</span><span class="cx">         var $class = 'PO';
</span><del>-        
</del><ins>+
</ins><span class="cx">         function print_exported_file( $project, $locale, $translation_set, $entries ) {
</span><span class="cx">                 $po = new $this-&gt;class;
</span><span class="cx">                 // TODO: add more meta data in the project: language team, report URL
</span><span class="lines">@@ -30,13 +30,13 @@
</span><span class="cx"> 
</span><span class="cx">                 echo $po-&gt;export();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function read_translations_from_file( $file_name, $project = null ) {
</span><span class="cx">                 $po = new $this-&gt;class;
</span><span class="cx">                 $result = $po-&gt;import_from_file( $file_name );
</span><span class="cx">                 return $result? $po : $result;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function read_originals_from_file( $file_name ) {
</span><span class="cx">                 return $this-&gt;read_translations_from_file( $file_name );
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkgpincludesformatsformat_resxphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/formats/format_resx.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/formats/format_resx.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/formats/format_resx.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,21 +1,21 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><span class="cx"> class GP_Format_ResX {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $extension = 'resx.xml';
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $exported = '';
</span><del>-        
</del><ins>+
</ins><span class="cx">         function line( $string, $prepend_tabs = 0 ) {
</span><span class="cx">                 $this-&gt;exported .= str_repeat( &quot;\t&quot;, $prepend_tabs ) . &quot;$string\n&quot;;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function res_header( $name, $value ) {
</span><span class="cx">                 $this-&gt;line( '&lt;resheader name=&quot;'.$name.'&quot;&gt;', 1 );
</span><span class="cx">                 $this-&gt;line( '&lt;value&gt;'.$value.'&lt;/value&gt;', 2 );
</span><del>-                $this-&gt;line( '&lt;/resheader&gt;', 1 );                
</del><ins>+                $this-&gt;line( '&lt;/resheader&gt;', 1 );
</ins><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         function print_exported_file( $project, $locale, $translation_set, $entries ) {
</span><span class="cx">                 $this-&gt;exported = '';
</span><span class="cx">                 $this-&gt;line( '&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;' );
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">                 $this-&gt;line( '&lt;/root&gt;' );
</span><span class="cx">                 return $this-&gt;exported;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function read_translations_from_file( $file_name, $project = null ) {
</span><span class="cx">                 if ( is_null( $project ) ) return false;
</span><span class="cx">                 $translations = $this-&gt;read_originals_from_file( $file_name );
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">                 $new_translations = new Translations;
</span><span class="cx">                 foreach( $translations-&gt;entries as $key =&gt; $entry ) {
</span><span class="cx">                         // we have been using read_originals_from_file to parse the file
</span><del>-                        // so we need to swap singular and translation                        
</del><ins>+                        // so we need to swap singular and translation
</ins><span class="cx">                         $entry-&gt;translations = array( $entry-&gt;singular );
</span><span class="cx">                         $entry-&gt;singular = null;
</span><span class="cx">                         foreach( $originals as $original ) {
</span><span class="lines">@@ -61,11 +61,11 @@
</span><span class="cx">                                 error_log( sprintf( __(&quot;Missing context %s in project #%d&quot;), $entry-&gt;context, $project-&gt;id ) );
</span><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         $new_translations-&gt;add_entry( $entry );
</span><span class="cx">                 }
</span><span class="cx">                 return $new_translations;
</span><del>-                
</del><ins>+
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function read_originals_from_file( $file_name ) {
</span><span class="lines">@@ -90,11 +90,11 @@
</span><span class="cx">                 return $entries;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        
</del><ins>+
</ins><span class="cx">         function unescape( $string ) {
</span><span class="cx">                 return $string;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function escape( $string ) {
</span><span class="cx">                 $string = str_replace( array( '&amp;', '&lt;' ), array( '&amp;amp;', '&amp;lt;' ), $string );
</span><span class="cx">                 return $string;
</span></span></pre></div>
<a id="trunkgpincludesformatsformat_rrcphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/formats/format_rrc.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/formats/format_rrc.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/formats/format_rrc.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,9 +1,9 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><span class="cx"> class GP_Format_RRC {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $extension = 'rrc';
</span><del>-        
</del><ins>+
</ins><span class="cx">         function print_exported_file( $project, $locale, $translation_set, $entries ) {
</span><span class="cx">                 $rrc = array();
</span><span class="cx">                 foreach( $entries as $entry ) {
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return $result;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function read_translations_from_file( $file_name, $project = null ) {
</span><span class="cx">                 if ( is_null( $project ) ) return false;
</span><span class="cx">                 $translations = $this-&gt;read_originals_from_file( $file_name );
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">                 $new_translations = new Translations;
</span><span class="cx">                 foreach( $translations-&gt;entries as $key =&gt; $entry ) {
</span><span class="cx">                         // we have been using read_originals_from_file to parse the file
</span><del>-                        // so we need to swap singular and translation                        
</del><ins>+                        // so we need to swap singular and translation
</ins><span class="cx">                         $entry-&gt;translations = array( $entry-&gt;singular );
</span><span class="cx">                         $entry-&gt;singular = null;
</span><span class="cx">                         foreach( $originals as $original ) {
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">                                 error_log( sprintf( __(&quot;Missing context %s in project #%d&quot;), $entry-&gt;context, $project-&gt;id ) );
</span><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         $new_translations-&gt;add_entry( $entry );
</span><span class="cx">                 }
</span><span class="cx">                 return $new_translations;
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">                 $entries = new Translations;
</span><span class="cx">                 $f = fopen( $file_name, 'r' );
</span><span class="cx">                 if ( !$f ) return false;
</span><del>-                $context = $index = $base_singular = $entry = null;                
</del><ins>+                $context = $index = $base_singular = $entry = null;
</ins><span class="cx">                 while ( false !== ( $line = fgets( $f ) ) ) {
</span><span class="cx">                         $line = trim( $line );
</span><span class="cx">                         if ( is_null( $context) ) {
</span><span class="lines">@@ -100,10 +100,10 @@
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><del>-                return $entries;        
</del><ins>+                return $entries;
</ins><span class="cx">         }
</span><del>-        
</del><span class="cx"> 
</span><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Escapes a UTF-8 string to be used in RRC file
</span><span class="cx">          *
</span><span class="lines">@@ -124,14 +124,14 @@
</span><span class="cx">                                         $string .= $c_latin1;
</span><span class="cx">                                 } else {
</span><span class="cx">                                         $entity = mb_encode_numericentity( $c, array(0x0, 0xffff, 0, 0xffff), 'UTF-8' );
</span><del>-                                        $code_point = str_replace( array('&amp;', '#', ';'), '', $entity );                                
</del><ins>+                                        $code_point = str_replace( array('&amp;', '#', ';'), '', $entity );
</ins><span class="cx">                                         $string .= '\\u' . str_pad( strtoupper( dechex( $code_point ) ), 4, '0', STR_PAD_LEFT );
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 return $string;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * The reverse of {@see escape}
</span><span class="cx">          */
</span></span></pre></div>
<a id="trunkgpincludesformatsformat_stringsphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/formats/format_strings.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/formats/format_strings.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/formats/format_strings.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,22 +1,22 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><span class="cx"> class GP_Format_Strings {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $extension = 'strings';
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $exported = '';
</span><del>-        
</del><ins>+
</ins><span class="cx">         function sort_entries( $a, $b ) {
</span><span class="cx">                 if ( $a-&gt;context == $b-&gt;context ) {
</span><span class="cx">                         return 0;
</span><span class="cx">                 }
</span><span class="cx">                 return ( $a-&gt;context &gt; $b-&gt;context ) ? +1 : -1;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function print_exported_file( $project, $locale, $translation_set, $entries ) {
</span><span class="cx">                 $result = '';
</span><span class="cx">                 $prefix = pack( 'CC', 0xff, 0xfe ); // Add BOM
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $sorted_entries = $entries;
</span><span class="cx">                 usort( $sorted_entries, array( 'GP_Format_Strings', 'sort_entries' ) );
</span><span class="cx">                 foreach ( $sorted_entries as $entry ) {
</span><span class="lines">@@ -28,10 +28,10 @@
</span><span class="cx">                         }
</span><span class="cx">                         $result .= &quot;/* $comment */\n\&quot;$original\&quot; = \&quot;$translation\&quot;;\n\n&quot;;
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 return $prefix . mb_convert_encoding( $result, 'UTF-16LE' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function read_translations_from_file( $file_name, $project = null ) {
</span><span class="cx">                 if ( is_null( $project ) ) return false;
</span><span class="cx">                 $translations = $this-&gt;read_originals_from_file( $file_name );
</span><span class="lines">@@ -40,11 +40,11 @@
</span><span class="cx">                 $new_translations = new Translations;
</span><span class="cx">                 foreach( $translations-&gt;entries as $key =&gt; $entry ) {
</span><span class="cx">                         // we have been using read_originals_from_file to parse the file
</span><del>-                        // so we need to swap singular and translation                        
</del><ins>+                        // so we need to swap singular and translation
</ins><span class="cx">                         if ( $entry-&gt;context == $entry-&gt;singular ) {
</span><span class="cx">                                 $entry-&gt;translations = array();
</span><span class="cx">                         } else {
</span><del>-                                $entry-&gt;translations = array( $entry-&gt;singular );                                
</del><ins>+                                $entry-&gt;translations = array( $entry-&gt;singular );
</ins><span class="cx">                         }
</span><span class="cx">                         $entry-&gt;singular = null;
</span><span class="cx">                         foreach( $originals as $original ) {
</span><span class="lines">@@ -57,11 +57,11 @@
</span><span class="cx">                                 error_log( sprintf( __(&quot;Missing context %s in project #%d&quot;), $entry-&gt;context, $project-&gt;id ) );
</span><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         $new_translations-&gt;add_entry( $entry );
</span><span class="cx">                 }
</span><span class="cx">                 return $new_translations;
</span><del>-                
</del><ins>+
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function read_originals_from_file( $file_name ) {
</span><span class="lines">@@ -102,11 +102,11 @@
</span><span class="cx">                 return $entries;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        
</del><ins>+
</ins><span class="cx">         function unescape( $string ) {
</span><del>-                return stripcslashes( $string );                
</del><ins>+                return stripcslashes( $string );
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function escape( $string ) {
</span><span class="cx">                 $string = addcslashes( $string, &quot;'\n&quot;);
</span><span class="cx">                 return $string;
</span></span></pre></div>
<a id="trunkgpincludesinstallupgradephp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/install-upgrade.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/install-upgrade.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/install-upgrade.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -21,12 +21,12 @@
</span><span class="cx"> 
</span><span class="cx"> function gp_upgrade_db() {
</span><span class="cx">         global $gpdb;
</span><del>-        
</del><ins>+
</ins><span class="cx">         $alterations = BP_SQL_Schema_Parser::delta( $gpdb, gp_schema_get() );
</span><span class="cx">         $messages = $alterations['messages'];
</span><span class="cx">         $errors = $alterations['errors'];
</span><span class="cx">         if ( $errors ) return $errors;
</span><del>-        
</del><ins>+
</ins><span class="cx">         gp_upgrade_data( gp_get_option_from_db( 'gp_db_version' ) );
</span><span class="cx"> 
</span><span class="cx">         gp_update_db_version();
</span><span class="lines">@@ -49,18 +49,18 @@
</span><span class="cx">     $errors = gp_upgrade_db();
</span><span class="cx"> 
</span><span class="cx">         if ( $errors ) return $errors;
</span><del>-        
</del><ins>+
</ins><span class="cx">         gp_update_option( 'uri', guess_uri() );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function gp_create_initial_contents() {        
</del><ins>+function gp_create_initial_contents() {
</ins><span class="cx">         global $gpdb;
</span><span class="cx">         $gpdb-&gt;insert( $gpdb-&gt;projects, array('name' =&gt; __('Sample'), 'slug' =&gt; __('sample'), 'description' =&gt; __('A Sample Project'), 'path' =&gt; __('sample') ) );
</span><span class="cx">         $gpdb-&gt;insert( $gpdb-&gt;originals, array('project_id' =&gt; 1, 'singular' =&gt; __('GlotPress FTW'), 'comment' =&gt; __('FTW means For The Win'), 'context' =&gt; 'dashboard', 'references' =&gt; 'bigfile:666 little-dir/small-file.php:71' ) );
</span><span class="cx">         $gpdb-&gt;insert( $gpdb-&gt;originals, array('project_id' =&gt; 1, 'singular' =&gt; __('A GlotPress'), 'plural' =&gt; __('Many GlotPresses') ) );
</span><del>-        
</del><ins>+
</ins><span class="cx">         $gpdb-&gt;insert( $gpdb-&gt;translation_sets, array( 'name' =&gt; __('My Translation'), 'slug' =&gt; __('my'), 'project_id' =&gt; 1, 'locale' =&gt; 'bg', ) );
</span><del>-        
</del><ins>+
</ins><span class="cx">         // TODO: ask the user for an e-mail -- borrow WordPress install process
</span><span class="cx">         if ( !defined('CUSTOM_USER_TABLE') ) {
</span><span class="cx">                 $admin = GP::$user-&gt;create( array( 'user_login' =&gt; 'admin', 'user_pass' =&gt; 'a', 'user_email' =&gt; 'baba@baba.net' ) );
</span></span></pre></div>
<a id="trunkgpincludesl10nphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/l10n.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/l10n.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/l10n.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx">         // GP_LANG is defined in gp-config.
</span><span class="cx">         if ( defined('GP_LANG') )
</span><span class="cx">                 $locale = GP_LANG;
</span><del>-                
</del><ins>+
</ins><span class="cx">         // TODO: get locale from DB
</span><span class="cx"> 
</span><span class="cx">         if (empty($locale))
</span><span class="lines">@@ -90,13 +90,13 @@
</span><span class="cx">         global $l10n;
</span><span class="cx"> 
</span><span class="cx">         if ( !is_readable( $mofile ) ) return;
</span><del>-        
</del><ins>+
</ins><span class="cx">         $mo = new MO();
</span><span class="cx">         $mo-&gt;import_from_file( $mofile );
</span><span class="cx"> 
</span><span class="cx">         if ( isset( $l10n [$domain] ) )
</span><span class="cx">                 $mo-&gt;merge_with( $l10n[$domain] );
</span><del>-                
</del><ins>+
</ins><span class="cx">         $l10n[$domain] = &amp;$mo;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkgpincludespluginphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/plugin.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/plugin.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/plugin.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -9,20 +9,20 @@
</span><span class="cx">          * @var $id unique id of the plugin. It will be used as a plugin slug in the plugin repository
</span><span class="cx">          */
</span><span class="cx">         var $id;
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * If you override the constructor, always call the parent one.
</span><span class="cx">          */
</span><span class="cx">         function __construct() {
</span><span class="cx">                 $this-&gt;_object_type = 'plugin_'.$this-&gt;id;
</span><span class="cx">         }
</span><del>-        
-        
</del><ins>+
+
</ins><span class="cx">         /**
</span><span class="cx">          * Retrieve an option, specific to your plugin.
</span><span class="cx">          *
</span><span class="cx">          * You don't have to prefix the key or to tie its name to your plugin.
</span><del>-         *         
</del><ins>+         *
</ins><span class="cx">          * @param string $key
</span><span class="cx">          * @return mixed the value of the option, or null if it wasn't found
</span><span class="cx">          */
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return $r;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Update an option, specific to your plugin.
</span><span class="cx">          *
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">         function update_option( $key, $value ) {
</span><span class="cx">                 return gp_update_meta( 0, $key, $value, $this-&gt;_object_type, true );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Adds a method in this class as an action with the same name.
</span><span class="cx">          *
</span><span class="lines">@@ -89,11 +89,11 @@
</span><span class="cx">                 $args = array_merge( $defaults, $args );
</span><span class="cx">                 return $wp_function( $args['tag'], array( &amp;$this, $args['tag'] ), $args['priority'], $args['args'] );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function remove_action( $action_name, $args = array() ) {
</span><span class="cx">                 return $this-&gt;remove_filter( $action_name, $args );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function remove_filter( $filter_name, $args = array() ) {
</span><span class="cx">                 return $this-&gt;_call_wp_plugin_api_function( 'remove_filter', $filter_name, $args );
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkgpincludesrouterphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/router.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/router.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/router.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -3,14 +3,14 @@
</span><span class="cx"> class GP_Router {
</span><span class="cx"> 
</span><span class="cx">         var $api_prefix = 'api';
</span><del>-        
</del><ins>+
</ins><span class="cx">         function __construct( $urls = null ) {
</span><span class="cx">                 if ( is_null( $urls ) )
</span><span class="cx">                         $this-&gt;urls = $this-&gt;default_routes();
</span><span class="cx">                 else
</span><span class="cx">                         $this-&gt;urls = $urls;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">         * Returns the current request URI path, relative to
</span><span class="cx">         * the application URI and without the query string
</span><span class="lines">@@ -21,15 +21,15 @@
</span><span class="cx">                         return urldecode( $match[1] );
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function request_method() {
</span><span class="cx">                 return gp_array_get( $_SERVER, 'REQUEST_METHOD', 'GET' );
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         function add( $re, $function, $method = 'get' ) {
</span><span class="cx">                 $this-&gt;urls[&quot;$method:$re&quot;] = $function;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function default_routes() {
</span><span class="cx">                 $dir = '([^_/][^/]*)';
</span><span class="cx">                 $path = '(.+?)';
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">                         'get:/login' =&gt; array('GP_Route_Login', 'login_get'),
</span><span class="cx">                         'post:/login' =&gt; array('GP_Route_Login', 'login_post'),
</span><span class="cx">                         'get:/logout' =&gt; array('GP_Route_Login', 'logout'),
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         'get:/profile' =&gt; array('GP_Route_Profile', 'profile_get'),
</span><span class="cx">                         'post:/profile' =&gt; array('GP_Route_Profile', 'profile_post'),
</span><span class="cx"> 
</span><span class="lines">@@ -58,16 +58,16 @@
</span><span class="cx">                         &quot;post:/$project/-delete&quot; =&gt; array('GP_Route_Project', 'delete_post'),
</span><span class="cx"> 
</span><span class="cx">                         &quot;post:/$project/-personal&quot; =&gt; array('GP_Route_Project', 'personal_options_post'),
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &quot;get:/$project/-permissions&quot; =&gt; array('GP_Route_Project', 'permissions_get'),
</span><span class="cx">                         &quot;post:/$project/-permissions&quot; =&gt; array('GP_Route_Project', 'permissions_post'),
</span><span class="cx">                         &quot;get:/$project/-permissions/-delete/$dir&quot; =&gt; array('GP_Route_Project', 'permissions_delete'),
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &quot;get:/$project/-mass-create-sets&quot; =&gt; array('GP_Route_Project', 'mass_create_sets_get'),
</span><span class="cx">                         &quot;post:/$project/-mass-create-sets&quot; =&gt; array('GP_Route_Project', 'mass_create_sets_post'),
</span><span class="cx">                         &quot;post:/$project/-mass-create-sets/preview&quot; =&gt; array('GP_Route_Project', 'mass_create_sets_preview_post'),
</span><del>-                        
</del><span class="cx"> 
</span><ins>+
</ins><span class="cx">                         &quot;get:/$projects&quot; =&gt; array('GP_Route_Project', 'index'),
</span><span class="cx">                         &quot;get:/$projects/-new&quot; =&gt; array('GP_Route_Project', 'new_get'),
</span><span class="cx">                         &quot;post:/$projects/-new&quot; =&gt; array('GP_Route_Project', 'new_post'),
</span><span class="lines">@@ -89,12 +89,12 @@
</span><span class="cx">                         &quot;get:/sets/$id&quot; =&gt; array('GP_Route_Translation_Set', 'single'),
</span><span class="cx">                         &quot;get:/sets/$id/-edit&quot; =&gt; array('GP_Route_Translation_Set', 'edit_get'),
</span><span class="cx">                         &quot;post:/sets/$id/-edit&quot; =&gt; array('GP_Route_Translation_Set', 'edit_post'),
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &quot;post:/originals/$id/set_priority&quot; =&gt; array('GP_Route_Original', 'set_priority'),
</span><span class="cx">                 ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        
</del><ins>+
</ins><span class="cx">         function route() {
</span><span class="cx">                 $real_request_uri = $this-&gt;request_uri();
</span><span class="cx">                 $api_request_uri = $real_request_uri;
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">                         foreach( $this-&gt;urls as $re =&gt; $func ) {
</span><span class="cx">                                 foreach (array('get', 'post', 'head', 'put', 'delete') as $http_method) {
</span><span class="cx">                                         if ( gp_startswith( $re, $http_method.':' ) ) {
</span><del>-                                                
</del><ins>+
</ins><span class="cx">                                                 if ( $http_method != $request_method ) continue;
</span><span class="cx">                                                 $re = substr( $re, strlen( $http_method . ':' ));
</span><span class="cx">                                                 break;
</span></span></pre></div>
<a id="trunkgpincludesroutesloginphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/routes/login.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/routes/login.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/routes/login.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -7,18 +7,18 @@
</span><span class="cx">                 }
</span><span class="cx">                 gp_tmpl_load( 'login', array() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function login_post() {
</span><span class="cx">                 global $wp_users_object, $wp_auth_object;
</span><del>-                                
</del><ins>+
</ins><span class="cx">                 $user = GP::$user-&gt;by_login( $_POST['user_login'] );
</span><del>-                                
</del><ins>+
</ins><span class="cx">                 if ( !$user || is_wp_error($user) ) {
</span><span class="cx">                         $this-&gt;errors[] = __(&quot;Invalid username!&quot;);
</span><span class="cx">                         $this-&gt;redirect(  gp_url_login() );
</span><span class="cx">                         return;
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 if ( $user-&gt;login( gp_post( 'user_pass' ) ) ) {
</span><span class="cx">                         if ( gp_post( 'redirect_to' ) ) {
</span><span class="cx">                                 $this-&gt;redirect( gp_post( 'redirect_to' ) );
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">                         $this-&gt;redirect(  gp_url_login() );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function logout() {
</span><span class="cx">                 GP::$user-&gt;logout();
</span><span class="cx">                 $this-&gt;redirect( gp_url( '/' ) );
</span></span></pre></div>
<a id="trunkgpincludesroutesprojectphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/routes/project.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/routes/project.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/routes/project.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,12 +1,12 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> class GP_Route_Project extends GP_Route_Main {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function index() {
</span><span class="cx">                 $title = __('Projects');
</span><span class="cx">                 $projects = GP::$project-&gt;top_level();
</span><span class="cx">                 $this-&gt;tmpl( 'projects', get_defined_vars() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function single( $project_path ) {
</span><span class="cx">                 $project = GP::$project-&gt;by_path( $project_path );
</span><span class="cx">                 if ( !$project ) gp_tmpl_404();
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">                 $can_write = $this-&gt;can( 'write', 'project', $project-&gt;id );
</span><span class="cx">                 $this-&gt;tmpl( 'project', get_defined_vars() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function personal_options_post( $project_path ) {
</span><span class="cx">                 $project = GP::$project-&gt;by_path( $project_path );
</span><span class="cx">                 if ( !$project ) gp_tmpl_404();
</span><span class="lines">@@ -71,10 +71,10 @@
</span><span class="cx">                 if ( !$translations ) {
</span><span class="cx">                         $this-&gt;redirect_with_error( __('Couldn&amp;#8217;t load translations from file!') );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 list( $originals_added, $originals_existing ) = GP::$original-&gt;import_for_project( $project, $translations );
</span><span class="cx">                 $this-&gt;notices[] = sprintf(__(&quot;%s new strings were added, %s existing were updated.&quot;), $originals_added, $originals_existing );
</span><del>-                                
</del><ins>+
</ins><span class="cx">                 $this-&gt;redirect( gp_url_project( $project, 'import-originals' ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">                 if ( $this-&gt;cannot_and_redirect( 'write', 'project', $project-&gt;id ) ) return;
</span><span class="cx">                 gp_tmpl_load( 'project-edit', get_defined_vars() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function edit_post( $project_path ) {
</span><span class="cx">                 $project = GP::$project-&gt;by_path( $project_path );
</span><span class="cx">                 if ( !$project ) gp_tmpl_404();
</span><span class="lines">@@ -117,14 +117,14 @@
</span><span class="cx">                 $this-&gt;redirect( gp_url_project( '' ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        
</del><ins>+
</ins><span class="cx">         function new_get() {
</span><span class="cx">                 $project = new GP_Project();
</span><span class="cx">                 $project-&gt;parent_project_id = gp_get( 'parent_project_id', null );
</span><span class="cx">                 if ( $this-&gt;cannot_and_redirect( 'write', 'project', $project-&gt;parent_project_id ) ) return;
</span><span class="cx">                 gp_tmpl_load( 'project-new', get_defined_vars() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function new_post() {
</span><span class="cx">                 $post = gp_post( 'project' );
</span><span class="cx">                 $parent_project_id = gp_array_get( $post, 'parent_project_id', null );
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx">                         $this-&gt;redirect( gp_url_project( $project ) );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function permissions_get( $project_path ) {
</span><span class="cx">                 $project = GP::$project-&gt;by_path( $project_path );
</span><span class="cx">                 if ( !$project ) gp_tmpl_404();
</span><span class="lines">@@ -190,7 +190,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 $this-&gt;redirect( gp_url_current() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function permissions_delete( $project_path, $permission_id ) {
</span><span class="cx">                 $project = GP::$project-&gt;by_path( $project_path );
</span><span class="cx">                 if ( !$project ) gp_tmpl_404();
</span><span class="lines">@@ -249,5 +249,5 @@
</span><span class="cx">                 }
</span><span class="cx">                 header('Content-Type: application/json');
</span><span class="cx">                 echo json_encode( $project-&gt;set_difference_from( $other_project ) );
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkgpincludesroutestranslationsetphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/routes/translation-set.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/routes/translation-set.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/routes/translation-set.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx">                 if ( $this-&gt;cannot_edit_set_and_redirect( $set ) ) return;
</span><span class="cx">                 $this-&gt;tmpl( 'translation-set-new', get_defined_vars() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function new_post() {
</span><span class="cx">                 $new_set = new GP_Translation_Set( gp_post( 'set', array() ) );
</span><span class="cx">                 if ( $this-&gt;cannot_edit_set_and_redirect( $new_set ) ) return;
</span><span class="lines">@@ -22,14 +22,14 @@
</span><span class="cx">                         $this-&gt;redirect( gp_url_project_locale( GP::$project-&gt;get( $created_set-&gt;project_id ), $created_set-&gt;locale, $created_set-&gt;slug ) );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function single( $set_id ) {
</span><span class="cx">                 $items = $this-&gt;get_set_project_and_locale_from_set_id_or_404( $set_id );
</span><span class="cx">                 if ( !$items) return;
</span><span class="cx">                 list( $set, $project, $locale ) = $items;
</span><span class="cx">                 $this-&gt;redirect( gp_url_project( $project, array( $set-&gt;locale, $set-&gt;slug ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function edit_get( $set_id ) {
</span><span class="cx">                 $items = $this-&gt;get_set_project_and_locale_from_set_id_or_404( $set_id );
</span><span class="cx">                 if ( !$items ) return;
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">                 $url = gp_url_project( $project, gp_url_join( $set-&gt;locale, $set-&gt;slug ) );
</span><span class="cx">                 $this-&gt;tmpl( 'translation-set-edit', get_defined_vars() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function edit_post( $set_id ) {
</span><span class="cx">                 $items = $this-&gt;get_set_project_and_locale_from_set_id_or_404( $set_id );
</span><span class="cx">                 if ( !$items ) return;
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">         private function cannot_edit_set_and_redirect( $set ) {
</span><span class="cx">                 return $this-&gt;cannot_and_redirect( 'write', 'project', $set-&gt;project_id );
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         private function get_set_project_and_locale_from_set_id_or_404( $set_id ) {
</span><span class="cx">                 $set = GP::$translation_set-&gt;get( $set_id );
</span><span class="cx">                 if ( !$set ) {
</span></span></pre></div>
<a id="trunkgpincludesroutestranslationphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/routes/translation.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/routes/translation.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/routes/translation.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -36,10 +36,10 @@
</span><span class="cx"> 
</span><span class="cx">                 $translations_added = $translation_set-&gt;import( $translations );
</span><span class="cx">                 $this-&gt;notices[] = sprintf(__(&quot;%s translations were added&quot;), $translations_added );
</span><del>-                                
-                $this-&gt;redirect( gp_url_project( $project, gp_url_join( $locale-&gt;slug, $translation_set-&gt;slug ) ) );                
</del><ins>+
+                $this-&gt;redirect( gp_url_project( $project, gp_url_join( $locale-&gt;slug, $translation_set-&gt;slug ) ) );
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function export_translations_get( $project_path, $locale_slug, $translation_set_slug ) {
</span><span class="cx">                 $project = GP::$project-&gt;by_path( $project_path );
</span><span class="cx">                 $locale = GP_Locales::by_slug( $locale_slug );
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">                 $export_locale = apply_filters( 'export_locale', $locale-&gt;slug, $locale );
</span><span class="cx">                 $filename = sprintf( '%s-%s.'.$format-&gt;extension, str_replace( '/', '-', $project-&gt;path ), $export_locale );
</span><span class="cx">                 $entries = GP::$translation-&gt;for_export( $project, $translation_set, gp_get( 'filters' ) );
</span><del>-                $this-&gt;headers_for_download( $filename );                
</del><ins>+                $this-&gt;headers_for_download( $filename );
</ins><span class="cx">                 echo $format-&gt;print_exported_file( $project, $locale, $translation_set, $entries );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $translations = GP::$translation-&gt;for_translation( $project, $translation_set, $page, $filters, $sort );
</span><span class="cx">                 $total_translations_count = GP::$translation-&gt;found_rows;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $can_edit = GP::$user-&gt;logged_in();
</span><span class="cx">                 $can_write = $this-&gt;can( 'write', 'project', $project-&gt;id );
</span><span class="cx">                 $can_approve = $this-&gt;can( 'approve', 'translation-set', $translation_set-&gt;id );
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx">                 $locale = GP_Locales::by_slug( $locale_slug );
</span><span class="cx">                 $translation_set = GP::$translation_set-&gt;by_project_id_slug_and_locale( $project-&gt;id, $translation_set_slug, $locale_slug );
</span><span class="cx">                 if ( !$project || !$locale || !$translation_set ) gp_tmpl_404();
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $output = array();
</span><span class="cx">                 foreach( gp_post( 'translation', array() ) as $original_id =&gt; $translations) {
</span><span class="cx">                     $data = compact('original_id');
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 echo json_encode( $output );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function bulk_post( $project_path, $locale_slug, $translation_set_slug ) {
</span><span class="cx"> 
</span><span class="cx">                 $project = GP::$project-&gt;by_path( $project_path );
</span><span class="lines">@@ -152,18 +152,18 @@
</span><span class="cx">                 } else {
</span><span class="cx">                         $this-&gt;errors[] = 'No translations were supplied.';
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 wp_cache_delete( $translation_set-&gt;id, 'translation_set_status_breakdown' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // hack, until we make clean_url() to allow [ and ]
</span><span class="cx">                 $bulk['redirect_to'] = str_replace( array('[', ']'), array_map('urlencode', array('[', ']')), $bulk['redirect_to']);
</span><span class="cx">                 $this-&gt;redirect( $bulk['redirect_to'] );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function _bulk_approve( $project, $locale, $translation_set, $bulk ) {
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $action = $bulk['action'];
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $ok = $error = 0;
</span><span class="cx">                 $new_status = 'approve' == $action? 'current' : 'rejected';
</span><span class="cx">                 foreach( $bulk['row-ids'] as $row_id ) {
</span><span class="lines">@@ -205,13 +205,13 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function _bulk_google_translate( $project, $locale, $translation_set, $bulk ) {
</span><span class="cx">                 $google_errors = 0;
</span><span class="cx">                 $insert_errors = 0;
</span><span class="cx">                 $ok = 0;
</span><span class="cx">                 $skipped = 0;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $singulars = array();
</span><span class="cx">                 $original_ids = array();
</span><span class="cx">                 foreach( $bulk['row-ids'] as $row_id ) {
</span><span class="lines">@@ -261,27 +261,27 @@
</span><span class="cx">                         $this-&gt;notices[] = sprintf( __('%d fuzzy translation from Google Translate were added.' ), $ok );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-                        
</del><ins>+
</ins><span class="cx">         function discard_warning( $project_path, $locale_slug, $translation_set_slug ) {
</span><span class="cx">                 return $this-&gt;edit_single_translation( $project_path, $locale_slug, $translation_set_slug, array( $this, 'discard_warning_edit_function' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function set_status( $project_path, $locale_slug, $translation_set_slug ) {
</span><span class="cx">                 return $this-&gt;edit_single_translation( $project_path, $locale_slug, $translation_set_slug, array( $this, 'set_status_edit_function' ) );
</span><span class="cx">         }
</span><del>-                        
</del><ins>+
</ins><span class="cx">         private function edit_single_translation( $project_path, $locale_slug, $translation_set_slug, $edit_function ) {
</span><span class="cx">                 $project = GP::$project-&gt;by_path( $project_path );
</span><span class="cx">                 $locale = GP_Locales::by_slug( $locale_slug );
</span><span class="cx">                 $translation_set = GP::$translation_set-&gt;by_project_id_slug_and_locale( $project-&gt;id, $translation_set_slug, $locale_slug );
</span><span class="cx">                 if ( !$project || !$locale || !$translation_set ) gp_tmpl_404();
</span><span class="cx">                 $this-&gt;can_or_forbidden( 'approve', 'translation-set', $translation_set-&gt;id );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $translation = GP::$translation-&gt;get( gp_post( 'translation_id' ) );
</span><span class="cx">                 if ( !$translation ) {
</span><span class="cx">                         $this-&gt;die_with_error( 'Translation doesn&amp;#8217;t exist!' );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 call_user_func( $edit_function, $project, $locale, $translation_set, $translation );
</span><span class="cx"> 
</span><span class="cx">                 $translations = GP::$translation-&gt;for_translation( $project, $translation_set, 'no-limit', array('translation_id' =&gt; $translation-&gt;id, 'status' =&gt; 'either'), array() );
</span><span class="lines">@@ -293,9 +293,9 @@
</span><span class="cx">                         $this-&gt;tmpl( 'translation-row', get_defined_vars() );
</span><span class="cx">                 } else {
</span><span class="cx">                         $this-&gt;die_with_error( 'Error in retrieving translation!' );
</span><del>-                }                
</del><ins>+                }
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         private function discard_warning_edit_function( $project, $locale, $translation_set, $translation ) {
</span><span class="cx">                 if ( !isset( $translation-&gt;warnings[gp_post( 'index' )][gp_post( 'key' )] ) ) {
</span><span class="cx">                         $this-&gt;die_with_error( 'The warning doesn&amp;#8217;exist!' );
</span><span class="lines">@@ -308,7 +308,7 @@
</span><span class="cx">                 if ( !$res ) {
</span><span class="cx">                         $this-&gt;die_with_error( 'Error in saving the translation!' );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         private function set_status_edit_function( $project, $locale, $translation_set, $translation ) {
</span><span class="lines">@@ -319,5 +319,5 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-        
</del><ins>+
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkgpincludesschemaphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/schema.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/schema.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/schema.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx">                 KEY `user_id` (`user_id`),
</span><span class="cx">                 KEY `meta_key` (`meta_key`)
</span><span class="cx">         );&quot;;
</span><del>-        
</del><ins>+
</ins><span class="cx">         // meta
</span><span class="cx">         $gp_schema['meta'] = &quot;CREATE TABLE IF NOT EXISTS `$gpdb-&gt;meta` (
</span><span class="cx">                 `meta_id` bigint(20) NOT NULL auto_increment,
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx">                 KEY `object_type__meta_key` (`object_type`, `meta_key`),
</span><span class="cx">                 KEY `object_type__object_id__meta_key` (`object_type`, `object_id`, `meta_key`)
</span><span class="cx">         );&quot;;
</span><del>-        
</del><ins>+
</ins><span class="cx">         // permissions
</span><span class="cx">         $gp_schema['permissions'] = &quot;CREATE TABLE IF NOT EXISTS `$gpdb-&gt;permissions` (
</span><span class="cx">                 `id` INT(10) NOT NULL AUTO_INCREMENT,
</span><span class="lines">@@ -166,12 +166,12 @@
</span><span class="cx">                 if (!preg_match('@^\s*CREATE\s+TABLE\s+@im', $_sql)) {
</span><span class="cx">                         continue;
</span><span class="cx">                 }
</span><del>-        
</del><ins>+
</ins><span class="cx">                 // Skip if the table's database doesn't support collation
</span><span class="cx">                 if (!$gpdb-&gt;has_cap('collation', $gpdb-&gt;$_table_name)) {
</span><span class="cx">                         continue;
</span><span class="cx">                 }
</span><del>-        
</del><ins>+
</ins><span class="cx">                 // Find out if the table has a custom database set
</span><span class="cx">                 if (
</span><span class="cx">                         isset($gpdb-&gt;db_tables) &amp;&amp;
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx">                         // Set the default global database
</span><span class="cx">                         $_database = 'dbh_global';
</span><span class="cx">                 }
</span><del>-        
</del><ins>+
</ins><span class="cx">                 // Make sure the database exists
</span><span class="cx">                 if (
</span><span class="cx">                         isset($gpdb-&gt;db_servers) &amp;&amp;
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx">                         if ($_charset_collate) {
</span><span class="cx">                                 // Modify the SQL
</span><span class="cx">                                 $gp_schema[$_table_name] = str_replace(';', $_charset_collate . ';', $_sql);
</span><del>-                        }                        
</del><ins>+                        }
</ins><span class="cx">                 }
</span><span class="cx">                 unset($_database, $_charset_collate);
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkgpincludesstringsphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/strings.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/strings.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/strings.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -62,5 +62,5 @@
</span><span class="cx">         $safe_text = wp_check_invalid_utf8( $text );
</span><span class="cx">         $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES, false, true );
</span><span class="cx">         return apply_filters( 'attribute_escape', $safe_text, $text );
</span><del>-        
</del><ins>+
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkgpincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/template.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/template.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/template.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx">         if ( isset( $args['http_status'] ) )
</span><span class="cx">                 status_header( $args['http_status'] );
</span><span class="cx">         foreach( $locations as $location ) {
</span><del>-                 $file = $location . &quot;$template.php&quot;;        
</del><ins>+                 $file = $location . &quot;$template.php&quot;;
</ins><span class="cx">                 if ( is_readable( $file ) ) {
</span><span class="cx">                         extract( $args, EXTR_SKIP );
</span><span class="cx">                         include $file;
</span></span></pre></div>
<a id="trunkgpincludesthingspermissionphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/things/permission.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/things/permission.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/things/permission.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx">         var $field_names = array( 'id', 'user_id', 'action', 'object_type', 'object_id', );
</span><span class="cx">         var $non_updatable_attributes = array( 'id', );
</span><span class="cx"> 
</span><del>-        
</del><ins>+
</ins><span class="cx">         function normalize_fields( $args ) {
</span><span class="cx">                 $args = (array)$args;
</span><span class="cx">                 foreach( $this-&gt;field_names as $field_name ) {
</span></span></pre></div>
<a id="trunkgpincludesthingsprojectphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/things/project.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/things/project.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/things/project.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> class GP_Project extends GP_Thing {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $table_basename = 'projects';
</span><span class="cx">         var $field_names = array( 'id', 'name', 'slug', 'path', 'description', 'parent_project_id', 'source_url_template', 'active' );
</span><span class="cx">         var $non_updatable_attributes = array( 'id' );
</span><span class="lines">@@ -9,29 +9,29 @@
</span><span class="cx">         function restrict_fields( $project ) {
</span><span class="cx">                 $project-&gt;name_should_not_be('empty');
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         // Additional queries
</span><span class="cx"> 
</span><span class="cx">         function by_path( $path ) {
</span><span class="cx">                 return $this-&gt;one( &quot;SELECT * FROM $this-&gt;table WHERE path = '%s'&quot;, trim( $path, '/' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function sub_projects() {
</span><span class="cx">                 return $this-&gt;many( &quot;SELECT * FROM $this-&gt;table WHERE parent_project_id = %d ORDER BY active DESC, id ASC&quot;, $this-&gt;id );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function top_level() {
</span><span class="cx">                 return $this-&gt;many( &quot;SELECT * FROM $this-&gt;table WHERE parent_project_id IS NULL ORDER BY name ASC&quot; );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Triggers
</span><del>-        
</del><ins>+
</ins><span class="cx">         function after_save() {
</span><del>-                // TODO: pass the update args to after/pre_save?                
</del><ins>+                // TODO: pass the update args to after/pre_save?
</ins><span class="cx">                 // TODO: only call it if the slug or parent project were changed
</span><span class="cx">                 return !is_null( $this-&gt;update_path() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function after_create() {
</span><span class="cx">                 // TODO: pass some args to pre/after_create?
</span><span class="cx">                 if ( is_null( $this-&gt;update_path() ) ) return false;
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Helpers
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Updates this project's and its chidlren's paths, according to its current slug.
</span><span class="cx">          */
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx">                         return $res_self;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Regenrate the paths of all projects from its parents slugs
</span><span class="cx">          */
</span><span class="lines">@@ -102,14 +102,14 @@
</span><span class="cx">                         $this-&gt;regenerate_paths( $project-&gt;id );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function source_url( $file, $line ) {
</span><span class="cx">                 if ( $this-&gt;source_url_template() ) {
</span><span class="cx">                         return str_replace( array('%file%', '%line%'), array($file, $line), $this-&gt;source_url_template() );
</span><span class="cx">                 }
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function source_url_template() {
</span><span class="cx">                 if ( isset( $this-&gt;user_source_url_template ) )
</span><span class="cx">                         return $this-&gt;user_source_url_template;
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Gives an array of project objects starting from the current project
</span><span class="cx">          * then its parent, its parent and up to the root
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return array_merge( array( &amp;$this ), $path );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function set_difference_from( $other_project ) {
</span><span class="cx">                 $this_sets = (array)GP::$translation_set-&gt;by_project_id( $this-&gt;id );
</span><span class="cx">                 $other_sets = (array)GP::$translation_set-&gt;by_project_id( $other_project-&gt;id );
</span><span class="lines">@@ -160,6 +160,6 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 return compact( 'added', 'removed' );
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span><span class="cx"> GP::$project = new GP_Project();
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkgpincludesthingstranslationsetphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/things/translation-set.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/things/translation-set.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/things/translation-set.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -11,31 +11,31 @@
</span><span class="cx">                 $set-&gt;locale_should_not_be('empty');
</span><span class="cx">                 $set-&gt;project_id_should_not_be('empty');
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function name_with_locale( $separator = '&amp;rarr;') {
</span><span class="cx">                 $locale = GP_Locales::by_slug( $this-&gt;locale );
</span><span class="cx">                 $parts = array( $locale-&gt;english_name );
</span><span class="cx">                 if ( 'default' != $this-&gt;slug ) $parts[] = $this-&gt;name;
</span><span class="cx">                 return implode( '&amp;nbsp;'.$separator.'&amp;nbsp;', $parts );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function by_project_id_slug_and_locale( $project_id, $slug, $locale_slug ) {
</span><span class="cx">                 return $this-&gt;one( &quot;
</span><span class="cx">                     SELECT * FROM $this-&gt;table
</span><span class="cx">                     WHERE slug = '%s' AND project_id= %d AND locale = %s&quot;, $slug, $project_id, $locale_slug );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function by_project_id( $project_id ) {
</span><span class="cx">                 return $this-&gt;many( &quot;
</span><span class="cx">                     SELECT * FROM $this-&gt;table
</span><span class="cx">                     WHERE project_id = %d ORDER BY name ASC&quot;, $project_id );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function import( $translations ) {
</span><span class="cx">                 @ini_set('memory_limit', '256M');
</span><span class="cx">                 if ( !isset( $this-&gt;project ) || !$this-&gt;project ) $this-&gt;project = GP::$project-&gt;get( $this-&gt;project_id );
</span><span class="cx">                 $locale = GP_Locales::by_slug( $this-&gt;locale );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $current_translations_list = GP::$translation-&gt;for_translation( $this-&gt;project, $this, 'no-limit', array('status' =&gt; 'current', 'translated' =&gt; 'yes') );
</span><span class="cx">                 $current_translations = new Translations();
</span><span class="cx">                 foreach( $current_translations_list as $entry ) {
</span><span class="lines">@@ -46,9 +46,9 @@
</span><span class="cx">                 foreach( $translations-&gt;entries as $entry ) {
</span><span class="cx">                         if ( empty( $entry-&gt;translations ) ) continue;
</span><span class="cx">                         if ( in_array( 'fuzzy', $entry-&gt;flags ) ) continue;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         $create = false;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         if ( $translated = $current_translations-&gt;translate_entry( $entry ) ) {
</span><span class="cx">                                 // we have the same string translated
</span><span class="cx">                                 // create a new one if they don't match
</span><span class="lines">@@ -74,17 +74,17 @@
</span><span class="cx">                 wp_cache_delete( $this-&gt;id, 'translation_set_status_breakdown' );
</span><span class="cx">                 return $translations_added;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function waiting_count() {
</span><span class="cx">                 if ( !isset( $this-&gt;waiting_count ) ) $this-&gt;update_status_breakdown();
</span><span class="cx">                 return $this-&gt;waiting_count;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function untranslated_count() {
</span><span class="cx">                 if ( !isset( $this-&gt;untranslated_count ) ) $this-&gt;update_status_breakdown();
</span><span class="cx">                 return $this-&gt;untranslated_count;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function current_count() {
</span><span class="cx">                 if ( !isset( $this-&gt;current_count ) ) $this-&gt;update_status_breakdown();
</span><span class="cx">                 return $this-&gt;current_count;
</span></span></pre></div>
<a id="trunkgpincludesthingstranslationphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/things/translation.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/things/translation.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/things/translation.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">                                 'how' =&gt; 'desc'
</span><span class="cx">                         );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $sort_by = gp_array_get( $sort_bys, gp_array_get( $sort, 'by' ),  gp_array_get( $sort_bys, $default_sort['by'] ) );
</span><span class="cx">                 $sort_hows = array('asc' =&gt; 'ASC', 'desc' =&gt; 'DESC', );
</span><span class="cx">                 $sort_how = gp_array_get( $sort_hows, gp_array_get( $sort, 'how' ), gp_array_get( $sort_hows, $default_sort['how'] ) );
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">                         $join_where[] = 't.status != &quot;rejected&quot;';
</span><span class="cx">                         $statuses = array_filter( $statuses, lambda( '$x', '$x != &quot;untranslated&quot;' ) );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $statuses = array_filter( $statuses, lambda( '$s', 'in_array($s, $statuses)', array( 'statuses' =&gt; $this-&gt;get_static( 'statuses' ) ) ) );
</span><span class="cx">                 if ( $statuses ) {
</span><span class="cx">                         $statuses_where = array();
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx">                 if ( $where ) {
</span><span class="cx">                         $where = 'AND '.$where;
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $join_where = implode( ' AND ', $join_where );
</span><span class="cx">                 if ( $join_where ) {
</span><span class="cx">                         $join_where = 'AND '.$join_where;
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx">                 $sql_sort = sprintf( $sort_by, $sort_how );
</span><span class="cx"> 
</span><span class="cx">                 $limit = $this-&gt;sql_limit_for_paging( $page, $this-&gt;per_page );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $sql_for_translations = &quot;
</span><span class="cx">                         SELECT SQL_CALC_FOUND_ROWS t.*, o.*, t.id as id, o.id as original_id, t.status as translation_status, o.status as original_status, t.date_added as translation_added, o.date_added as original_added
</span><span class="cx">                     FROM $gpdb-&gt;originals as o
</span></span></pre></div>
<a id="trunkgpincludesthingsuserphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/things/user.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/things/user.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/things/user.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> class GP_User extends GP_Thing {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $table_basename = 'users';
</span><span class="cx">         var $field_names = array( 'id', 'user_login', 'user_pass', 'user_nicename', 'user_email', 'user_url', 'user_registered', 'user_status', 'display_name' );
</span><span class="cx">         var $non_updatable_attributes = array( 'ID' );
</span><del>-        
</del><ins>+
</ins><span class="cx">         function create( $args ) {
</span><span class="cx">                 global $wp_users_object;
</span><span class="cx">                 if ( isset( $args['id'] ) ) {
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx">                 $user = $wp_users_object-&gt;new_user( $args );
</span><span class="cx">                 return $this-&gt;coerce( $user );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function normalize_fields( $args ) {
</span><span class="cx">                 $args = (array)$args;
</span><span class="cx">                 if ( isset( $args['ID'] ) ) {
</span><span class="lines">@@ -23,25 +23,25 @@
</span><span class="cx">                 }
</span><span class="cx">                 return $args;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function get( $user_or_id ) {
</span><span class="cx">                 global $wp_users_object;
</span><span class="cx">                 if ( is_object( $user_or_id ) ) $user_or_id = $user_or_id-&gt;id;
</span><span class="cx">                 return $this-&gt;coerce( $wp_users_object-&gt;get_user( $user_or_id ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function by_login( $login ) {
</span><span class="cx">                 global $wp_users_object;
</span><span class="cx">                 $user = $wp_users_object-&gt;get_user( $login, array( 'by' =&gt; 'login' ) );
</span><span class="cx">                 return $this-&gt;coerce( $user );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function logged_in() {
</span><span class="cx">                 global $wp_auth_object;
</span><span class="cx">                 $coerced = $this-&gt;coerce( $wp_auth_object-&gt;get_current_user() );
</span><span class="cx">                 return ( $coerced &amp;&amp; $coerced-&gt;id );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function current() {
</span><span class="cx">                 global $wp_auth_object;
</span><span class="cx">                 if ( $this-&gt;logged_in() )
</span><span class="lines">@@ -49,19 +49,19 @@
</span><span class="cx">                 else
</span><span class="cx">                         return new GP_User( array( 'id' =&gt; 0, ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function logout() {
</span><span class="cx">                 global $wp_auth_object;
</span><span class="cx">                 $wp_auth_object-&gt;clear_auth_cookie();
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Determines whether the user is an admin
</span><span class="cx">          */
</span><span class="cx">         function admin() {
</span><span class="cx">                 return $this-&gt;can( 'admin' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Set $this as the current user if $password patches this user's password
</span><span class="cx">          */
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">                 $this-&gt;set_as_current();
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Makes the user the current user of this session. Sets the cookies and such.
</span><span class="cx">          */
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">                 $wp_auth_object-&gt;set_auth_cookie( $this-&gt;id );
</span><span class="cx">                 $wp_auth_object-&gt;set_auth_cookie( $this-&gt;id, 0, 0, 'logged_in');
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Determines whether the user can do $action on the instance of $object_type with id $object_id.
</span><span class="cx">          *
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">                         GP::$permission-&gt;find_one( array_merge( $args, array( 'object_id' =&gt; null ) ) );
</span><span class="cx">                 return apply_filters( 'can_user', $verdict, $filter_args );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function get_meta( $key ) {
</span><span class="cx">                 global $wp_users_object;
</span><span class="cx">                 if ( !$user = $wp_users_object-&gt;get_user( $this-&gt;id ) ) {
</span><span class="lines">@@ -122,16 +122,16 @@
</span><span class="cx">                 }
</span><span class="cx">                 return $user-&gt;$key;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function set_meta( $key, $value ) {
</span><span class="cx">                 return gp_update_meta( $this-&gt;id, $key, $value, 'user' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function delete_meta( $key ) {
</span><span class="cx">                 return gp_delete_meta( $this-&gt;id, $key, '', 'user' );
</span><span class="cx">         }
</span><del>-        
-        
</del><ins>+
+
</ins><span class="cx">         function reintialize_wp_users_object() {
</span><span class="cx">                 global $gpdb, $wp_auth_object, $wp_users_object;
</span><span class="cx">                 $wp_users_object = new WP_Users( $gpdb );
</span></span></pre></div>
<a id="trunkgpincludesthingsvalidatorpermissionphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/things/validator-permission.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/things/validator-permission.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/things/validator-permission.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx">                 $permission-&gt;action_should_not_be('empty');
</span><span class="cx">                 $permission-&gt;set_slug_should_not_be('empty');
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function set_fields( $db_object ) {
</span><span class="cx">                 parent::set_fields( $db_object );
</span><span class="cx">                 if ( $this-&gt;object_id ) {
</span><span class="lines">@@ -33,15 +33,15 @@
</span><span class="cx">                 $args = parent::prepare_fields_for_save( $args );
</span><span class="cx">                 return $args;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function project_id_locale_slug_set_slug( $object_id ) {
</span><span class="cx">                 return explode( '|', $object_id );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function object_id( $project_id, $locale_slug, $set_slug = 'default' ) {
</span><span class="cx">                 return implode( '|', array( $project_id, $locale_slug, $set_slug ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function by_project_id( $project_id ) {
</span><span class="cx">                 $project_id = (int)$project_id;
</span><span class="cx">                 return $this-&gt;find_many( &quot;object_id LIKE '$project_id|%'&quot; );
</span></span></pre></div>
<a id="trunkgpincludesvalidationphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/validation.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/validation.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-includes/validation.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,21 +1,21 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><span class="cx"> class GP_Validation_Rules {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $rules = array();
</span><span class="cx">         var $errors = array();
</span><del>-        
</del><ins>+
</ins><span class="cx">         static $positive_suffices = array(
</span><span class="cx">                 'should_be', 'should', 'can', 'can_be',
</span><span class="cx">         );
</span><span class="cx">         static $negative_suffices = array(
</span><span class="cx">                 'should_not_be', 'should_not', 'cant', 'cant_be',
</span><span class="cx">         );
</span><del>-        
</del><ins>+
</ins><span class="cx">         function __construct( $field_names ) {
</span><span class="cx">                 $this-&gt;field_names = $field_names;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function __call( $name, $args ) {
</span><span class="cx">                 foreach( array( 'positive', 'negative' ) as $kind ) {
</span><span class="cx">                         $suffices = &quot;{$kind}_suffices&quot;;
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 trigger_error(sprintf('Call to undefined function: %s::%s().', get_class($this), $name), E_USER_ERROR);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function run( $thing ) {
</span><span class="cx">                 $this-&gt;errors = array();
</span><span class="cx">                 $verdict = true;
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return $verdict;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function run_on_single_field( $field, $value ) {
</span><span class="cx">                 if ( !isset( $this-&gt;rules[$field] ) || !is_array( $this-&gt;rules[$field] ) ) {
</span><span class="cx">                         // no rules means always valid
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return $verdict;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function construct_error_message( $rule, $value ) {
</span><span class="cx">                 // TODO: better error messages, should include info from callback
</span><span class="cx">                 return sprintf( __('The field &lt;strong&gt;%s&lt;/strong&gt; has invalid value!'), $rule['field'], $value );
</span><span class="lines">@@ -86,16 +86,16 @@
</span><span class="cx"> 
</span><span class="cx"> class GP_Validators {
</span><span class="cx">         static $callbacks = array();
</span><del>-        
</del><ins>+
</ins><span class="cx">         static function register( $key, $callback, $negative_callback = null ) {
</span><del>-                // TODO: add data for easier generation of error messages                
</del><ins>+                // TODO: add data for easier generation of error messages
</ins><span class="cx">                 self::$callbacks[$key] = array( 'positive' =&gt; $callback, 'negative' =&gt; $negative_callback );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         static function unregister( $key ) {
</span><span class="cx">                 unset( self::$callbacks[$key] );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         static function get( $key ) {
</span><span class="cx">                 return gp_array_get( self::$callbacks, $key, null );
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkgploadphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-load.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-load.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-load.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -24,15 +24,15 @@
</span><span class="cx">         require_once GP_CONFIG_FILE;
</span><span class="cx">         require_once( GP_PATH . 'gp-settings.php' );
</span><span class="cx"> } elseif ( file_exists( GP_PATH . 'gp-config.php') ) {
</span><del>-        
</del><ins>+
</ins><span class="cx">         require_once( GP_PATH . 'gp-config.php');
</span><span class="cx">         require_once( GP_PATH . 'gp-settings.php' );
</span><del>-        
</del><ins>+
</ins><span class="cx"> } elseif ( file_exists( dirname( GP_PATH ) . '/gp-config.php') ) {
</span><del>-        
</del><ins>+
</ins><span class="cx">         require_once( dirname( GP_PATH ) . '/gp-config.php' );
</span><span class="cx">         require_once( GP_PATH . 'gp-settings.php' );
</span><del>-        
</del><ins>+
</ins><span class="cx"> } elseif ( !defined( 'GP_INSTALLING' ) || !GP_INSTALLING ) {
</span><span class="cx"> 
</span><span class="cx">         $install_uri = preg_replace( '|/[^/]+?$|', '/', $_SERVER['PHP_SELF'] ) . 'install.php';
</span></span></pre></div>
<a id="trunkgptemplatesheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/header.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/header.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-templates/header.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx">                         &lt;?php
</span><span class="cx">                         if (GP::$user-&gt;logged_in()):
</span><span class="cx">                                 $user = GP::$user-&gt;current();
</span><del>-                                
</del><ins>+
</ins><span class="cx">                                 printf( __('Hi, %s.'), '&lt;a href=&quot;'.gp_url( '/profile' ).'&quot;&gt;'.$user-&gt;user_login.'&lt;/a&gt;' );
</span><span class="cx">                                 ?&gt;
</span><span class="cx">                                 &lt;a href=&quot;&lt;?php echo gp_url('/logout')?&gt;&quot;&gt;&lt;?php _e('Log out'); ?&gt;&lt;/a&gt;
</span></span></pre></div>
<a id="trunkgptemplateshelperfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/helper-functions.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/helper-functions.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-templates/helper-functions.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx">                         ?&gt;
</span><span class="cx">                         &lt;div class=&quot;warning secondary&quot;&gt;
</span><span class="cx">                                 &lt;?php printf( __('&lt;strong&gt;Warning:&lt;/strong&gt; %s'), esc_html( $warning['value'] ) ); ?&gt;
</span><del>-                                
</del><ins>+
</ins><span class="cx">                                 &lt;?php if( $can_approve ): ?&gt;
</span><span class="cx">                                         &lt;a href=&quot;#&quot; class=&quot;discard-warning&quot; key=&quot;&lt;?php echo $warning['key'] ?&gt;&quot; index=&quot;&lt;?php echo $index; ?&gt;&quot;&gt;&lt;?php _e('Discard'); ?&gt;&lt;/a&gt;
</span><span class="cx">                                 &lt;?php endif; ?&gt;
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">         if ( !$project-&gt;source_url_template() ) return;
</span><span class="cx">         ?&gt;
</span><span class="cx">         &lt;?php _e('References:'); ?&gt;
</span><del>-        &lt;ul class=&quot;refs&quot;&gt;        
</del><ins>+        &lt;ul class=&quot;refs&quot;&gt;
</ins><span class="cx">                 &lt;?php
</span><span class="cx">                 foreach( $entry-&gt;references as $reference ):
</span><span class="cx">                         list( $file, $line ) = array_pad( explode( ':', $reference ), 2, 0 );
</span></span></pre></div>
<a id="trunkgptemplatesinstallphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/install.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/install.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-templates/install.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -37,5 +37,5 @@
</span><span class="cx">                 &lt;?php _e('&lt;strong&gt;The default username is &lt;code&gt;admin&lt;/code&gt;, whose password is simply &lt;code&gt;a&lt;/code&gt;.&lt;/strong&gt;'); ?&gt;
</span><span class="cx">         &lt;/p&gt;
</span><span class="cx"> &lt;?php endif; ?&gt;
</span><del>-        
</del><ins>+
</ins><span class="cx"> &lt;?php gp_tmpl_footer(); ?&gt;
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkgptemplatesloginphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/login.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/login.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-templates/login.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">         &lt;dl&gt;
</span><span class="cx">                 &lt;dt&gt;&lt;label for=&quot;user_login&quot;&gt;&lt;?php _e('Username'); ?&gt;&lt;/label&gt;&lt;/dt&gt;
</span><span class="cx">                 &lt;dd&gt;&lt;input type=&quot;text&quot; value=&quot;&quot; id=&quot;user_login&quot; name=&quot;user_login&quot; /&gt;&lt;/dd&gt;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 &lt;dt&gt;&lt;label for=&quot;user_pass&quot;&gt;&lt;?php _e('Password'); ?&gt;&lt;/label&gt;&lt;/dt&gt;
</span><span class="cx">                 &lt;dd&gt;&lt;input type=&quot;password&quot; value=&quot;&quot; id=&quot;user_pass&quot; name=&quot;user_pass&quot; /&gt;&lt;/dd&gt;
</span><span class="cx">         &lt;/dl&gt;
</span></span></pre></div>
<a id="trunkgptemplatesprojectformphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/project-form.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/project-form.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-templates/project-form.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1,13 +1,13 @@
</span><span class="cx"> &lt;dl&gt;
</span><span class="cx">         &lt;dt&gt;&lt;label for=&quot;project[name]&quot;&gt;&lt;?php _e('Name');  ?&gt;&lt;/label&gt;&lt;/dt&gt;
</span><span class="cx">         &lt;dd&gt;&lt;input type=&quot;text&quot; name=&quot;project[name]&quot; value=&quot;&lt;?php echo esc_html( $project-&gt;name ); ?&gt;&quot; id=&quot;project[name]&quot;&gt;&lt;/dd&gt;
</span><del>-        
</del><ins>+
</ins><span class="cx">         &lt;!-- TODO: make slug edit WordPress style --&gt;
</span><span class="cx">         &lt;dt&gt;&lt;label for=&quot;project[slug]&quot;&gt;&lt;?php _e('Slug');  ?&gt;&lt;/label&gt;&lt;/dt&gt;
</span><span class="cx">         &lt;dd&gt;
</span><span class="cx">                 &lt;input type=&quot;text&quot; name=&quot;project[slug]&quot; value=&quot;&lt;?php echo esc_html( $project-&gt;slug ); ?&gt;&quot; id=&quot;project[slug]&quot;&gt;
</span><span class="cx">                 &lt;small&gt;&lt;?php _e('If you leave the slug empty, it will be derived from the name.'); ?&gt;&lt;/small&gt;
</span><del>-        &lt;/dd&gt;        
</del><ins>+        &lt;/dd&gt;
</ins><span class="cx"> 
</span><span class="cx">         &lt;dt&gt;&lt;label for=&quot;project[description]&quot;&gt;&lt;?php _e('Description');  ?&gt;&lt;/label&gt; &lt;span class=&quot;ternary&quot;&gt;can include HTML&lt;/span&gt;&lt;/dt&gt;
</span><span class="cx">         &lt;dd&gt;&lt;textarea name=&quot;project[description]&quot; rows=&quot;4&quot; cols=&quot;40&quot; id=&quot;project[description]&quot;&gt;&lt;?php echo esc_html( $project-&gt;description ); ?&gt;&lt;/textarea&gt;&lt;/dd&gt;
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> 
</span><span class="cx">         &lt;dt&gt;&lt;label for=&quot;project[parent_project_id]&quot;&gt;&lt;?php _e('Parent Project');  ?&gt;&lt;/label&gt;&lt;/dt&gt;
</span><span class="cx">         &lt;dd&gt;&lt;?php echo gp_projects_dropdown( 'project[parent_project_id]', $project-&gt;parent_project_id); ?&gt;&lt;/dd&gt;
</span><del>-        
</del><ins>+
</ins><span class="cx">         &lt;dt&gt;&lt;label for=&quot;project[active]&quot;&gt;&lt;?php _e('Active'); ?&gt;&lt;/label&gt; &lt;input type=&quot;checkbox&quot; id=&quot;project[active]&quot; name=&quot;project[active]&quot; &lt;?php gp_checked( $project-&gt;active ); ?&gt; /&gt;&lt;/dt&gt;
</span><span class="cx"> &lt;/dl&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkgptemplatesprojectpermissionsphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/project-permissions.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/project-permissions.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-templates/project-permissions.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -26,11 +26,11 @@
</span><span class="cx">                         &lt;a href=&quot;&lt;?php echo gp_url_join( gp_url_current(), '-delete/'.$permission-&gt;id ); ?&gt;&quot; class=&quot;action delete&quot;&gt;&lt;?php _e('Remove'); ?&gt;&lt;/a&gt;
</span><span class="cx">                 &lt;/li&gt;
</span><span class="cx">         &lt;?php endforeach; ?&gt;
</span><del>-&lt;/ul&gt;        
</del><ins>+&lt;/ul&gt;
</ins><span class="cx">         &lt;?php endif; ?&gt;
</span><span class="cx">         &lt;?php  if ( $parent_permissions ): ?&gt;
</span><span class="cx"> &lt;h4 id=&quot;validators&quot;&gt;&lt;?php _e('Validators for parent projects'); ?&gt;&lt;/h4&gt;
</span><del>-&lt;ul class=&quot;permissions&quot;&gt;                
</del><ins>+&lt;ul class=&quot;permissions&quot;&gt;
</ins><span class="cx">                 &lt;?php foreach( $parent_permissions as $permission ): ?&gt;
</span><span class="cx">                         &lt;li&gt;
</span><span class="cx">                                 &lt;span class=&quot;permission-action&quot;&gt;&lt;?php _e('user'); ?&gt;&lt;/span&gt;
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">                                 &lt;span class=&quot;user&quot;&gt;&lt;?php gp_link_project( $permission-&gt;project, esc_html( $permission-&gt;project-&gt;name ) ); ?&gt;&lt;/span&gt;
</span><span class="cx">                         &lt;/li&gt;
</span><span class="cx">                 &lt;?php endforeach; ?&gt;
</span><del>-&lt;/ul&gt;                                
</del><ins>+&lt;/ul&gt;
</ins><span class="cx">         &lt;?php endif; ?&gt;
</span><span class="cx">         &lt;?php if ( !$permissions &amp;&amp; !$parent_permissions ): ?&gt;
</span><span class="cx">                 &lt;strong&gt;&lt;?php _e('No validators defined for this project.'); ?&gt;&lt;/strong&gt;
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">                 &lt;dd&gt;&lt;?php echo gp_locales_dropdown( 'locale' ); ?&gt;&lt;/dd&gt;
</span><span class="cx">                 &lt;dt&gt;&lt;label for=&quot;set-slug&quot;&gt;&lt;?php _e('Translation set slug:'); ?&gt;&lt;/label&gt;&lt;/dt&gt;
</span><span class="cx">                 &lt;dd&gt;&lt;input type=&quot;text&quot; name=&quot;set-slug&quot; value=&quot;default&quot; id=&quot;set-slug&quot; /&gt;&lt;/dd&gt;
</span><del>-                                
</del><ins>+
</ins><span class="cx">                 &lt;dt&gt;
</span><span class="cx">                         &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php echo esc_attr(__('Add')); ?&gt;&quot; id=&quot;submit&quot; /&gt;
</span><span class="cx">                         &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;add-validator&quot; /&gt;
</span></span></pre></div>
<a id="trunkgptemplatesprojectphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/project.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/project.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-templates/project.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">                                         &lt;p&gt;
</span><span class="cx">                                                 &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php echo esc_attr(__('Save &amp;rarr;')); ?&gt;&quot; id=&quot;save&quot; /&gt;
</span><span class="cx">                                                 &lt;a class=&quot;ternary&quot; href=&quot;#&quot; onclick=&quot;jQuery('#personal-options-toggle').click();return false;&quot;&gt;&lt;?php _e('Cancel'); ?&gt;&lt;/a&gt;
</span><del>-                                        &lt;/p&gt;                
</del><ins>+                                        &lt;/p&gt;
</ins><span class="cx">                                         &lt;/form&gt;
</span><span class="cx">                                 &lt;/div&gt;
</span><span class="cx">                         &lt;/li&gt;
</span></span></pre></div>
<a id="trunkgptemplatestranslationrowphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/translation-row.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/translation-row.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-templates/translation-row.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx">                 &lt;?php if ( $t-&gt;context ): ?&gt;
</span><span class="cx">                 &lt;span class=&quot;context bubble&quot; title=&quot;&lt;?php printf( __('Context: %s'), esc_html($t-&gt;context) ); ?&gt;&quot;&gt;&lt;?php echo esc_html($t-&gt;context); ?&gt;&lt;/span&gt;
</span><span class="cx">                 &lt;?php endif; ?&gt;
</span><del>-        
</del><ins>+
</ins><span class="cx">         &lt;/td&gt;
</span><span class="cx">         &lt;td class=&quot;translation foreign-text&quot;&gt;
</span><span class="cx">         &lt;?php
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">                         &lt;?php endif; ?&gt;
</span><span class="cx">                 &lt;?php endif; ?&gt;
</span><span class="cx">                 &lt;/div&gt;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 &lt;div class=&quot;meta&quot;&gt;
</span><span class="cx">                         &lt;h3&gt;&lt;?php _e('Meta'); ?&gt;&lt;/h3&gt;
</span><span class="cx">                         &lt;dl&gt;
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx">                                 &lt;dd&gt;
</span><span class="cx">                                         &lt;?php echo display_status( $t-&gt;translation_status ); ?&gt;
</span><span class="cx">                                         &lt;?php if ( $can_approve &amp;&amp; $t-&gt;translation_status ): ?&gt;
</span><del>-                                        
</del><ins>+
</ins><span class="cx">                                                 &lt;?php if ( $t-&gt;translation_status != 'current' ): ?&gt;
</span><span class="cx">                                                 &lt;button class=&quot;approve&quot; tabindex=&quot;-1&quot;&gt;&lt;strong&gt;+&lt;/strong&gt; Approve&lt;/button&gt;
</span><span class="cx">                                                 &lt;?php endif; ?&gt;
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx">                                 &lt;dd&gt;&lt;?php echo esc_html($t-&gt;priority); ?&gt;&lt;/dd&gt;
</span><span class="cx">                         &lt;/dl&gt;
</span><span class="cx">                         --&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;?php if ( $t-&gt;context ): ?&gt;
</span><span class="cx">                         &lt;dl&gt;
</span><span class="cx">                                 &lt;dt&gt;&lt;?php _e('Context:'); ?&gt;&lt;/dt&gt;
</span><span class="lines">@@ -131,9 +131,9 @@
</span><span class="cx">                                 &lt;dd&gt;&lt;?php echo $t-&gt;user_login; ?&gt;&lt;/dd&gt;
</span><span class="cx">                         &lt;/dl&gt;
</span><span class="cx">                         &lt;?php endif; ?&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;?php references( $project, $t ); ?&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;dl&gt;
</span><span class="cx">                             &lt;dt&gt;&lt;?php _e('Priority of the original:'); ?&gt;&lt;/dt&gt;
</span><span class="cx">                         &lt;?php if ( $can_write ): ?&gt;
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx">                             &lt;dd&gt;&lt;?php echo gp_array_get( GP::$original-&gt;get_static( 'priorities' ), $t-&gt;priority, 'unknown' ); ?&gt;&lt;/dd&gt;
</span><span class="cx">                         &lt;?php endif; ?&gt;
</span><span class="cx">                         &lt;/dl&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;?php $extra_args = $t-&gt;translation_status? array( 'filters[translation_id]' =&gt; $t-&gt;id ) : array(); ?&gt;
</span><span class="cx">                         &lt;dl&gt;
</span><span class="cx"> &lt;?php
</span></span></pre></div>
<a id="trunkgptemplatestranslationsetformphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/translation-set-form.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/translation-set-form.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-templates/translation-set-form.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -4,10 +4,10 @@
</span><span class="cx">                 &lt;?php echo gp_locales_dropdown( 'set[locale]', $set-&gt;locale ); ?&gt;
</span><span class="cx">                 &lt;a href=&quot;#&quot; id=&quot;copy&quot;&gt;&lt;?php _e('Use as name'); ?&gt;&lt;/a&gt;
</span><span class="cx">         &lt;/dd&gt;
</span><del>-        
</del><ins>+
</ins><span class="cx">         &lt;dt&gt;&lt;label for=&quot;set[name]&quot;&gt;&lt;?php _e('Name');  ?&gt;&lt;/label&gt;&lt;/dt&gt;
</span><span class="cx">         &lt;dd&gt;&lt;input type=&quot;text&quot; name=&quot;set[name]&quot; value=&quot;&lt;?php echo esc_html( $set-&gt;name ); ?&gt;&quot; id=&quot;set[name]&quot;&gt;&lt;/dd&gt;
</span><del>-        
</del><ins>+
</ins><span class="cx">         &lt;!-- TODO: make slug edit WordPress style --&gt;
</span><span class="cx">         &lt;dt&gt;&lt;label for=&quot;set[slug]&quot;&gt;&lt;?php _e('Slug');  ?&gt;&lt;/label&gt;&lt;/dt&gt;
</span><span class="cx">         &lt;dd&gt;&lt;input type=&quot;text&quot; name=&quot;set[slug]&quot; value=&quot;&lt;?php echo esc_html( $set-&gt;slug? $set-&gt;slug : 'default' ); ?&gt;&quot; id=&quot;set[slug]&quot;&gt;&lt;/dd&gt;
</span></span></pre></div>
<a id="trunkgptemplatestranslationsphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/translations.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/translations.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/gp-templates/translations.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">                                 __('Fuzzy') );
</span><span class="cx">                 $filter_links[] = gp_link_get( add_query_arg( array('filters[warnings]' =&gt; 'yes', 'filters[status]' =&gt; 'current_or_waiting', 'sort[by]' =&gt; 'translation_date_added'), $url ),
</span><span class="cx">                                 __('Warnings') );
</span><del>-        
</del><ins>+
</ins><span class="cx">         }
</span><span class="cx">         // TODO: with warnings
</span><span class="cx">         // TODO: saved searches
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">                                         'old' =&gt; __('Approved, but obsoleted by another string'),
</span><span class="cx">                                         'waiting' =&gt; __('Waiting approval'),
</span><span class="cx">                                         'rejected' =&gt; __('Rejected'),
</span><del>-                                        'untranslated' =&gt; __('Without current translation'),                                        
</del><ins>+                                        'untranslated' =&gt; __('Without current translation'),
</ins><span class="cx">                                         'either' =&gt; __('Any'),
</span><span class="cx">                                 ), gp_array_get( $filters, 'status', 'current_or_waiting_or_fuzzy_or_untranslated' ) );
</span><span class="cx">                         ?&gt;
</span><span class="lines">@@ -87,8 +87,8 @@
</span><span class="cx">                         &lt;input type=&quot;checkbox&quot; name=&quot;filters[with_comment]&quot; value=&quot;yes&quot; id=&quot;filters[with_comment][yes]&quot; &lt;?php gp_checked( 'yes' == gp_array_get( $filters, 'with_comment' ) ); ?&gt;&gt;&lt;label for='filters[with_comment][yes]'&gt;&lt;?php _e( 'With comment' ); ?&gt;&lt;/label&gt;&lt;br /&gt;
</span><span class="cx">                         &lt;input type=&quot;checkbox&quot; name=&quot;filters[with_context]&quot; value=&quot;yes&quot; id=&quot;filters[with_context][yes]&quot; &lt;?php gp_checked( 'yes' == gp_array_get( $filters, 'with_context' ) ); ?&gt;&gt;&lt;label for='filters[with_context][yes]'&gt;&lt;?php _e( 'With context' ); ?&gt;&lt;/label&gt;
</span><span class="cx">                 &lt;/dd&gt;
</span><del>-                
-                
</del><ins>+
+
</ins><span class="cx">                 &lt;dd&gt;&lt;input type=&quot;submit&quot; value=&quot;&lt;?php echo esc_attr(__('Filter')); ?&gt;&quot; name=&quot;filter&quot; /&gt;&lt;/dd&gt;
</span><span class="cx">         &lt;/dl&gt;
</span><span class="cx">         &lt;dl class=&quot;filters-expanded sort hidden clearfix&quot;&gt;
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">                                 'how' =&gt; 'desc'
</span><span class="cx">                         );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 echo gp_radio_buttons('sort[by]',
</span><span class="cx">                         array(
</span><span class="cx">                                 'original_date_added' =&gt; __('Date added (original)'),
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx">                 $format_dropdown = gp_select( 'export-format', array_combine( $format_slugs, $format_slugs ), 'po' );
</span><span class="cx">                 /* translators: 1: export 2: what to export dropdown (all/filtered) 3: export format */
</span><span class="cx">                 $footer_links[] = sprintf( __('%1$s %2$s as %3$s'), $export_link, $what_dropdown, $format_dropdown );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 echo implode( ' &amp;bull; ', apply_filters( 'translations_footer_links', $footer_links, $project, $locale, $translation_set ) );
</span><span class="cx">         ?&gt;
</span><span class="cx"> &lt;/p&gt;
</span></span></pre></div>
<a id="trunklocaleslocalesphp"></a>
<div class="modfile"><h4>Modified: trunk/locales/locales.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/locales/locales.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/locales/locales.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -1551,7 +1551,7 @@
</span><span class="cx">                 $tg-&gt;google_code = 'tg';
</span><span class="cx">                 $tg-&gt;nplurals = 2;
</span><span class="cx">                 $tg-&gt;plural_expression = 'n != 1;';
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $th = new GP_Locale();
</span><span class="cx">                 $th-&gt;english_name = 'Thai';
</span><span class="cx">                 $th-&gt;native_name = 'ไทย';
</span><span class="lines">@@ -1702,7 +1702,7 @@
</span><span class="cx">                 $yi-&gt;slug = 'yi';
</span><span class="cx">                 $yi-&gt;google_code = 'yi';
</span><span class="cx">                 $yi-&gt;rtl = true;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $yo = new GP_Locale();
</span><span class="cx">                 $yo-&gt;english_name = 'Yorùbá';
</span><span class="cx">                 $yo-&gt;native_name = 'èdè Yorùbá';
</span></span></pre></div>
<a id="trunkpomoentryphp"></a>
<div class="modfile"><h4>Modified: trunk/pomo/entry.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/pomo/entry.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/pomo/entry.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -65,14 +65,14 @@
</span><span class="cx">                 // prepend context and EOT, like in MO files
</span><span class="cx">                 return is_null($this-&gt;context)? $this-&gt;singular : $this-&gt;context.chr(4).$this-&gt;singular;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function merge_with(&amp;$other) {
</span><span class="cx">                 $this-&gt;flags = array_unique( array_merge( $this-&gt;flags, $other-&gt;flags ) );
</span><span class="cx">                 $this-&gt;references = array_unique( array_merge( $this-&gt;references, $other-&gt;references ) );
</span><span class="cx">                 if ( $this-&gt;extracted_comments != $other-&gt;extracted_comments ) {
</span><span class="cx">                         $this-&gt;extracted_comments .= $other-&gt;extracted_comments;
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkpomomophp"></a>
<div class="modfile"><h4>Modified: trunk/pomo/mo.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/pomo/mo.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/pomo/mo.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">                 fclose($fh);
</span><span class="cx">                 return $res;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function export() {
</span><span class="cx">                 $tmp_fh = fopen(&quot;php://temp&quot;, 'r+');
</span><span class="cx">                 if ( !$tmp_fh ) return false;
</span><span class="lines">@@ -42,19 +42,19 @@
</span><span class="cx">                 rewind( $tmp_fh );
</span><span class="cx">                 return stream_get_contents( $tmp_fh );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function is_entry_good_for_export( $entry ) {
</span><span class="cx">                 if ( empty( $entry-&gt;translations ) ) {
</span><span class="cx">                         return false;
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 if ( !array_filter( $entry-&gt;translations ) ) {
</span><span class="cx">                         return false;
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 return true;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function export_to_file_handle($fh) {
</span><span class="cx">                 $entries = array_filter( $this-&gt;entries, array( $this, 'is_entry_good_for_export' ) );
</span><span class="cx">                 ksort($entries);
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">                 fwrite($fh, pack('V*', $magic, $revision, $total, $originals_lenghts_addr,
</span><span class="cx">                         $translations_lenghts_addr, $size_of_hash, $hash_addr));
</span><span class="cx">                 fseek($fh, $originals_lenghts_addr);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // headers' msgid is an empty string
</span><span class="cx">                 fwrite($fh, pack('VV', 0, $current_addr));
</span><span class="cx">                 $current_addr++;
</span><span class="lines">@@ -81,24 +81,24 @@
</span><span class="cx">                         fwrite($fh, pack('VV', $length, $current_addr));
</span><span class="cx">                         $current_addr += $length + 1; // account for the NULL byte after
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $exported_headers = $this-&gt;export_headers();
</span><span class="cx">                 fwrite($fh, pack('VV', strlen($exported_headers), $current_addr));
</span><span class="cx">                 $current_addr += strlen($exported_headers) + 1;
</span><span class="cx">                 $translations_table = $exported_headers . chr(0);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 foreach($entries as $entry) {
</span><span class="cx">                         $translations_table .= $this-&gt;export_translations($entry) . chr(0);
</span><span class="cx">                         $length = strlen($this-&gt;export_translations($entry));
</span><span class="cx">                         fwrite($fh, pack('VV', $length, $current_addr));
</span><span class="cx">                         $current_addr += $length + 1;
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 fwrite($fh, $originals_table);
</span><span class="cx">                 fwrite($fh, $translations_table);
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function export_original($entry) {
</span><span class="cx">                 //TODO: warnings for control characters
</span><span class="cx">                 $exported = $entry-&gt;singular;
</span><span class="lines">@@ -106,12 +106,12 @@
</span><span class="cx">                 if (!is_null($entry-&gt;context)) $exported = $entry-&gt;context . chr(4) . $exported;
</span><span class="cx">                 return $exported;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function export_translations($entry) {
</span><span class="cx">                 //TODO: warnings for control characters
</span><span class="cx">                 return implode(chr(0), $entry-&gt;translations);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function export_headers() {
</span><span class="cx">                 $exported = '';
</span><span class="cx">                 foreach($this-&gt;headers as $header =&gt; $value) {
</span></span></pre></div>
<a id="trunkpomopophp"></a>
<div class="modfile"><h4>Modified: trunk/pomo/po.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/pomo/po.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/pomo/po.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx">  */
</span><span class="cx"> if ( !class_exists( 'PO' ) ):
</span><span class="cx"> class PO extends Gettext_Translations {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $comments_before_headers = '';
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">                 if (false === $res) return false;
</span><span class="cx">                 return fclose($fh);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Text to include as a comment before the start of the PO contents
</span><span class="cx">          *
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">                 $po = str_replace(&quot;$newline$quote$quote&quot;, '', $po);
</span><span class="cx">                 return $po;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Gives back the original string from a PO-formatted string
</span><span class="cx">          *
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function read_entry($f, $lineno = 0) {
</span><span class="cx">                 $entry = new Translation_Entry();
</span><span class="cx">                 // where were we in the last step
</span><span class="lines">@@ -342,7 +342,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return array('entry' =&gt; $entry, 'lineno' =&gt; $lineno);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function read_line($f, $action = 'read') {
</span><span class="cx">                 static $last_line = '';
</span><span class="cx">                 static $use_last_line = false;
</span><span class="lines">@@ -360,7 +360,7 @@
</span><span class="cx">                 $use_last_line = false;
</span><span class="cx">                 return $line;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function add_comment_to_entry(&amp;$entry, $po_comment_line) {
</span><span class="cx">                 $first_two = substr($po_comment_line, 0, 2);
</span><span class="cx">                 $comment = trim(substr($po_comment_line, 2));
</span><span class="lines">@@ -374,7 +374,7 @@
</span><span class="cx">                         $entry-&gt;translator_comments = trim($entry-&gt;translator_comments . &quot;\n&quot; . $comment);
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function trim_quotes($s) {
</span><span class="cx">                 if ( substr($s, 0, 1) == '&quot;') $s = substr($s, 1);
</span><span class="cx">                 if ( substr($s, -1, 1) == '&quot;') $s = substr($s, 0, -1);
</span></span></pre></div>
<a id="trunkpomostreamsphp"></a>
<div class="modfile"><h4>Modified: trunk/pomo/streams.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/pomo/streams.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/pomo/streams.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -10,15 +10,15 @@
</span><span class="cx"> 
</span><span class="cx"> if ( !class_exists( 'POMO_Reader' ) ):
</span><span class="cx"> class POMO_Reader {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $endian = 'little';
</span><span class="cx">         var $_post = '';
</span><del>-        
</del><ins>+
</ins><span class="cx">         function POMO_Reader() {
</span><span class="cx">                 $this-&gt;is_overloaded = ((ini_get(&quot;mbstring.func_overload&quot;) &amp; 2) != 0) &amp;&amp; function_exists('mb_substr');
</span><span class="cx">                 $this-&gt;_pos = 0;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Sets the endianness of the file.
</span><span class="cx">          *
</span><span class="lines">@@ -57,8 +57,8 @@
</span><span class="cx">                 $endian_letter = ('big' == $this-&gt;endian)? 'N' : 'V';
</span><span class="cx">                 return unpack($endian_letter.$count, $bytes);
</span><span class="cx">         }
</span><del>-        
-        
</del><ins>+
+
</ins><span class="cx">         function substr($string, $start, $length) {
</span><span class="cx">                 if ($this-&gt;is_overloaded) {
</span><span class="cx">                         return mb_substr($string, $start, $length, 'ascii');
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">                         return substr($string, $start, $length);
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function strlen($string) {
</span><span class="cx">                 if ($this-&gt;is_overloaded) {
</span><span class="cx">                         return mb_strlen($string, 'ascii');
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">                         return strlen($string);
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function str_split($string, $chunk_size) {
</span><span class="cx">                 if (!function_exists('str_split')) {
</span><span class="cx">                         $length = $this-&gt;strlen($string);
</span><span class="lines">@@ -86,8 +86,8 @@
</span><span class="cx">                         return str_split( $string, $chunk_size );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
-                
</del><ins>+
+
</ins><span class="cx">         function pos() {
</span><span class="cx">                 return $this-&gt;_pos;
</span><span class="cx">         }
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">         function is_resource() {
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function close() {
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="lines">@@ -108,11 +108,11 @@
</span><span class="cx">                 parent::POMO_Reader();
</span><span class="cx">                 $this-&gt;_f = fopen($filename, 'rb');
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function read($bytes) {
</span><span class="cx">                 return fread($this-&gt;_f, $bytes);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function seekto($pos) {
</span><span class="cx">                 if ( -1 == fseek($this-&gt;_f, $pos, SEEK_SET)) {
</span><span class="cx">                         return false;
</span><span class="lines">@@ -120,19 +120,19 @@
</span><span class="cx">                 $this-&gt;_pos = $pos;
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function is_resource() {
</span><span class="cx">                 return is_resource($this-&gt;_f);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function feof() {
</span><span class="cx">                 return feof($this-&gt;_f);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function close() {
</span><span class="cx">                 return fclose($this-&gt;_f);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function read_all() {
</span><span class="cx">                 $all = '';
</span><span class="cx">                 while ( !$this-&gt;feof() )
</span><span class="lines">@@ -148,9 +148,9 @@
</span><span class="cx">  * of a physical file.
</span><span class="cx">  */
</span><span class="cx"> class POMO_StringReader extends POMO_Reader {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $_str = '';
</span><del>-        
</del><ins>+
</ins><span class="cx">         function POMO_StringReader($str = '') {
</span><span class="cx">                 parent::POMO_Reader();
</span><span class="cx">                 $this-&gt;_str = $str;
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx">         function read_all() {
</span><span class="cx">                 return $this-&gt;substr($this-&gt;_str, $this-&gt;_pos, $this-&gt;strlen($this-&gt;_str));
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkpomotranslationsphp"></a>
<div class="modfile"><h4>Modified: trunk/pomo/translations.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/pomo/translations.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/pomo/translations.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">                 $this-&gt;entries[$key] = &amp;$entry;
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function add_entry_or_merge($entry) {
</span><span class="cx">                 if (is_array($entry)) {
</span><span class="cx">                         $entry = new Translation_Entry($entry);
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx">                         $this-&gt;entries[$entry-&gt;key()] = $entry;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function merge_originals_with(&amp;$other) {
</span><span class="cx">                 foreach( $other-&gt;entries as $entry ) {
</span><span class="cx">                         if ( !isset( $this-&gt;entries[$entry-&gt;key()] ) )
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return call_user_func($this-&gt;_gettext_select_plural_form, $count);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function nplurals_and_expression_from_header($header) {
</span><span class="cx">                 if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) {
</span><span class="cx">                         $nplurals = (int)$matches[1];
</span><span class="lines">@@ -202,7 +202,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return rtrim($res, ';');
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function make_headers($translation) {
</span><span class="cx">                 $headers = array();
</span><span class="cx">                 // sometimes \ns are used instead of real new lines
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return $headers;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function set_header($header, $value) {
</span><span class="cx">                 parent::set_header($header, $value);
</span><span class="cx">                 if ('Plural-Forms' == $header) {
</span><span class="lines">@@ -234,7 +234,7 @@
</span><span class="cx"> class NOOP_Translations {
</span><span class="cx">         var $entries = array();
</span><span class="cx">         var $headers = array();
</span><del>-        
</del><ins>+
</ins><span class="cx">         function add_entry($entry) {
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkscriptsaddadminphp"></a>
<div class="modfile"><h4>Modified: trunk/scripts/add-admin.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/scripts/add-admin.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/scripts/add-admin.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> class GP_Script_Add_Admin extends GP_CLI {
</span><span class="cx"> 
</span><span class="cx">         var $usage = &quot;&lt;username-to-make-an-admin&gt;&quot;;
</span><del>-        
</del><ins>+
</ins><span class="cx">         function run() {
</span><span class="cx">                 if ( empty( $this-&gt;args ) ) {
</span><span class="cx">                         $this-&gt;usage();
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx">                                 exit( 2 );
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkscriptsexportphp"></a>
<div class="modfile"><h4>Modified: trunk/scripts/export.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/scripts/export.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/scripts/export.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> require_once dirname( dirname( __FILE__ ) ) . '/gp-load.php';
</span><span class="cx"> 
</span><span class="cx"> class GP_Script_Export extends GP_Translation_Set_Script {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $filter_options = array(
</span><span class="cx">                 'f' =&gt; array( 'key' =&gt; 'term', 'desc' =&gt; 'search term' ),
</span><span class="cx">                 'q' =&gt; array( 'key' =&gt; 'status', 'desc' =&gt; 'translation string status' ),
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx">                 $this-&gt;add_filters_to_options_and_usage();
</span><span class="cx">                 parent::__construct();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function action_on_translation_set( $translation_set ) {
</span><span class="cx"> 
</span><span class="cx">                 $format = gp_array_get( GP::$formats, isset( $this-&gt;options['o'] )? $this-&gt;options['o'] : 'po', null );
</span><span class="lines">@@ -23,12 +23,12 @@
</span><span class="cx">                 $entries = GP::$translation-&gt;for_export( $this-&gt;project, $translation_set, $this-&gt;get_filters_for_translation() );
</span><span class="cx">                 echo $format-&gt;print_exported_file( $this-&gt;project, $this-&gt;locale, $translation_set, $entries ).&quot;\n&quot;;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function add_filters_to_options_and_usage() {
</span><span class="cx">                 foreach( $this-&gt;filter_options as $option =&gt; $details ) {
</span><span class="cx">                         $this-&gt;short_options .= &quot;$option:&quot;;
</span><span class="cx">                         $this-&gt;usage .= &quot; [-$option &lt;{$details['desc']}&gt;]&quot;;
</span><del>-                }                
</del><ins>+                }
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function get_filters_for_translation() {
</span></span></pre></div>
<a id="trunkscriptsimportoriginalsphp"></a>
<div class="modfile"><h4>Modified: trunk/scripts/import-originals.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/scripts/import-originals.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/scripts/import-originals.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,11 +2,11 @@
</span><span class="cx"> require_once dirname( dirname( __FILE__ ) ) . '/gp-load.php';
</span><span class="cx"> 
</span><span class="cx"> class GP_Script_Import_Originals extends GP_CLI {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $short_options = 'p:f:o:';
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $usage = &quot;-p &lt;project-path&gt; -f &lt;file&gt; [-o &lt;format&gt;]&quot;;
</span><del>-        
</del><ins>+
</ins><span class="cx">         function run() {
</span><span class="cx">                 if ( !isset( $this-&gt;options['p'] ) ) {
</span><span class="cx">                         $this-&gt;usage();
</span></span></pre></div>
<a id="trunkscriptsimportphp"></a>
<div class="modfile"><h4>Modified: trunk/scripts/import.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/scripts/import.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/scripts/import.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,20 +2,20 @@
</span><span class="cx"> require_once dirname( dirname( __FILE__ ) ) . '/gp-load.php';
</span><span class="cx"> 
</span><span class="cx"> class GP_Script_Import extends GP_Translation_Set_Script {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function __construct() {
</span><span class="cx">                 $this-&gt;short_options .= 'f:';
</span><span class="cx">                 $this-&gt;usage = '-f &lt;po-file&gt; '.$this-&gt;usage;
</span><span class="cx">                 parent::__construct();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function action_on_translation_set( $translation_set ) {
</span><span class="cx">                 $po = new PO();
</span><span class="cx">                 $po-&gt;import_from_file( $this-&gt;options['f'] );
</span><span class="cx">                 $added = $translation_set-&gt;import( $po );
</span><span class="cx">                 printf( _n( &quot;%s translation were added\n&quot;, &quot;%s translations were added\n&quot;, $added ), $added );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx"> }
</span><span class="cx"> $gp_script_import = new GP_Script_Import;
</span><span class="cx"> $gp_script_import-&gt;run();
</span></span></pre></div>
<a id="trunkscriptsrecheckwarningsphp"></a>
<div class="modfile"><h4>Modified: trunk/scripts/recheck-warnings.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/scripts/recheck-warnings.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/scripts/recheck-warnings.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> require_once dirname( dirname( __FILE__ ) ) . '/gp-load.php';
</span><span class="cx"> 
</span><span class="cx"> class GP_Script_Recheck_Warnings extends GP_Translation_Set_Script {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function action_on_translation_set( $translation_set ) {
</span><span class="cx">                 $project = GP::$project-&gt;get( $translation_set-&gt;project_id );
</span><span class="cx">                 $locale = GP_Locales::by_slug( $translation_set-&gt;locale );
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx"> }
</span><span class="cx"> $gp_script_recheck_warnings = new GP_Script_Recheck_Warnings;
</span><span class="cx"> $gp_script_recheck_warnings-&gt;run();
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkscriptsregeneratepathsphp"></a>
<div class="modfile"><h4>Modified: trunk/scripts/regenerate-paths.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/scripts/regenerate-paths.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/scripts/regenerate-paths.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> require_once dirname( dirname( __FILE__ ) ) . '/gp-load.php';
</span><span class="cx"> 
</span><span class="cx"> class GP_Script_Regenerate extends GP_CLI {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function run() {
</span><span class="cx">                 GP::$project-&gt;regenerate_paths();
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkscriptsremovemultiplecurrentsphp"></a>
<div class="modfile"><h4>Modified: trunk/scripts/remove-multiple-currents.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/scripts/remove-multiple-currents.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/scripts/remove-multiple-currents.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> require_once dirname( dirname( __FILE__ ) ) . '/gp-load.php';
</span><span class="cx"> 
</span><span class="cx"> class GP_Script extends GP_CLI {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function run() {
</span><span class="cx">                 $sets = GP::$translation_set-&gt;all();
</span><span class="cx">                 foreach( $sets as $set ) {
</span></span></pre></div>
<a id="trunkscriptsupgradesetpermissionsphp"></a>
<div class="modfile"><h4>Modified: trunk/scripts/upgrade-set-permissions.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/scripts/upgrade-set-permissions.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/scripts/upgrade-set-permissions.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> require_once dirname( dirname( __FILE__ ) ) . '/gp-load.php';
</span><span class="cx"> 
</span><span class="cx"> class GP_Script_Upgrade_Permissions extends GP_CLI {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function run() {
</span><span class="cx">                 $permissions = GP::$permission-&gt;find_many( array( 'object_type' =&gt; 'translation-set', 'action' =&gt; 'approve' ) );
</span><span class="cx">                 foreach( $permissions as $permission ) {
</span></span></pre></div>
<a id="trunkscriptswipepermissionsphp"></a>
<div class="modfile"><h4>Modified: trunk/scripts/wipe-permissions.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/scripts/wipe-permissions.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/scripts/wipe-permissions.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> require_once dirname( dirname( __FILE__ ) ) . '/gp-load.php';
</span><span class="cx"> 
</span><span class="cx"> class GP_Script_Wipe_Permissions extends GP_CLI {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function run() {
</span><span class="cx">                 echo &quot;This will erase all current permissions!\nAre you sure you want to delete them? [y/N]\n&quot;;
</span><span class="cx">                 $response = fgets( STDIN );
</span></span></pre></div>
<a id="trunkscriptswporg2slugphp"></a>
<div class="modfile"><h4>Modified: trunk/scripts/wporg2slug.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/scripts/wporg2slug.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/scripts/wporg2slug.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,9 +2,9 @@
</span><span class="cx"> require_once dirname( dirname( __FILE__ ) ) . '/gp-load.php';
</span><span class="cx"> 
</span><span class="cx"> class GP_Script_WPorg2Slug extends GP_CLI {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $usage = &quot;&lt;wporg-locale&gt;&quot;;
</span><del>-        
</del><ins>+
</ins><span class="cx">         function run() {
</span><span class="cx">                 if ( !isset( $this-&gt;args[0] ) ) {
</span><span class="cx">                         $this-&gt;usage();
</span></span></pre></div>
<a id="trunktallphp"></a>
<div class="modfile"><h4>Modified: trunk/t/all.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/all.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/all.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> for( $depth = 0; $depth &lt;= 3; $depth++ ) {
</span><span class="cx">         foreach( glob( str_repeat( 'tests_*/', $depth ) . 'test_*.php' ) as $test_file ) {
</span><span class="cx">                 include_once $test_file;
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class all {
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">                                 $suite-&gt;addTestSuite( $class );
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">         return $suite;
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunktlibfactoryphp"></a>
<div class="modfile"><h4>Modified: trunk/t/lib/factory.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/lib/factory.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/lib/factory.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx">                 $this-&gt;translation = new GP_UnitTest_Factory_For_Translation( $this );
</span><span class="cx">                 $this-&gt;user = new GP_UnitTest_Factory_For_User( $this );
</span><span class="cx">                 $this-&gt;locale = new GP_UnitTest_Factory_For_Locale( $this );
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class GP_UnitTest_Factory_For_Project extends GP_UnitTest_Factory_For_Thing {
</span><span class="lines">@@ -32,12 +32,12 @@
</span><span class="cx">                         'user_email' =&gt; new GP_UnitTest_Generator_Sequence( 'user_%s@example.org' ),
</span><span class="cx">                 );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function create_admin( $args = array() ) {
</span><span class="cx">                 $user = $this-&gt;create( $args );
</span><span class="cx">                 GP::$permission-&gt;create( array( 'user_id' =&gt; $user-&gt;id, 'action' =&gt; 'admin' ) );
</span><span class="cx">                 return $user;
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">                         'translation_0' =&gt; new GP_UnitTest_Generator_Sequence( 'Translation %s' ),
</span><span class="cx">                 );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function create_with_original_for_translation_set( $set, $args = array() ) {
</span><span class="cx">                 $original = $this-&gt;factory-&gt;original-&gt;create( array( 'project_id' =&gt; $set-&gt;project_id ) );
</span><span class="cx">                 $translation = $this-&gt;create( array_merge( $args, array( 'original_id' =&gt; $original-&gt;id, 'translation_set_id' =&gt; $set-&gt;id ) ) );
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">                         'english_name' =&gt; new GP_UnitTest_Generator_Sequence( 'Locale %s' ),
</span><span class="cx">                 );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function create( $args = array(), $generation_definitions = null ) {
</span><span class="cx">                 if ( is_null( $generation_definitions ) ) $generation_definitions = $this-&gt;default_generation_definitions;
</span><span class="cx">                 $generated_args = $this-&gt;generate_args( $args, $generation_definitions, $callbacks );
</span><span class="lines">@@ -113,11 +113,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class GP_UnitTest_Factory_For_Thing {
</span><del>-        
</del><ins>+
</ins><span class="cx">         var $default_generation_definitions;
</span><span class="cx">         var $thing;
</span><span class="cx">         var $factory;
</span><del>-        
</del><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * Creates a new factory, which will create objects of a specific Thing
</span><span class="cx">          *
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">                 $this-&gt;default_generation_definitions = $default_generation_definitions;
</span><span class="cx">                 $this-&gt;thing = $thing;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function create( $args = array(), $generation_definitions = null ) {
</span><span class="cx">                 if ( is_null( $generation_definitions ) ) $generation_definitions = $this-&gt;default_generation_definitions;
</span><span class="cx">                 $generated_args = $this-&gt;generate_args( $args, $generation_definitions, $callbacks );
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 return $created;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function generate_args( $args = array(), $generation_definitions = null, &amp;$callbacks = null ) {
</span><span class="cx">                 $callbacks = array();
</span><span class="cx">                 if ( is_null( $generation_definitions ) ) $generation_definitions = $this-&gt;default_generation_definitions;
</span><span class="lines">@@ -163,12 +163,12 @@
</span><span class="cx">                                         $args[$field_name] = $generator-&gt;next();
</span><span class="cx">                                 else
</span><span class="cx">                                         return new WP_Error( 'invalid_argument', 'Factory default value should be either a scalar or an generator object.' );
</span><del>-                                
</del><ins>+
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 return $args;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function apply_callbacks( $callbacks, $created ) {
</span><span class="cx">                 $updated_fields = array();
</span><span class="cx">                 foreach( $callbacks as $field_name =&gt; $generator ) {
</span><span class="lines">@@ -176,21 +176,21 @@
</span><span class="cx">                 }
</span><span class="cx">                 return $updated_fields;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function callback( $function ) {
</span><span class="cx">                 return new GP_UnitTest_Factory_Callback_After_Create( $function );
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class GP_UnitTest_Generator_Sequence {
</span><span class="cx">         var $next;
</span><span class="cx">         var $template_string;
</span><del>-        
</del><ins>+
</ins><span class="cx">         function __construct( $template_string = '%s', $start = 1 ) {
</span><span class="cx">                 $this-&gt;next = $start;
</span><span class="cx">                 $this-&gt;template_string = $template_string;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function next() {
</span><span class="cx">                 $generated = sprintf( $this-&gt;template_string , $this-&gt;next );
</span><span class="cx">                 $this-&gt;next++;
</span></span></pre></div>
<a id="trunktlibtestcaseroutephp"></a>
<div class="modfile"><h4>Modified: trunk/t/lib/testcase-route.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/lib/testcase-route.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/lib/testcase-route.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> class GP_UnitTestCase_Route extends GP_UnitTestCase {
</span><span class="cx">         var $route;
</span><span class="cx">         var $route_class;
</span><del>-        
</del><ins>+
</ins><span class="cx">         function setUp() {
</span><span class="cx">                 parent::setUp();
</span><span class="cx">                 $this-&gt;route = new $this-&gt;route_class;
</span><span class="lines">@@ -11,14 +11,14 @@
</span><span class="cx">                 $this-&gt;cookies = array();
</span><span class="cx">                 $this-&gt;route-&gt;errors = array();
</span><span class="cx">                 $this-&gt;route-&gt;notices = array();
</span><del>-                add_filter( 'backpress_set_cookie', array( &amp;$this, 'filter_do_not_set_cookie' ) );                
</del><ins>+                add_filter( 'backpress_set_cookie', array( &amp;$this, 'filter_do_not_set_cookie' ) );
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function tearDown() {
</span><span class="cx">                 parent::tearDown();
</span><span class="cx">                 remove_filter( 'backpress_set_cookie', array( &amp;$this, 'filter_do_not_set_cookie' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function filter_do_not_set_cookie( $args ) {
</span><span class="cx">                 if ( isset( $args[0] ) &amp;&amp; !isset( $args[1] ) &amp;&amp; isset( $this-&gt;cookies[$args[0]] ) ) {
</span><span class="cx">                         unset( $this-&gt;cookies[$args[0]] );
</span><span class="lines">@@ -28,16 +28,16 @@
</span><span class="cx">                 }
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertRedirected() {
</span><span class="cx">                 $this-&gt;assertTrue( $this-&gt;route-&gt;redirected, &quot;Wasn't redirected&quot; );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertRedirectURLContains( $text ) {
</span><span class="cx">                 $this-&gt;assertRedirected();
</span><span class="cx">                 $this-&gt;assertContains( $text, $this-&gt;route-&gt;redirected_to );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertThereIsAnErrorContaining( $text ) {
</span><span class="cx">                 $this-&gt;assertThereIsAnArrayElementContaining( $text, $this-&gt;route-&gt;errors, &quot;No error contains '$text'&quot; );
</span><span class="cx">         }
</span><span class="lines">@@ -45,19 +45,19 @@
</span><span class="cx">         function assertThereIsANoticeContaining( $text ) {
</span><span class="cx">                 $this-&gt;assertThereIsAnArrayElementContaining( $text, $this-&gt;route-&gt;notices, &quot;No notice contains '$text'&quot; );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertThereIsAnArrayElementContaining( $text, $array, $message = null ) {
</span><span class="cx">                 $this-&gt;assertGreaterThan( 0, count( $array ), 'The array is empty.' );
</span><span class="cx">                 $message = $message? $message : &quot;No array element contains '$text'&quot;;
</span><span class="cx">                 $this-&gt;assertTrue( gp_array_any( lambda( '$e', 'gp_in( $text, $e ); ', compact('text') ), $array ), $message );
</span><del>-                
</del><ins>+
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertNotAllowedRedirect() {
</span><span class="cx">                 $this-&gt;assertRedirected();
</span><span class="cx">                 $this-&gt;assertThereIsAnErrorContaining( 'allowed' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertInvalidRedirect() {
</span><span class="cx">                 $this-&gt;assertRedirected();
</span><span class="cx">                 $this-&gt;assertThereIsAnErrorContaining( 'invalid' );
</span><span class="lines">@@ -67,16 +67,16 @@
</span><span class="cx">                 $this-&gt;assertRedirected();
</span><span class="cx">                 $this-&gt;assertThereIsAnErrorContaining( 'Error' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertTemplateLoadedIs( $template ) {
</span><span class="cx">                 $this-&gt;assertTrue( $this-&gt;route-&gt;rendered_template, &quot;No template was rendered&quot; );
</span><span class="cx">                 $this-&gt;assertEquals( $template, $this-&gt;route-&gt;loaded_template );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertTemplateOutputNotEmpty() {
</span><span class="cx">                 $this-&gt;assertFalse( empty( $this-&gt;route-&gt;template_output ), &quot;Template output is empty&quot; );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assert404() {
</span><span class="cx">                 $this-&gt;assertTemplateLoadedIs( '404' );
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunktlibtestcasephp"></a>
<div class="modfile"><h4>Modified: trunk/t/lib/testcase.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/lib/testcase.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/lib/testcase.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -57,12 +57,12 @@
</span><span class="cx">                 GP::$translation_set = new GP_Translation_Set;
</span><span class="cx">                 GP::$original = new GP_Original;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function start_transaction() {
</span><span class="cx">                 global $gpdb;
</span><span class="cx">                 $gpdb-&gt;query( 'SET autocommit = 0;' );
</span><span class="cx">                 $gpdb-&gt;query( 'SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;' );
</span><del>-                $gpdb-&gt;query( 'START TRANSACTION;' );                
</del><ins>+                $gpdb-&gt;query( 'START TRANSACTION;' );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function temp_filename() {
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">                 $dir = realpath( $dir );
</span><span class="cx">                 return tempnam( $dir, 'testpomo' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function set_normal_user_as_current() {
</span><span class="cx">                 $user = $this-&gt;factory-&gt;user-&gt;create();
</span><span class="cx">                 $user-&gt;set_as_current();
</span><span class="lines">@@ -89,19 +89,19 @@
</span><span class="cx">                 $admin-&gt;set_as_current();
</span><span class="cx">                 return $admin;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertWPError( $actual, $message = '' ) {
</span><span class="cx">                 $this-&gt;assertTrue( is_wp_error( $actual ), $message );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertEqualFields( $object, $fields ) {
</span><span class="cx">                 foreach( $fields as $field_name =&gt; $field_value ) {
</span><span class="cx">                         if ( $object-&gt;$field_name != $field_value ) {
</span><span class="cx">                                 $this-&gt;fail();
</span><del>-                        }                        
</del><ins>+                        }
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertDiscardWhitespace( $expected, $actual ) {
</span><span class="cx">                 $this-&gt;assertEquals( preg_replace( '/\s*/', '', $expected ), preg_replace( '/\s*/', '', $actual ) );
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkttest_format_androidphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_format_android.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_format_android.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_format_android.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -13,9 +13,9 @@
</span><span class="cx">                         array('with_lt', 'you &lt; me', 'ти &lt; аз'),
</span><span class="cx">                         array('with_gt', 'me &gt; you', &quot;аз &gt; ти&quot;),
</span><span class="cx">                         array('with_amps', 'me &amp; you are not &amp;amp;', 'аз &amp; ти не сме &amp;amp;'),
</span><del>-                );                
</del><ins>+                );
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_export() {
</span><span class="cx">                 $entries_for_export = array();
</span><span class="cx">                 foreach( $this-&gt;entries as $sample ) {
</span><span class="lines">@@ -28,11 +28,11 @@
</span><span class="cx">                 }
</span><span class="cx">                 $this-&gt;assertEquals( file_get_contents( 'data/translation.android.xml' ), $this-&gt;android-&gt;print_exported_file( 'p', 'l', 't', $entries_for_export ) );
</span><span class="cx">         }
</span><del>-        
-        
</del><ins>+
+
</ins><span class="cx">         function test_read_originals() {
</span><span class="cx">                 $translations = $this-&gt;android-&gt;read_originals_from_file( 'data/originals.android.xml' );
</span><del>-                                
</del><ins>+
</ins><span class="cx">                 foreach( $this-&gt;entries as $sample ) {
</span><span class="cx">                         list( $context, $original, $translation ) = $sample;
</span><span class="cx">                         $translatable_entry = new Translation_Entry( array('singular' =&gt; $original, 'context' =&gt; $context) );
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">                         $this-&gt;assertEquals( $context, $entry-&gt;context );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_read_translations() {
</span><span class="cx">                 $stubbed_originals = array();
</span><span class="cx">                 foreach( $this-&gt;entries as $sample ) {
</span><span class="lines">@@ -59,5 +59,5 @@
</span><span class="cx">                         $this-&gt;assertEquals( $translation, $translations-&gt;translate( $original, $context ) );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkttest_format_resxphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_format_resx.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_format_resx.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_format_resx.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -14,9 +14,9 @@
</span><span class="cx">                         array('with_gt', 'me &gt; you', &quot;аз &gt; ти&quot;, ''),
</span><span class="cx">                         array('with_amps', 'me &amp; you are not &amp;amp;', 'аз &amp; ти не сме &amp;amp;', ''),
</span><span class="cx">                         array('with_comment', 'baba', 'баба', 'Me, myself &amp; Irene'),
</span><del>-                );                
</del><ins>+                );
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_export() {
</span><span class="cx">                 $entries_for_export = array();
</span><span class="cx">                 foreach( $this-&gt;entries as $sample ) {
</span><span class="lines">@@ -30,8 +30,8 @@
</span><span class="cx">                 }
</span><span class="cx">                 $this-&gt;assertEquals( file_get_contents( 'data/translation.resx.xml' ), $this-&gt;resx-&gt;print_exported_file( 'p', 'l', 't', $entries_for_export ) );
</span><span class="cx">         }
</span><del>-        
-        
</del><ins>+
+
</ins><span class="cx">         function test_read_originals() {
</span><span class="cx">                 $translations = $this-&gt;resx-&gt;read_originals_from_file( 'data/originals.resx.xml' );
</span><span class="cx">                 $this-&gt;assertEquals( count($this-&gt;entries ), count( $translations-&gt;entries ), 'number of read originals is different from the expected' );
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">                         $this-&gt;assertEquals( $comment, $entry-&gt;extracted_comments );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_read_translations() {
</span><span class="cx">                 $stubbed_originals = array();
</span><span class="cx">                 foreach( $this-&gt;entries as $sample ) {
</span></span></pre></div>
<a id="trunkttest_format_rrcphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_format_rrc.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_format_rrc.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_format_rrc.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx">                         array('MULTIPLE_UNTRANSLATED[1]', 'English string#1', ''),
</span><span class="cx">                 );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_export() {
</span><span class="cx">                 $entries_for_export = array();
</span><span class="cx">                 foreach( $this-&gt;entries as $sample ) {
</span><span class="lines">@@ -33,19 +33,19 @@
</span><span class="cx">                                 $this-&gt;rrc-&gt;print_exported_file( 'project', 'locale', 'translation_set', $entries_for_export )
</span><span class="cx">                 );
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         function test_read_originals() {
</span><span class="cx">                 $translations = $this-&gt;rrc-&gt;read_originals_from_file( 'data/originals.rrc' );
</span><del>-                                
</del><ins>+
</ins><span class="cx">                 foreach( $this-&gt;entries as $sample ) {
</span><span class="cx">                         list( $context, $original, $translation ) = $sample;
</span><span class="cx">                         $translatable_entry = new Translation_Entry( array('singular' =&gt; $original, 'context' =&gt; $context) );
</span><span class="cx">                         $entry = $translations-&gt;translate_entry( $translatable_entry );
</span><span class="cx">                         $this-&gt;assertEquals( $original, $entry-&gt;singular );
</span><del>-                        $this-&gt;assertEquals( $context, $entry-&gt;context );                        
</del><ins>+                        $this-&gt;assertEquals( $context, $entry-&gt;context );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_read_translations() {
</span><span class="cx">                 $stubbed_originals = array();
</span><span class="cx">                 foreach( $this-&gt;entries as $sample ) {
</span><span class="lines">@@ -62,5 +62,5 @@
</span><span class="cx">                         list( $context, $original, $translation ) = $sample;
</span><span class="cx">                         $this-&gt;assertEquals( $translation, $translations-&gt;translate( $original, $context ) );
</span><span class="cx">                 }
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkttest_linksphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_links.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_links.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_links.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,11 +2,11 @@
</span><span class="cx"> require_once('init.php');
</span><span class="cx"> 
</span><span class="cx"> class GP_Test_Links extends GP_UnitTestCase {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_link_get_simple() {
</span><span class="cx">                 $this-&gt;assertEquals( '&lt;a href=&quot;http://dir.bg/&quot;&gt;Baba&lt;/a&gt;', gp_link_get( 'http://dir.bg/', 'Baba' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_link_get_attributes() {
</span><span class="cx">                 $this-&gt;assertEquals( '&lt;a href=&quot;http://dir.bg/&quot; target=&quot;_blank&quot; class=&quot;edit&quot;&gt;Baba&lt;/a&gt;',
</span><span class="cx">                         gp_link_get( 'http://dir.bg/', 'Baba', array( 'target' =&gt; '_blank', 'class' =&gt; 'edit' ) ) );
</span><span class="lines">@@ -19,11 +19,11 @@
</span><span class="cx">         function test_gp_link_get_should_put_the_after_attribute_after_the_link() {
</span><span class="cx">                 $this-&gt;assertEquals( '&lt;a href=&quot;http://dir.bg/&quot;&gt;Baba&lt;/a&gt;x', gp_link_get( 'http://dir.bg/', 'Baba', array( 'after' =&gt; 'x' ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_link_get_should_put_the_before_and_after_attributes_before_and_after_the_link() {
</span><span class="cx">                 $this-&gt;assertEquals( 'a&lt;a href=&quot;http://dir.bg/&quot;&gt;Baba&lt;/a&gt;b', gp_link_get( 'http://dir.bg/', 'Baba', array( 'before' =&gt; 'a', 'after' =&gt; 'b' ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_link_get_escape() {
</span><span class="cx">                 $this-&gt;assertEquals( '&lt;a href=&quot;http://dir.bg/&quot;&gt;Baba &amp; Dyado&lt;/a&gt;', gp_link_get( 'http://dir.bg/', 'Baba &amp; Dyado' ) );
</span><span class="cx">                 // clean_url() is too restrictive, so it isn't called
</span></span></pre></div>
<a id="trunkttest_miscphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_misc.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_misc.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_misc.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -14,13 +14,13 @@
</span><span class="cx">                 $this-&gt;assertEquals( &quot;odd&quot;, $gen() );
</span><span class="cx">                 $this-&gt;assertEquals( &quot;odd&quot;, $concurrent() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_array_flatten() {
</span><span class="cx">             $this-&gt;assertEquals( array(), gp_array_flatten( array() ) );
</span><span class="cx">         $this-&gt;assertEquals( array( 1, 2, 3 ), gp_array_flatten( array( 1, array( 2, 3 ) ) ) );
</span><span class="cx">         $this-&gt;assertEquals( array( 1, 2, 3, 4, 5, 6, 7 ), gp_array_flatten( array( 1, array( 2, array( 3, 4 ), 5, ), 6, array( 7 ) ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_array_zip() {
</span><span class="cx">                 $this-&gt;assertEquals( array(), gp_array_zip() );
</span><span class="cx">                 $this-&gt;assertEquals( array(), gp_array_zip( array() ) );
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">                 $this-&gt;assertEquals( array( array('baba', 'dyado') ), gp_array_zip( array('baba', 'boom'), array('dyado') ) );
</span><span class="cx">                 $this-&gt;assertEquals( array( array( array('baba'), 'dyado') ), gp_array_zip( array( array('baba'), 'boom'), array('dyado') ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_array_any() {
</span><span class="cx">                 $this-&gt;assertEquals( false, gp_array_any( 'intval', array( 0 ) ) );
</span><span class="cx">                 $this-&gt;assertEquals( false, gp_array_any( returner(false), array( 1, 2, 3, 4 ) ) );
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">                 $this-&gt;assertEquals( true, gp_array_any( returner(true), array( 1, 2, 3, 4 ) ) );
</span><span class="cx">                 $this-&gt;assertEquals( true, gp_array_any( returner('$x', '$x % 2'), array( 1, 2, 3, 4 ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_object_has_var_returs_true_if_var_is_null() {
</span><span class="cx">                 $this-&gt;assertTrue( gp_object_has_var( (object)array( 'baba' =&gt; null), 'baba' ) );
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkttest_mophp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_mo.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_mo.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_mo.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">                 $this-&gt;assertEquals('oney dragoney', $mo-&gt;translate_plural('one dragon', '%d dragons', 1));
</span><span class="cx">                 $this-&gt;assertEquals('manyey dragoney', $mo-&gt;translate_plural('one dragon', '%d dragons', 11));
</span><span class="cx">                 $this-&gt;assertEquals('twoey dragoney', $mo-&gt;translate_plural('one dragon', '%d dragons', 3));
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $mo-&gt;set_header('Plural-Forms', 'nplurals=2; plural=n !=1;');
</span><span class="cx">                 $this-&gt;assertEquals('oney dragoney', $mo-&gt;translate_plural('one dragon', '%d dragons', 1));
</span><span class="cx">                 $this-&gt;assertEquals('twoey dragoney', $mo-&gt;translate_plural('one dragon', '%d dragons', 2));
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">                 $this-&gt;assertEquals(&quot;not so dragon&quot;, $mo-&gt;entries[$single_entry-&gt;key()]-&gt;context);
</span><span class="cx"> 
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_translations_merge() {
</span><span class="cx">                 $host = new Translations();
</span><span class="cx">                 $host-&gt;add_entry(new Translation_Entry(array('singular' =&gt; 'pink',)));
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">                 $this-&gt;assertEquals(3, count($host-&gt;entries));
</span><span class="cx">                 $this-&gt;assertEquals(array(), array_diff(array('pink', 'green', 'red'), array_keys($host-&gt;entries)));
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_export_mo_file() {
</span><span class="cx">                 $entries = array();
</span><span class="cx">                 $entries[] = new Translation_Entry(array('singular' =&gt; 'pink',
</span><span class="lines">@@ -85,10 +85,10 @@
</span><span class="cx">                         $mo-&gt;add_entry($entry);
</span><span class="cx">                 }
</span><span class="cx">                 $mo-&gt;add_entry($no_translation_entry);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $temp_fn = $this-&gt;temp_filename();
</span><span class="cx">                 $mo-&gt;export_to_file($temp_fn);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $again = new MO();
</span><span class="cx">                 $again-&gt;import_from_file($temp_fn);
</span><span class="cx"> 
</span><span class="lines">@@ -97,12 +97,12 @@
</span><span class="cx">                         $this-&gt;assertEquals($entry, $again-&gt;entries[$entry-&gt;key()]);
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_export_should_not_include_empty_translations() {
</span><span class="cx">                 $entries = array(  );
</span><span class="cx">                 $mo = new MO;
</span><span class="cx">                 $mo-&gt;add_entry( array( 'singular' =&gt; 'baba', 'translations' =&gt; array( '', '' ) ) );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $temp_fn = $this-&gt;temp_filename();
</span><span class="cx">                 $mo-&gt;export_to_file( $temp_fn );
</span><span class="cx"> 
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;assertEquals( 0, count( $again-&gt;entries ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_nplurals_with_backslashn() {
</span><span class="cx">                 $mo = new MO();
</span><span class="cx">                 $mo-&gt;import_from_file('data/bad_nplurals.mo');
</span><span class="lines">@@ -119,14 +119,14 @@
</span><span class="cx">                 $this-&gt;assertEquals('%d foros', $mo-&gt;translate_plural('%d forum', '%d forums', 2));
</span><span class="cx">                 $this-&gt;assertEquals('%d foros', $mo-&gt;translate_plural('%d forum', '%d forums', -1));
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function disabled_test_performance() {
</span><span class="cx">                 $start = microtime(true);
</span><span class="cx">                 $mo = new MO();
</span><span class="cx">                 $mo-&gt;import_from_file('data/de_DE-2.8.mo');
</span><span class="cx">                 // echo &quot;\nPerformance: &quot;.(microtime(true) - $start).&quot;\n&quot;;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_overloaded_mb_functions() {
</span><span class="cx">                 // skipIf() method skips the whole test case, not only this method
</span><span class="cx">                 // that's why we are skipping it the stupid way
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx">                         $this-&gt;assertEquals(array('Табло'), $mo-&gt;entries['Dashboard']-&gt;translations);
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_load_pot_file() {
</span><span class="cx">                 $mo = new MO();
</span><span class="cx">                 $this-&gt;assertEquals( false, $mo-&gt;import_from_file('data/mo.pot') );
</span></span></pre></div>
<a id="trunkttest_noop_translationsphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_noop_translations.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_noop_translations.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_noop_translations.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -8,31 +8,31 @@
</span><span class="cx">                 $this-&gt;entry = new Translation_Entry( array( 'singular' =&gt; 'baba' ) );
</span><span class="cx">                 $this-&gt;plural_entry = new Translation_Entry(array('singular' =&gt; 'dyado', 'plural' =&gt; 'dyados', 'translations' =&gt; array('dyadox', 'dyadoy')));
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_get_header() {
</span><span class="cx">                 $this-&gt;assertEquals( false, $this-&gt;noop-&gt;get_header( 'Content-Type' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_add_entry() {
</span><span class="cx">                 $this-&gt;noop-&gt;add_entry( $this-&gt;entry );
</span><span class="cx">                 $this-&gt;assertEquals( array(), $this-&gt;noop-&gt;entries );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_set_header() {
</span><span class="cx">                 $this-&gt;noop-&gt;set_header( 'header', 'value' );
</span><span class="cx">                 $this-&gt;assertEquals( array(), $this-&gt;noop-&gt;headers );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_translate_entry() {
</span><span class="cx">                 $this-&gt;noop-&gt;add_entry( $this-&gt;entry );
</span><span class="cx">                 $this-&gt;assertEquals( false, $this-&gt;noop-&gt;translate_entry( $this-&gt;entry ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_translate() {
</span><span class="cx">                 $this-&gt;noop-&gt;add_entry( $this-&gt;entry );
</span><span class="cx">                 $this-&gt;assertEquals( 'baba', $this-&gt;noop-&gt;translate( 'baba' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_plural() {
</span><span class="cx">                 $this-&gt;noop-&gt;add_entry( $this-&gt;plural_entry );
</span><span class="cx">                 $this-&gt;assertEquals( 'dyado', $this-&gt;noop-&gt;translate_plural( 'dyado', 'dyados', 1 ) );
</span></span></pre></div>
<a id="trunkttest_permissionsphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_permissions.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_permissions.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_permissions.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">                 $from_db = GP::$permission-&gt;find_one( $args );
</span><span class="cx">                 $this-&gt;assertEqualPermissions( $args,  $from_db );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_create_find_with_nulls() {
</span><span class="cx">                 $args = array( 'user_id' =&gt; 2, 'action' =&gt; 'write', 'object_type' =&gt; 'translation-set', );
</span><span class="cx">                 GP::$permission-&gt;create( array_merge( $args, array( 'object_id' =&gt; 11 ) ) );
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx">                 $from_db = GP::$permission-&gt;find_one( $args );
</span><span class="cx">                 $this-&gt;assertEqualPermissions( $args, $from_db );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_logged_out_permissions() {
</span><span class="cx">                 $this-&gt;assertFalse( (bool)GP::$user-&gt;current()-&gt;can( 'admin' ) );
</span><span class="cx">                 $this-&gt;assertFalse( (bool)GP::$user-&gt;current()-&gt;can( 'write', 'project', 1 ) );
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">                 $other = GP::$project-&gt;create( array( 'name' =&gt; 'Other', 'slug' =&gt; 'other', 'path' =&gt; 'other') );
</span><span class="cx">                 $root = GP::$project-&gt;create( array( 'name' =&gt; 'Root', 'slug' =&gt; 'root', 'path' =&gt; 'root') );
</span><span class="cx">                 $sub = GP::$project-&gt;create( array( 'name' =&gt; 'Sub', 'slug' =&gt; 'sub', 'parent_project_id' =&gt; $root-&gt;id, 'path' =&gt; 'root/sub' ) );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 GP::$permission-&gt;create( array( 'user_id' =&gt; $user-&gt;id, 'action' =&gt; 'write', 'object_type' =&gt; 'project', 'object_id' =&gt; $root-&gt;id ) );
</span><span class="cx">                 $this-&gt;assertTrue( (bool)$user-&gt;can( 'write', 'project', $root-&gt;id ) );
</span><span class="cx">                 $this-&gt;assertTrue( (bool)$user-&gt;can( 'write', 'project', $sub-&gt;id ) );
</span><span class="lines">@@ -39,14 +39,14 @@
</span><span class="cx">                 $object_type = GP::$validator_permission-&gt;object_type;
</span><span class="cx">                 $action = 'whatever';
</span><span class="cx">                 $user = GP::$user-&gt;create( array( 'user_login' =&gt; 'gugu', 'user_email' =&gt; 'gugu@gugu.net' ) );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $other = GP::$project-&gt;create( array( 'name' =&gt; 'Other', 'slug' =&gt; 'other', 'path' =&gt; 'other') );
</span><span class="cx">                 $root = GP::$project-&gt;create( array( 'name' =&gt; 'Root', 'slug' =&gt; 'root', 'path' =&gt; 'root') );
</span><span class="cx">                 $sub = GP::$project-&gt;create( array( 'name' =&gt; 'Sub', 'slug' =&gt; 'sub', 'parent_project_id' =&gt; $root-&gt;id, 'path' =&gt; 'root/sub' ) );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 GP::$validator_permission-&gt;create( array( 'user_id' =&gt; $user-&gt;id, 'action' =&gt; 'whatever',
</span><span class="cx">                         'project_id' =&gt; $root-&gt;id, 'locale_slug' =&gt; 'bg', 'set_slug' =&gt; 'default' ) );
</span><del>-                        
</del><ins>+
</ins><span class="cx">                 $this-&gt;assertTrue( (bool)$user-&gt;can( 'whatever', $object_type, GP::$validator_permission-&gt;object_id( $root-&gt;id, 'bg', 'default' ) ) );
</span><span class="cx">                 $this-&gt;assertTrue( (bool)$user-&gt;can( 'whatever', $object_type, GP::$validator_permission-&gt;object_id( $sub-&gt;id, 'bg', 'default' ) ) );
</span><span class="cx">                 $this-&gt;assertTrue( (bool)$user-&gt;can( 'whatever', $object_type, GP::$validator_permission-&gt;object_id( $sub-&gt;id, 'bg', 'default' ) ) );
</span><span class="lines">@@ -58,14 +58,14 @@
</span><span class="cx"> 
</span><span class="cx">         function test_approve_translation_set_permissions() {
</span><span class="cx">                 $user = GP::$user-&gt;create( array( 'user_login' =&gt; 'gugu', 'user_email' =&gt; 'gugu@gugu.net' ) );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $other = GP::$project-&gt;create( array( 'name' =&gt; 'Other', 'slug' =&gt; 'other', 'path' =&gt; 'other') );
</span><span class="cx">                 $root = GP::$project-&gt;create( array( 'name' =&gt; 'Root', 'slug' =&gt; 'root', 'path' =&gt; 'root') );
</span><span class="cx">                 $sub = GP::$project-&gt;create( array( 'name' =&gt; 'Sub', 'slug' =&gt; 'sub', 'parent_project_id' =&gt; $root-&gt;id, 'path' =&gt; 'root/sub' ) );
</span><span class="cx"> 
</span><span class="cx">                 GP::$validator_permission-&gt;create( array( 'user_id' =&gt; $user-&gt;id, 'action' =&gt; 'approve',
</span><span class="cx">                         'project_id' =&gt; $root-&gt;id, 'locale_slug' =&gt; 'bg', 'set_slug' =&gt; 'default' ) );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $set_root_bg = GP::$translation_set-&gt;create( array( 'name' =&gt; 'Set', 'slug' =&gt; 'default', 'project_id' =&gt; $root-&gt;id, 'locale' =&gt; 'bg') );
</span><span class="cx">                 $set_sub_bg = GP::$translation_set-&gt;create( array( 'name' =&gt; 'Set', 'slug' =&gt; 'default', 'project_id' =&gt; $sub-&gt;id, 'locale' =&gt; 'bg') );
</span><span class="cx">                 $set_root_en = GP::$translation_set-&gt;create( array( 'name' =&gt; 'Set', 'slug' =&gt; 'default', 'project_id' =&gt; $root-&gt;id, 'locale' =&gt; 'en') );
</span><span class="lines">@@ -78,9 +78,9 @@
</span><span class="cx">                 $this-&gt;assertFalse( (bool)$user-&gt;can( 'approve', 'translation-set', $set_root_bg_slug-&gt;id ) );
</span><span class="cx">                 $this-&gt;assertFalse( (bool)$user-&gt;can( 'approve', 'translation-set', $set_other_bg-&gt;id ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function assertEqualPermissions( $expected, $actual ) {
</span><span class="cx">                 $fields = $actual-&gt;fields();
</span><span class="cx">                 unset($fields['id']);
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkttest_pophp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_po.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_po.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_po.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">         function test_poify() {
</span><span class="cx">                 //simple
</span><span class="cx">                 $this-&gt;assertEquals('&quot;baba&quot;', PO::poify('baba'));
</span><del>-                //long word                
</del><ins>+                //long word
</ins><span class="cx">                 $this-&gt;assertEquals($this-&gt;po_a90, PO::poify($this-&gt;a90));
</span><span class="cx">                 // tab
</span><span class="cx">                 $this-&gt;assertEquals('&quot;ba\tba&quot;', PO::poify(&quot;ba\tba&quot;));
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;assertEquals($this-&gt;po_mail, PO::poify($this-&gt;mail));
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_unpoify() {
</span><span class="cx">                 $this-&gt;assertEquals('baba', PO::unpoify('&quot;baba&quot;'));
</span><span class="cx">                 $this-&gt;assertEquals(&quot;baba\ngugu&quot;, PO::unpoify('&quot;baba\n&quot;'.&quot;\t\t\t\n&quot;.'&quot;gugu&quot;'));
</span><span class="lines">@@ -171,48 +171,48 @@
</span><span class="cx">                 $po-&gt;export_to_file($temp_fn2);
</span><span class="cx">                 $this-&gt;assertEquals($po-&gt;export(), file_get_contents($temp_fn2));
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_import_from_file() {
</span><span class="cx">                 $po = new PO();
</span><span class="cx">                 $res = $po-&gt;import_from_file('data/simple.po');
</span><span class="cx">                 $this-&gt;assertEquals(true, $res);
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;assertEquals(array('Project-Id-Version' =&gt; 'WordPress 2.6-bleeding', 'Plural-Forms' =&gt; 'nplurals=2; plural=n != 1;'), $po-&gt;headers);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $simple_entry = new Translation_Entry(array('singular' =&gt; 'moon',));
</span><span class="cx">                 $this-&gt;assertEquals($simple_entry, $po-&gt;entries[$simple_entry-&gt;key()]);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $all_types_entry = new Translation_Entry(array('singular' =&gt; 'strut', 'plural' =&gt; 'struts', 'context' =&gt; 'brum',
</span><span class="cx">                         'translations' =&gt; array('ztrut0', 'ztrut1', 'ztrut2')));
</span><span class="cx">                 $this-&gt;assertEquals($all_types_entry, $po-&gt;entries[$all_types_entry-&gt;key()]);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $multiple_line_entry = new Translation_Entry(array('singular' =&gt; 'The first thing you need to do is tell Blogger to let WordPress access your account. You will be sent back here after providing authorization.', 'translations' =&gt; array(&quot;baba\ndyadogugu&quot;)));
</span><span class="cx">                 $this-&gt;assertEquals($multiple_line_entry, $po-&gt;entries[$multiple_line_entry-&gt;key()]);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $multiple_line_all_types_entry = new Translation_Entry(array('context' =&gt; 'context', 'singular' =&gt; 'singular',
</span><span class="cx">                         'plural' =&gt; 'plural', 'translations' =&gt; array('translation0', 'translation1', 'translation2')));
</span><span class="cx">                 $this-&gt;assertEquals($multiple_line_all_types_entry, $po-&gt;entries[$multiple_line_all_types_entry-&gt;key()]);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 $comments_entry = new Translation_Entry(array('singular' =&gt; 'a', 'translator_comments' =&gt; &quot;baba\nbrubru&quot;,
</span><span class="cx">                         'references' =&gt; array('wp-admin/x.php:111', 'baba:333', 'baba'), 'extracted_comments' =&gt; &quot;translators: buuu&quot;,
</span><span class="cx">                         'flags' =&gt; array('fuzzy')));
</span><span class="cx">                 $this-&gt;assertEquals($comments_entry, $po-&gt;entries[$comments_entry-&gt;key()]);
</span><del>-                        
</del><ins>+
</ins><span class="cx">                 $end_quote_entry = new Translation_Entry(array('singular' =&gt; 'a&quot;'));
</span><span class="cx">                 $this-&gt;assertEquals($end_quote_entry, $po-&gt;entries[$end_quote_entry-&gt;key()]);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_import_from_entry_file_should_give_false() {
</span><span class="cx">                 $po = new PO();
</span><span class="cx">                 $this-&gt;assertFalse( $po-&gt;import_from_file( 'data/empty.po' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_import_from_file_with_windows_line_endings_should_work_as_with_unix_line_endings() {
</span><span class="cx">                 $po = new PO();
</span><span class="cx">                 $this-&gt;assertTrue( $po-&gt;import_from_file( 'data/windows-line-endings.po' ) );
</span><span class="cx">                 $this-&gt;assertEquals( 1, count( $po-&gt;entries ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         //TODO: add tests for bad files
</span><span class="cx"> }
</span><span class="cx"> ?&gt;
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkttest_templatephp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_template.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_template.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_template.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx">         function test_gp_breadcrumb_should_return_empty_string_without_params() {
</span><span class="cx">                 $this-&gt;assertEquals( '', gp_breadcrumb() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_breadcrumb_should_run_empty_string_through_filter_without_params() {
</span><span class="cx">                 $filter = $this-&gt;getMock('Dummy', array('breadcrumb_filter'));
</span><span class="cx">                 $filter-&gt;expects( $this-&gt;once() )-&gt;method( 'breadcrumb_filter' )-&gt;with( $this-&gt;equalTo( '' ) );
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx">                 gp_breadcrumb();
</span><span class="cx">                 remove_filter( 'gp_breadcrumb', array( &amp;$filter, 'breadcrumb_filter') );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_breadcrumb_should_join_all_crumbs() {
</span><span class="cx">                 gp_breadcrumb( array( 'baba', 'dyado'), array( 'separator' =&gt; '', 'breadcrumb-template' =&gt; '{breadcrumb}' ) );
</span><span class="cx">                 $this-&gt;assertEquals( 'babadyado', gp_breadcrumb() );
</span><span class="lines">@@ -29,10 +29,10 @@
</span><span class="cx">                 $this-&gt;assertEquals( '---xxx---baba---dyado', gp_breadcrumb() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_breadcrumb_should_flatten_the_given_array_of_crumbs() {
</span><span class="cx">                 gp_breadcrumb( array( 'baba', array( 'dyado' ), 'muu' ), array( 'separator' =&gt; '', 'breadcrumb-template' =&gt; '{breadcrumb}' ) );
</span><span class="cx">                 $this-&gt;assertEquals( 'babadyadomuu', gp_breadcrumb() );
</span><del>-                
-        }        
</del><ins>+
+        }
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkttest_thingphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_thing.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_thing.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_thing.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -9,12 +9,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class GP_Test_Thing extends GP_UnitTestCase {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function setUp() {
</span><span class="cx">                 parent::setUp();
</span><span class="cx">                 $this-&gt;t = new GP_My_Table;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_sql_condition_from_php_value() {
</span><span class="cx">                 $this-&gt;assertEquals( '= 5', $this-&gt;t-&gt;sql_condition_from_php_value( 5 ) );
</span><span class="cx">                 $this-&gt;assertEquals( '= 5', $this-&gt;t-&gt;sql_condition_from_php_value( '5' ) );
</span><span class="lines">@@ -23,12 +23,12 @@
</span><span class="cx">                 $this-&gt;assertEquals( array('= 5', '= 10'), $this-&gt;t-&gt;sql_condition_from_php_value( array( 5, 10 ) ) );
</span><span class="cx">                 $this-&gt;assertEquals( array(&quot;= 'baba'&quot;, &quot;= 10&quot;, &quot;= 'don\\'t'&quot;), $this-&gt;t-&gt;sql_condition_from_php_value( array( 'baba', '10', &quot;don't&quot; ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_sql_from_conditions() {
</span><span class="cx">                 $this-&gt;assertEquals( 'a = 5', $this-&gt;t-&gt;sql_from_conditions( array('a' =&gt; 5) ) );
</span><span class="cx">                 $this-&gt;assertEquals( &quot;(a = 5 OR a = 6) AND b = 'baba'&quot;, $this-&gt;t-&gt;sql_from_conditions( array('a' =&gt; array(5, 6), 'b' =&gt; 'baba' ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_sql_from_order() {
</span><span class="cx">                 $this-&gt;assertEquals( '', $this-&gt;t-&gt;sql_from_order( null ) );
</span><span class="cx">                 $this-&gt;assertEquals( '', $this-&gt;t-&gt;sql_from_order( '' ) );
</span></span></pre></div>
<a id="trunkttest_translation_entryphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_translation_entry.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_translation_entry.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_translation_entry.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> require_once('init.php');
</span><span class="cx"> 
</span><span class="cx"> class GP_Test_Translation_Entry extends GP_UnitTestCase {
</span><del>-        
</del><ins>+
</ins><span class="cx">     function test_create_entry() {
</span><span class="cx">                 // no singular =&gt; empty object
</span><span class="cx">                 $entry = new Translation_Entry();
</span></span></pre></div>
<a id="trunkttest_translationsphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_translations.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_translations.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_translations.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx">                 // add empty entry
</span><span class="cx">                 $this-&gt;assertEquals(false, $po-&gt;add_entry($empty));
</span><span class="cx">                 $this-&gt;assertEquals(array($entry-&gt;key() =&gt; $entry, $entry2-&gt;key() =&gt; $entry2), $po-&gt;entries);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // give add_entry() the arguments and let it create the entry itself
</span><span class="cx">                 $po = new Translations();
</span><span class="cx">                 $po-&gt;add_entry(array('singular' =&gt; 'baba',));
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">                 $this-&gt;assertEquals('dyadoy', $domain-&gt;translate_plural('dyado', 'dyados', 18881));
</span><span class="cx">                 $this-&gt;assertEquals('dyadoy', $domain-&gt;translate_plural('dyado', 'dyados', -18881));
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_digit_and_merge() {
</span><span class="cx">                 $entry_digit_1 = new Translation_Entry(array('singular' =&gt; 1, 'translations' =&gt; array('1')));
</span><span class="cx">                 $entry_digit_2 = new Translation_Entry(array('singular' =&gt; 2, 'translations' =&gt; array('2')));
</span></span></pre></div>
<a id="trunkttest_urlsphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_urls.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_urls.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_urls.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,20 +2,20 @@
</span><span class="cx"> require_once('init.php');
</span><span class="cx"> 
</span><span class="cx"> class GP_Test_Urls extends GP_UnitTestCase {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function setUp() {
</span><span class="cx">             $this-&gt;sub_dir = '/gp/';
</span><span class="cx">                 $this-&gt;url = 'http://example.org' . $this-&gt;sub_dir;
</span><span class="cx">                 parent::setUp();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_should_just_add_simple_path_string_if_query_is_missing() {
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;sub_dir . 'baba', gp_url( 'baba' ) );
</span><span class="cx">         }
</span><span class="cx">         function test_gp_url_should_not_add_query_string_if_query_is_empty_string() {
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;sub_dir . 'baba', gp_url( 'baba', '' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_should_not_add_query_string_if_query_is_empty_array() {
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;sub_dir . 'baba', gp_url( 'baba', array() ) );
</span><span class="cx">         }
</span><span class="lines">@@ -27,11 +27,11 @@
</span><span class="cx">         function test_gp_url_should_add_question_mark_if_query_string_does_not_have_one() {
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;sub_dir . 'baba?a=b', gp_url( 'baba', 'a=b' ) );
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         function test_gp_url_should_expand_query_array() {
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;sub_dir . '?a=b', gp_url( '', array('a' =&gt; 'b') ) );
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         function test_gp_url_should_add_ampersand_if_path_is_empty_and_query_array_has_more_than_one_value() {
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;sub_dir . '?a=b&amp;b=c', gp_url( '', array('a' =&gt; 'b', 'b' =&gt; 'c') ) );
</span><span class="cx">         }
</span><span class="lines">@@ -39,31 +39,31 @@
</span><span class="cx">         function test_gp_url_should_add_ampersand_if_query_array_has_more_than_one_value() {
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;sub_dir . 'baba?a=b&amp;b=c', gp_url( 'baba', array('a' =&gt; 'b', 'b' =&gt; 'c') ) );
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         function test_gp_url_should_not_add_double_slash_if_path_starts_with_slash() {
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;sub_dir . 'baba/wink', gp_url( '/baba/wink' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_should_urlencode_query_var_values() {
</span><span class="cx">                 $this-&gt;assertEquals( $this-&gt;sub_dir . 'baba?a=a%26b&amp;b=c', gp_url( 'baba', array('a' =&gt; 'a&amp;b', 'b' =&gt; 'c') ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_return_the_string_if_single_string_without_slashes_is_passed() {
</span><span class="cx">                 $this-&gt;assertEquals( 'baba', gp_url_join( 'baba' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_join_with_slash_two_strings_without_slashes() {
</span><span class="cx">                 $this-&gt;assertEquals( 'baba/dyado', gp_url_join( 'baba', 'dyado' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_include_only_one_slash_if_first_string_ends_with_slash_and_next_begins_with_slash() {
</span><span class="cx">                 $this-&gt;assertEquals( 'baba/dyado', gp_url_join( 'baba/', '/dyado' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_discard_multiple_slashes_in_the_end_of_component() {
</span><span class="cx">                 $this-&gt;assertEquals( '/baba/dyado', gp_url_join( '/baba//', 'dyado' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_discard_multiple_slashes_in_the_beginning_of_component() {
</span><span class="cx">                 $this-&gt;assertEquals( '/baba/dyado', gp_url_join( '/baba/', '//dyado' ) );
</span><span class="cx">         }
</span><span class="lines">@@ -77,23 +77,23 @@
</span><span class="cx">                         $this-&gt;assertEquals( '/baba/', gp_url_join( '/', '/baba/' ) );
</span><span class="cx">                         $this-&gt;assertEquals( '/baba/', gp_url_join( '//', '/baba/' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_return_only_one_slash_if_the_only_component_is_a_slash() {
</span><span class="cx">                 $this-&gt;assertEquals( '/', gp_url_join( '/' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_return_only_one_slash_if_all_components_are_slashes() {
</span><span class="cx">                 $this-&gt;assertEquals( '/', gp_url_join( '/', '/' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_return_only_one_slash_if_all_components_are_multiple_slashes() {
</span><span class="cx">                 $this-&gt;assertEquals( '/', gp_url_join( '///', '///' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_skip_empty_components() {
</span><span class="cx">                 $this-&gt;assertEquals( 'a/b', gp_url_join( 'a', '', 'b' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_skip_empty_components_in_the_beginning() {
</span><span class="cx">                 $this-&gt;assertEquals( 'a/b', gp_url_join( '', 'a', 'b' ) );
</span><span class="cx">         }
</span><span class="lines">@@ -101,23 +101,23 @@
</span><span class="cx">         function test_gp_url_join_should_skip_empty_components_in_the_end() {
</span><span class="cx">                 $this-&gt;assertEquals( 'a/b', gp_url_join( 'a', 'b', '' ) );
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_accept_array_component_with_one_element_and_return_this_element() {
</span><span class="cx">                 $this-&gt;assertEquals( 'baba', gp_url_join( array( 'baba' ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_join_array_component_values_as_if_they_were_given_as_different_arguments() {
</span><span class="cx">                 $this-&gt;assertEquals( 'baba/dyado', gp_url_join( array( 'baba', 'dyado' ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_flatten_nested_arrays() {
</span><span class="cx">                 $this-&gt;assertEquals( 'baba/dyado/chicho/lelya', gp_url_join( array( 'baba', array( 'dyado', array( 'chicho' ), 'lelya' ) ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_return_empty_string_with_nested_empty_arrays() {
</span><span class="cx">                 $this-&gt;assertEquals( '', gp_url_join( array( array() ), array() ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_join_should_not_break_http() {
</span><span class="cx">                 $this-&gt;assertEquals( 'http://dir.bg/baba', gp_url_join( 'http://dir.bg/', 'baba' ) );
</span><span class="cx">         }
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">         function test_gp_url_join_should_not_break_https() {
</span><span class="cx">                 $this-&gt;assertEquals( 'https://dir.bg/baba', gp_url_join( 'https://dir.bg/', 'baba' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_gp_url_project_should_join_its_arguments() {
</span><span class="cx">                 $url_from_gp_url_project = gp_url_project( '/x', 'import-originals' );
</span><span class="cx">                 $url_manually_joined = gp_url_join( gp_url_project( '/x' ), 'import-originals' );
</span><span class="lines">@@ -135,5 +135,5 @@
</span><span class="cx">                 $url_from_gp_url_project = gp_url_project( '/x', array( 'slug', 'slugslug', 'import-translations' ) );
</span><span class="cx">                 $url_manually_joined = gp_url_join( gp_url_project( '/x' ), 'slug', 'slugslug', 'import-translations' );
</span><span class="cx">                 $this-&gt;assertEquals( $url_manually_joined, $url_from_gp_url_project );
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkttest_userphp"></a>
<div class="modfile"><h4>Modified: trunk/t/test_user.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/test_user.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/test_user.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> require_once('init.php');
</span><span class="cx"> 
</span><span class="cx"> class GP_Test_User extends GP_UnitTestCase {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_can() {
</span><span class="cx">                 $user = $this-&gt;factory-&gt;user-&gt;create();
</span><span class="cx">                 $set_1_permission = array( 'user_id' =&gt; $user-&gt;id, 'action' =&gt; 'write', 'object_type' =&gt; 'translation-set', 'object_id' =&gt; 1 );
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">                 $this-&gt;assertFalse( $user-&gt;can( 'write', 'translation-set' ) );
</span><span class="cx">                 $this-&gt;assertFalse( $user-&gt;can( 'write' ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_admin_should_be_admin() {
</span><span class="cx">                 $admin_user = $this-&gt;factory-&gt;user-&gt;create_admin();
</span><span class="cx">                 $this-&gt;assertTrue( $admin_user-&gt;admin() );
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">                 $this-&gt;assertTrue( $admin_user-&gt;can( 'milk', 'a cow' ) );
</span><span class="cx">                 $this-&gt;assertTrue( $admin_user-&gt;can( 'milk', 'a cow', 5 ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_non_admin_should_not_be_able_to_do_random_actions() {
</span><span class="cx">                 $nonadmin_user = $this-&gt;factory-&gt;user-&gt;create();
</span><span class="cx">                 $this-&gt;assertFalse( $nonadmin_user-&gt;can( 'milk', 'a cow' ) );
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">                 $from_db = GP::$user-&gt;by_login( 'pijo' );
</span><span class="cx">                 $this-&gt;assertEquals( $user-&gt;id, $from_db-&gt;id );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_get() {
</span><span class="cx">                 $user = $this-&gt;factory-&gt;user-&gt;create();
</span><span class="cx">                 $from_db = GP::$user-&gt;get( $user );
</span><span class="lines">@@ -52,14 +52,14 @@
</span><span class="cx">                 $user-&gt;set_meta( 'int', 5 );
</span><span class="cx">                 $this-&gt;assertEquals( 5, $user-&gt;get_meta( 'int') );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_delete_meta_should_delete_the_meta() {
</span><span class="cx">                 $user = $this-&gt;factory-&gt;user-&gt;create();
</span><del>-                $user-&gt;set_meta( 'int', 5 );                
</del><ins>+                $user-&gt;set_meta( 'int', 5 );
</ins><span class="cx">                 $user-&gt;delete_meta( 'int' );
</span><span class="cx">                 $this-&gt;assertEquals( null, $user-&gt;get_meta( 'int') );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_setting_array_value_as_meta_should_come_out_as_an_array() {
</span><span class="cx">                 $user = $this-&gt;factory-&gt;user-&gt;create();
</span><span class="cx">                 $user-&gt;set_meta( 'mixed', array(1, 2, 3) );
</span></span></pre></div>
<a id="trunkttests_routestest_route_translation_setphp"></a>
<div class="modfile"><h4>Modified: trunk/t/tests_routes/test_route_translation_set.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/tests_routes/test_route_translation_set.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/tests_routes/test_route_translation_set.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -3,51 +3,51 @@
</span><span class="cx"> 
</span><span class="cx"> class GP_Test_Route_Translation_Set extends GP_UnitTestCase_Route {
</span><span class="cx">         var $route_class = 'GP_Route_Translation_Set';
</span><del>-        
</del><ins>+
</ins><span class="cx">         function setUp() {
</span><span class="cx">                 parent::setUp();
</span><span class="cx">                 $this-&gt;set = $this-&gt;factory-&gt;translation_set-&gt;create_with_project_and_locale();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_single_with_a_non_existent_set_gives_404() {
</span><span class="cx">                 $this-&gt;route-&gt;single( 11 );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_single_redirects_to_existing_set() {
</span><span class="cx">                 $set = $this-&gt;factory-&gt;translation_set-&gt;create_with_project_and_locale( array( 'slug' =&gt; 'baba' ) );
</span><span class="cx">                 $this-&gt;route-&gt;single( $set-&gt;id );
</span><span class="cx">                 $this-&gt;assertRedirectURLContains( 'baba' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_new_get_forbidden_redirect_if_not_logged_in() {
</span><span class="cx">                 $this-&gt;route-&gt;new_get();
</span><span class="cx">                 $this-&gt;assertNotAllowedRedirect();
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         function test_new_get_forbidden_redirect_if_logged_in_but_without_sufficient_permissions() {
</span><span class="cx">                 $this-&gt;set_normal_user_as_current();
</span><span class="cx">                 $this-&gt;route-&gt;new_get();
</span><span class="cx">                 $this-&gt;assertNotAllowedRedirect();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_new_get_admin_can_view_the_form() {
</span><span class="cx">                 $this-&gt;set_admin_user_as_current();
</span><span class="cx">                 $this-&gt;route-&gt;new_get();
</span><span class="cx">                 $this-&gt;assertTemplateLoadedIs( 'translation-set-new' );
</span><span class="cx">                 $this-&gt;assertTemplateOutputNotEmpty();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_new_post_forbidden_redirect_if_not_logged_in() {
</span><span class="cx">                 $this-&gt;route-&gt;new_post();
</span><span class="cx">                 $this-&gt;assertNotAllowedRedirect();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_new_post_forbidden_redirect_if_logged_in_but_without_sufficient_permissions() {
</span><span class="cx">                 $this-&gt;set_normal_user_as_current();
</span><span class="cx">                 $this-&gt;route-&gt;new_post();
</span><span class="cx">                 $this-&gt;assertNotAllowedRedirect();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_new_post_invalid_redirect_if_empty_set() {
</span><span class="cx">                 $this-&gt;set_admin_user_as_current();
</span><span class="cx">                 $this-&gt;route-&gt;new_post();
</span><span class="lines">@@ -62,53 +62,53 @@
</span><span class="cx">                 $this-&gt;route-&gt;new_post();
</span><span class="cx">                 $this-&gt;assertErrorRedirect();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_new_post_should_add_notice_if_create_was_successful() {
</span><del>-                $this-&gt;set_admin_user_as_current();                
</del><ins>+                $this-&gt;set_admin_user_as_current();
</ins><span class="cx">                 $_POST['set'] = $this-&gt;factory-&gt;translation_set-&gt;generate_args();
</span><span class="cx">                 $this-&gt;route-&gt;new_post();
</span><span class="cx">                 $this-&gt;assertThereIsANoticeContaining( 'created' );
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         function test_edit_get_forbidden_redirect_if_not_logged_in() {
</span><span class="cx">                 $this-&gt;route-&gt;edit_get( $this-&gt;set-&gt;id );
</span><span class="cx">                 $this-&gt;assertNotAllowedRedirect();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_edit_get_forbidden_redirect_if_logged_in_but_without_sufficient_permissions() {
</span><span class="cx">                 $this-&gt;set_normal_user_as_current();
</span><span class="cx">                 $this-&gt;route-&gt;edit_get( $this-&gt;set-&gt;id );
</span><span class="cx">                 $this-&gt;assertNotAllowedRedirect();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_edit_get_admin_can_view_the_form() {
</span><span class="cx">                 $this-&gt;set_admin_user_as_current();
</span><span class="cx">                 $this-&gt;route-&gt;edit_get( $this-&gt;set-&gt;id );
</span><span class="cx">                 $this-&gt;assertTemplateLoadedIs( 'translation-set-edit' );
</span><span class="cx">                 $this-&gt;assertTemplateOutputNotEmpty();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_edit_post_with_a_non_existent_set_gives_404() {
</span><span class="cx">                 $this-&gt;route-&gt;edit_post( 11 );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_edit_post_forbidden_redirect_if_not_logged_in() {
</span><span class="cx">                 $this-&gt;route-&gt;edit_post( $this-&gt;set-&gt;id );
</span><span class="cx">                 $this-&gt;assertNotAllowedRedirect();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_edit_post_forbidden_redirect_if_logged_in_but_without_sufficient_permissions() {
</span><span class="cx">                 $this-&gt;set_normal_user_as_current();
</span><span class="cx">                 $this-&gt;route-&gt;edit_post( $this-&gt;set-&gt;id );
</span><span class="cx">                 $this-&gt;assertNotAllowedRedirect();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_edit_post_invalid_redirect_if_empty_set() {
</span><span class="cx">                 $this-&gt;set_admin_user_as_current();
</span><span class="cx">                 $this-&gt;route-&gt;edit_post( $this-&gt;set-&gt;id );
</span><span class="cx">                 $this-&gt;assertInvalidRedirect();
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_edit_post_invalid_redirect_if_missing_name() {
</span><span class="cx">                 $this-&gt;set_admin_user_as_current();
</span><span class="cx">                 $_POST['set'] = $this-&gt;factory-&gt;translation_set-&gt;generate_args();
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx">                 $this-&gt;route-&gt;edit_post( $this-&gt;set-&gt;id );
</span><span class="cx">                 $this-&gt;assertThereIsANoticeContaining( 'updated' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_edit_post_error_redirect_if_create_was_unsuccessful() {
</span><span class="cx">                 $this-&gt;set_admin_user_as_current();
</span><span class="cx">                 GP::$translation_set = $this-&gt;getMock( 'GP_Translation_Set', array( 'update' ) );
</span></span></pre></div>
<a id="trunkttests_testlibtest_default_factoriesphp"></a>
<div class="modfile"><h4>Modified: trunk/t/tests_testlib/test_default_factories.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/tests_testlib/test_default_factories.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/tests_testlib/test_default_factories.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -7,13 +7,13 @@
</span><span class="cx">                 $project = $project_factory-&gt;create();
</span><span class="cx">                 $this-&gt;assertEquals( 'Project 1', $project-&gt;name );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_project_factory_original() {
</span><span class="cx">                 $original_factory = new GP_UnitTest_Factory_For_Original;
</span><span class="cx">                 $original = $original_factory-&gt;create();
</span><span class="cx">                 $this-&gt;assertEquals( 'Original 1', $original-&gt;singular );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_locale_factory_create() {
</span><span class="cx">                 $locale_factory =  new GP_UnitTest_Factory_For_Locale;
</span><span class="cx">                 $locale = $locale_factory-&gt;create();
</span></span></pre></div>
<a id="trunkttests_testlibtest_factoryphp"></a>
<div class="modfile"><h4>Modified: trunk/t/tests_testlib/test_factory.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/tests_testlib/test_factory.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/tests_testlib/test_factory.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -3,9 +3,9 @@
</span><span class="cx"> 
</span><span class="cx"> class GP_Thing_Test_Factory {
</span><span class="cx">         function create( $args ) {
</span><del>-                
</del><ins>+
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function save( $args ) {
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -16,10 +16,10 @@
</span><span class="cx">                 $thing = (object)compact( 'field_names' );
</span><span class="cx">                 $factory = new GP_UnitTest_Factory_For_Thing( null, $thing, $defaults );
</span><span class="cx">                 return $factory;
</span><del>-        }        
-        
</del><ins>+        }
+
</ins><span class="cx">         function test_generator_sequence_should_start_with_1() {
</span><del>-                $sequence = new GP_UnitTest_Generator_Sequence();                
</del><ins>+                $sequence = new GP_UnitTest_Generator_Sequence();
</ins><span class="cx">                 $this-&gt;assertEquals( 1, $sequence-&gt;next() );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -30,24 +30,24 @@
</span><span class="cx">                 $this-&gt;assertEquals( 3, $sequence-&gt;next() );
</span><span class="cx">                 $this-&gt;assertEquals( 4, $sequence-&gt;next() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_generator_sequence_should_include_value_in_template() {
</span><span class="cx">                 $sequence = new GP_UnitTest_Generator_Sequence( 'Baba %s Dyado' );
</span><span class="cx">                 $this-&gt;assertEquals( 'Baba 1 Dyado', $sequence-&gt;next() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_generator_sequence_should_start_with_2() {
</span><span class="cx">                 $sequence = new GP_UnitTest_Generator_Sequence( '%s', 2 );
</span><del>-                $this-&gt;assertEquals( 2, $sequence-&gt;next() );                
</del><ins>+                $this-&gt;assertEquals( 2, $sequence-&gt;next() );
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_generator_sequence_should_generate_consecutive_values_in_template() {
</span><span class="cx">                 $sequence = new GP_UnitTest_Generator_Sequence( 'Baba %s' );
</span><span class="cx">                 $this-&gt;assertEquals( 'Baba 1', $sequence-&gt;next() );
</span><span class="cx">                 $this-&gt;assertEquals( 'Baba 2', $sequence-&gt;next() );
</span><span class="cx">                 $this-&gt;assertEquals( 'Baba 3', $sequence-&gt;next() );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_generator_locale_name_should_start_with_aa() {
</span><span class="cx">                 $locale_name = new GP_UnitTest_Generator_Locale_Name;
</span><span class="cx">                 $this-&gt;assertEquals( 'aa', $locale_name-&gt;next() );
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">                 $factory = $this-&gt;create_factory( array('name') );
</span><span class="cx">                 $this-&gt;assertEquals( array('name' =&gt; 'default'), $factory-&gt;generate_args( array(), array( 'name' =&gt; 'default' ) ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_factory_for_thing_generate_args_should_use_generator() {
</span><span class="cx">                 $generator_stub = $this-&gt;getMock( 'GP_UnitTest_Generator_Sequence' );
</span><span class="cx">                 $generator_stub-&gt;expects( $this-&gt;exactly( 2 ) )-&gt;method( 'next' )-&gt;will( $this-&gt;onConsecutiveCalls( 'name 1', 'name 2' ) );
</span><span class="lines">@@ -95,13 +95,13 @@
</span><span class="cx">         function test_factory_for_thing_generate_args_should_return_error_on_bad_default_value() {
</span><span class="cx">                 $factory = $this-&gt;create_factory( array('name') );
</span><span class="cx">                 $this-&gt;assertWPError( $factory-&gt;generate_args( array(), array( 'name' =&gt; array( 'non-scalar default value' ) ) ) );
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> 
</span><span class="cx">         function test_factory_for_thing_generate_args_should_use_default_generator_definition_if_non_given() {
</span><span class="cx">                 $factory = $this-&gt;create_factory( array('name'), array('name' =&gt; 'default') );
</span><span class="cx">                 $this-&gt;assertEquals( array('name' =&gt; 'default'), $factory-&gt;generate_args( array() ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_factory_for_thing_create_should_call_create_once() {
</span><span class="cx">                 $factory = $this-&gt;create_factory();
</span><span class="cx">                 $create_args = array( 'name' =&gt; 'value' );
</span><span class="lines">@@ -109,14 +109,14 @@
</span><span class="cx">                 $factory-&gt;thing = $thing;
</span><span class="cx">                 $factory-&gt;create( $create_args );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         private function create_thing_mock_with_name_field_and_with_create_which_should_be_called_once_with( $expected_create_args ) {
</span><span class="cx">                 $thing = $this-&gt;getMock( 'GP_Thing_Test_Factory' );
</span><span class="cx">                 $thing-&gt;field_names = array('name');
</span><span class="cx">                 $thing-&gt;expects( $this-&gt;once() )-&gt;method( 'create' )-&gt;with( $this-&gt;equalTo( $expected_create_args ) );
</span><span class="cx">                 return $thing;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_factory_for_thing_create_should_use_function_generator() {
</span><span class="cx">                 $generation_defintions = array(
</span><span class="cx">                         'full_name' =&gt; GP_UnitTest_Factory_For_Thing::callback( create_function( '$o', 'return $o-&gt;name . &quot; baba&quot;;' ) ),
</span><span class="lines">@@ -139,5 +139,5 @@
</span><span class="cx">                 $created_thing-&gt;expects( $this-&gt;once() )-&gt;method( 'save' )-&gt;with( $this-&gt;equalTo( $expected_save_args ) );
</span><span class="cx">                 $thing-&gt;expects( $this-&gt;once() )-&gt;method( 'create' )-&gt;will( $this-&gt;returnValue( $created_thing ) );
</span><span class="cx">                 return $thing;
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkttests_thingstest_thing_originalphp"></a>
<div class="modfile"><h4>Modified: trunk/t/tests_things/test_thing_original.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/tests_things/test_thing_original.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/tests_things/test_thing_original.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -9,11 +9,11 @@
</span><span class="cx">         function update( $data, $where = null ) {
</span><span class="cx">                 $GLOBALS['update_invocation_count']++;
</span><span class="cx">                 return parent::update( $data, $where );
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class GP_Test_Thing_Original extends GP_UnitTestCase {
</span><del>-        
</del><ins>+
</ins><span class="cx">         function create_original_with_update_counter( $original_args = array() ) {
</span><span class="cx">                 $project = $this-&gt;factory-&gt;project-&gt;create();
</span><span class="cx">                 /* We are doing it this hackish way, because I could not make the PHPUnit mocker to count the update() invocations */
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx">                 $original-&gt;reload();
</span><span class="cx">                 return array( $project, $original );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function create_translations_with( $entries ) {
</span><span class="cx">                 $translations = new Translations;
</span><span class="cx">                 foreach( $entries as $entry ) {
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">                 $original-&gt;import_for_project( $project, $translations );
</span><span class="cx">                 $this-&gt;assertEquals( 0, $GLOBALS['update_invocation_count'], 'update should be invoked only 2 times' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_import_for_project_should_update_changed_originals() {
</span><span class="cx">                 list( $project, $original ) = $this-&gt;create_original_with_update_counter( array(
</span><span class="cx">                         'comment' =&gt; 'Some comment'
</span><span class="lines">@@ -47,24 +47,24 @@
</span><span class="cx">                 $translations = $this-&gt;create_translations_with( array( array( 'singular' =&gt; $original-&gt;singular ) ) );
</span><span class="cx">                 $original-&gt;import_for_project( $project, $translations );
</span><span class="cx">                 $this-&gt;assertEquals( 1, $GLOBALS['update_invocation_count'], 'update should be invoked 3 times' );
</span><del>-        }        
-        
</del><ins>+        }
+
</ins><span class="cx">         function test_should_be_updated_with_should_return_true_if_only_singular_is_for_update_and_it_is_the_same() {
</span><span class="cx">                 $original = $this-&gt;factory-&gt;original-&gt;create();
</span><span class="cx">                 $this-&gt;assertFalse( GP::$original-&gt;should_be_updated_with( array( 'singular' =&gt; $original-&gt;singular ), $original ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_should_be_updated_with_should_return_true_if_one_value_is_empty_string_and_the_other_is_null() {
</span><span class="cx">                 $original = $this-&gt;factory-&gt;original-&gt;create( array( 'comment' =&gt; NULL ) );
</span><span class="cx">                 $this-&gt;assertFalse( GP::$original-&gt;should_be_updated_with( array( 'singular' =&gt; $original-&gt;singular, 'comment' =&gt; '' ), $original ) );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_should_be_updated_with_should_use_this_if_second_argument_is_not_supplied() {
</span><span class="cx">                 $original = $this-&gt;factory-&gt;original-&gt;create();
</span><span class="cx">                 $data = array( 'singular' =&gt; 'baba' );
</span><span class="cx">                 $this-&gt;assertEquals( GP::$original-&gt;should_be_updated_with( $data, $original ), $original-&gt;should_be_updated_with( $data )  );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_import_should_leave_unchanged_strings_as_active() {
</span><span class="cx">                 $project = $this-&gt;factory-&gt;project-&gt;create();
</span><span class="cx">                 $original = $this-&gt;factory-&gt;original-&gt;create( array( 'project_id' =&gt; $project-&gt;id, 'status' =&gt; '+active', 'singular' =&gt; 'baba' ) );
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">                 $this-&gt;assertEquals( 1, count( $originals_for_project ) );
</span><span class="cx">                 $this-&gt;assertEquals( 'baba', $originals_for_project[0]-&gt;singular );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_import_should_remove_from_active_missing_strings() {
</span><span class="cx">                 $project = $this-&gt;factory-&gt;project-&gt;create();
</span><span class="cx">                 $original = $this-&gt;factory-&gt;original-&gt;create( array( 'project_id' =&gt; $project-&gt;id, 'status' =&gt; '+active' ) );
</span><span class="lines">@@ -82,5 +82,5 @@
</span><span class="cx">                 $original-&gt;import_for_project( $project, new Translations );
</span><span class="cx">                 $originals_for_project = $original-&gt;by_project_id( $project-&gt;id );
</span><span class="cx">                 $this-&gt;assertEquals( 0, count( $originals_for_project ) );
</span><del>-        }        
</del><ins>+        }
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkttests_thingstest_thing_projectphp"></a>
<div class="modfile"><h4>Modified: trunk/t/tests_things/test_thing_project.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/tests_things/test_thing_project.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/tests_things/test_thing_project.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx">                 $this-&gt;assertEquals( 'root/cool/p2', $p2-&gt;path);
</span><span class="cx">                 $this-&gt;assertEquals( 'root/cool/p2/p3', $p3-&gt;path);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_valid_path_on_create() {
</span><span class="cx">                 $root = GP::$project-&gt;create( array( 'name' =&gt; 'Root', 'slug' =&gt; 'root', 'path' =&gt; 'root' ) );
</span><span class="cx">                 $p1 = GP::$project-&gt;create( array( 'name' =&gt; 'P1', 'slug' =&gt; 'p1', 'parent_project_id' =&gt; $root-&gt;id ) );
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">                 $this-&gt;assertEquals( 'root/p1', $p1-&gt;path );
</span><span class="cx">                 $this-&gt;assertEquals( 'invader', $q-&gt;path );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_save_no_args() {
</span><span class="cx">                 $p1 = GP::$project-&gt;create( array( 'name' =&gt; 'P1', 'slug' =&gt; 'p1', 'path' =&gt; 'p1', ) );
</span><span class="cx">                 $id = $p1-&gt;id;
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">                 $this-&gt;assertEquals( 'P2', $p1-&gt;name );
</span><span class="cx">                 $this-&gt;assertEquals( 'P2', GP::$project-&gt;get( $id )-&gt;name );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_reload() {
</span><span class="cx">                 global $gpdb;
</span><span class="cx">                 $root = GP::$project-&gt;create( array( 'name' =&gt; 'Root', 'slug' =&gt; 'root'  ) );
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">                 $root-&gt;reload();
</span><span class="cx">                 $this-&gt;assertEquals( 'Buuu', $root-&gt;name );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_path_to_root() {
</span><span class="cx">                 $root = $this-&gt;factory-&gt;project-&gt;create( array( 'name' =&gt; 'Root' ) );
</span><span class="cx">                 $sub = $this-&gt;factory-&gt;project-&gt;create( array( 'name' =&gt; 'Sub', 'parent_project_id' =&gt; $root-&gt;id ) );
</span></span></pre></div>
<a id="trunkttests_thingstest_thing_translationphp"></a>
<div class="modfile"><h4>Modified: trunk/t/tests_things/test_thing_translation.php (717 => 718)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/t/tests_things/test_thing_translation.php        2012-10-31 00:23:28 UTC (rev 717)
+++ trunk/t/tests_things/test_thing_translation.php        2012-10-31 00:32:02 UTC (rev 718)
</span><span class="lines">@@ -7,14 +7,14 @@
</span><span class="cx">                 $translation = $this-&gt;factory-&gt;translation-&gt;create( $plurals );
</span><span class="cx">                 $this-&gt;assertEqualFields( $translation, $plurals );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_translation_should_write_all_6_plurals_to_database() {
</span><span class="cx">                 $plurals = array( 'translation_0' =&gt; 'Zero', 'translation_1' =&gt; 'One', 'translation_2' =&gt; 'Two', 'translation_3' =&gt; 'Three', 'translation_4' =&gt; 'Four', 'translation_5' =&gt; 'Five' );
</span><span class="cx">                 $translation = $this-&gt;factory-&gt;translation-&gt;create( $plurals );
</span><span class="cx">                 $translation-&gt;reload();
</span><span class="cx">                 $this-&gt;assertEqualFields( $translation, $plurals );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_for_translation_shouldnt_exclude_originals_with_rejected_translation_if_status_has_untranslated() {
</span><span class="cx">                 $set = $this-&gt;factory-&gt;translation_set-&gt;create_with_project_and_locale();
</span><span class="cx">                 $translation = $this-&gt;factory-&gt;translation-&gt;create_with_original_for_translation_set( $set );
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">                 $this-&gt;assertEquals( 1, count( $for_translation ) );
</span><span class="cx">                 $this-&gt;assertEquals( null, $for_translation[0]-&gt;id );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_for_translation_should_include_untranslated_by_default() {
</span><span class="cx">                 $set = $this-&gt;factory-&gt;translation_set-&gt;create_with_project_and_locale();
</span><span class="cx">                 $original1 = $this-&gt;factory-&gt;original-&gt;create( array( 'project_id' =&gt; $set-&gt;project_id ) );
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">                 $this-&gt;assertEquals( null, $for_translation[0]-&gt;id );
</span><span class="cx">                 $this-&gt;assertEquals( $translation1-&gt;id, $for_translation[1]-&gt;id );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_for_translation_should_not_include_old_by_default() {
</span><span class="cx">                 $set = $this-&gt;factory-&gt;translation_set-&gt;create_with_project_and_locale();
</span><span class="cx">                 $original1 = $this-&gt;factory-&gt;original-&gt;create( array( 'project_id' =&gt; $set-&gt;project_id ) );
</span><span class="lines">@@ -47,8 +47,8 @@
</span><span class="cx">                 $this-&gt;assertEquals( null, $for_translation[0]-&gt;id );
</span><span class="cx">                 $this-&gt;assertEquals( $translation1_current-&gt;id, $for_translation[1]-&gt;id );
</span><span class="cx">         }
</span><del>-        
-        
</del><ins>+
+
</ins><span class="cx">         function test_for_translation_should_not_include_untranslated_for_single_status() {
</span><span class="cx">                 $set = $this-&gt;factory-&gt;translation_set-&gt;create_with_project_and_locale();
</span><span class="cx">                 $original1 = $this-&gt;factory-&gt;original-&gt;create( array( 'project_id' =&gt; $set-&gt;project_id ) );
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">                 $this-&gt;assertEquals( 1, count( $for_translation ) );
</span><span class="cx">                 $this-&gt;assertEquals( $translation1-&gt;id, $for_translation[0]-&gt;id );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         function test_for_export_should_include_untranslated() {
</span><span class="cx">                 $set = $this-&gt;factory-&gt;translation_set-&gt;create_with_project_and_locale();
</span><span class="cx">                 $original1 = $this-&gt;factory-&gt;original-&gt;create( array( 'project_id' =&gt; $set-&gt;project_id ) );
</span><span class="lines">@@ -67,6 +67,6 @@
</span><span class="cx">                 $for_export = GP::$translation-&gt;for_export( $set-&gt;project, $set, 0, array('status' =&gt; 'current'), array('by' =&gt; 'translation', 'how' =&gt; 'asc') );
</span><span class="cx">                 $this-&gt;assertEquals( 2, count( $for_export ) );
</span><span class="cx">                 $this-&gt;assertEquals( $translation1-&gt;id, $for_export[0]-&gt;id );
</span><del>-                
</del><ins>+
</ins><span class="cx">         }
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>