Index: connectors/l10n_drupalorg/l10n_drupalorg.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/connectors/l10n_drupalorg/Attic/l10n_drupalorg.admin.inc,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 l10n_drupalorg.admin.inc
--- connectors/l10n_drupalorg/l10n_drupalorg.admin.inc	15 Oct 2008 15:04:09 -0000	1.1.2.1
+++ connectors/l10n_drupalorg/l10n_drupalorg.admin.inc	27 Mar 2009 18:20:01 -0000
@@ -44,21 +44,21 @@ function l10n_drupalorg_settings_form() 
 function l10n_drupalorg_scan($automated = FALSE) {
   include_once 'projects.inc';
   include_once drupal_get_path('module', 'l10n_community') .'/extractor.inc';
-  
+
   // Always update full project list.
   l10n_drupalorg_sync_projects();
-  
+
   // Pick the projects we did not update for the longest period and sync fresh release list.
   $result = db_query_range("SELECT * FROM {l10n_community_project} WHERE connector_module = 'l10n_drupalorg' AND status = 1 ORDER BY last_parsed ASC", 0, variable_get('l10n_drupalorg_limit', 1));
   while ($project = db_fetch_object($result)) {
     l10n_drupalorg_sync_releases($project);
-    
+
     // Pick the release we did not update for the longest period, and sync the tarball.
     // We should only look for releases with downloads. Placeholder releases for later
     // versions should not be considered.
     $release = db_fetch_object(db_query_range("SELECT r.* FROM {l10n_community_project} p LEFT JOIN {l10n_community_release} r ON p.pid = r.pid WHERE p.pid = %d AND r.download_link != '' ORDER BY r.last_parsed ASC", $project->pid, 0, 1));
     $result = l10n_drupalorg_sync_files($release);
-    
+
     if (!$automated) {
       // User feedback, if not automated. Log messages are already done.
       if (isset($result['error'])) {
@@ -69,7 +69,7 @@ function l10n_drupalorg_scan($automated 
       }
     }
   }
-  
+
   // Ensure that a Drupal page will be displayed with the messages.
   return '';
 }
Index: connectors/l10n_drupalorg/l10n_drupalorg.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/connectors/l10n_drupalorg/Attic/l10n_drupalorg.module,v
retrieving revision 1.1.2.8.2.5
diff -u -p -r1.1.2.8.2.5 l10n_drupalorg.module
--- connectors/l10n_drupalorg/l10n_drupalorg.module	29 Dec 2008 14:44:45 -0000	1.1.2.8.2.5
+++ connectors/l10n_drupalorg/l10n_drupalorg.module	27 Mar 2009 18:19:56 -0000
@@ -5,7 +5,7 @@
  * @file
  *   Localization community for drupal.org.
  *
- *   Maintains a copy of project and release listings, extracts translatable 
+ *   Maintains a copy of project and release listings, extracts translatable
  *   strings from project files.
  */
 
Index: connectors/l10n_drupalorg/projects.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/connectors/l10n_drupalorg/Attic/projects.inc,v
retrieving revision 1.1.2.6.2.2
diff -u -p -r1.1.2.6.2.2 projects.inc
--- connectors/l10n_drupalorg/projects.inc	15 Oct 2008 15:04:09 -0000	1.1.2.6.2.2
+++ connectors/l10n_drupalorg/projects.inc	27 Mar 2009 18:20:10 -0000
@@ -77,17 +77,17 @@ function l10n_drupalorg_sync_projects() 
  *   Project object.
  */
 function l10n_drupalorg_sync_releases($project) {
- 
+
   // Request the update XML file with releases for this project.
   $xml = drupal_http_request(L10N_DRUPALORG_SYNC_URL .'/'. $project->uri .'/all');
   if (!$xml->data) {
     // No data, keep our lists.
     continue;
   }
-  
+
   $parser = new l10n_drupalorg_project_xml_parser;
   $releases = $parser->parse(array($xml->data));
-  
+
   if (isset($releases[$project->uri]['releases'])) {
     // We have releases to work with.
     foreach ($releases[$project->uri]['releases'] as $release) {
@@ -109,7 +109,7 @@ function l10n_drupalorg_sync_releases($p
       }
     }
   }
-  
+
   // Parsed this projects releases.
   db_query("UPDATE {l10n_community_project} SET last_parsed = %d WHERE pid = %d", time(), $project->pid);
 }
@@ -123,16 +123,16 @@ function l10n_drupalorg_sync_releases($p
 function l10n_drupalorg_sync_files($release) {
   // This could take a long time.
   @set_time_limit(0);
-  
+
   $filename = basename($release->download_link);
   $file = file_directory_temp() .'/'. $filename;
   $return = array();
-  
+
   // Nothing to do if already downloaded.
   if (file_exists($file)) {
     $error = t('File %file already exists.', array('%file' => $file));
   }
-  
+
   // Download the tar.gz file from drupal.org and save it in the local filesystem.
   elseif (!(($contents = drupal_http_request($release->download_link)) && file_put_contents($file, $contents->data))) {
     $error = t('Unable to download and save %download_link file.', array('%download_link' => $release->download_link));
Index: connectors/l10n_localpacks/l10n_localpacks.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/connectors/l10n_localpacks/Attic/l10n_localpacks.module,v
retrieving revision 1.1.2.9.2.4
diff -u -p -r1.1.2.9.2.4 l10n_localpacks.module
--- connectors/l10n_localpacks/l10n_localpacks.module	23 Oct 2008 23:04:20 -0000	1.1.2.9.2.4
+++ connectors/l10n_localpacks/l10n_localpacks.module	27 Mar 2009 18:22:28 -0000
@@ -66,7 +66,7 @@ function l10n_localpacks_cron() {
 /**
  * Settings form callback.
  *
- * @see l10n_localpacks_settings_form_validate().
+ * @see l10n_localpacks_settings_form_validate()
  */
 function l10n_localpacks_settings_form() {
   $form = array(
@@ -97,14 +97,14 @@ function l10n_localpacks_settings_form()
     '#type' => 'checkbox',
     '#default_value' => variable_get('l10n_localpacks_home_link', 0),
     '#description' => t('Assigns http://drupal.org/project/<em>project</em> type home links to projects. These home links are used to guide users to the home pages of the projects. The setting only affects newly parsed packages.'),
-  );  
+  );
   return system_settings_form($form);
 }
 
 /**
  * Validation callback for l10n_localpacks_settings_form().
  *
- * @see l10n_localpacks_settings_form().
+ * @see l10n_localpacks_settings_form()
  */
 function l10n_localpacks_settings_form_validate($form, &$form_state) {
   if (!is_dir($form_state['values']['l10n_localpacks_directory'])) {
@@ -125,7 +125,7 @@ function l10n_localpacks_scan($automated
 
   // We look for projects in the working directory.
   $workdir = variable_get('l10n_localpacks_directory', '');
-  
+
   if (!is_dir($workdir)) {
     drupal_set_message(t('The configured local packages directory (%workdir) cannot be found. <a href="@configure">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/l10n_localpacks/configure'))));
   }
@@ -134,21 +134,21 @@ function l10n_localpacks_scan($automated
     $files = file_scan_directory($workdir, '.tar.gz$');
     if (count($files)) {
       foreach ($files as $path => $file) {
-        
+
         if (!l10n_community_is_supported_version($path)) {
-          // Skip files for unsupported versions. 
+          // Skip files for unsupported versions.
           continue;
         }
-        
+
         // Get rid of $workdir prefix on file names, eg.
         // files/Drupal/drupal-4.6.7.tar.gz or
         // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.
         $path = $package = trim(preg_replace('!(^'. preg_quote($workdir, '!') .')(.+)\.tar\.gz!', '\2', $path), '/');
-        
+
         $project_title = '';
         if (strpos($path, '/')) {
           // We have a slash, so this package is in a subfolder.
-          // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8. 
+          // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.
           // Grab the directory name as project title.
           list($project_title, $package) = explode('/', $path);
         }
@@ -164,13 +164,13 @@ function l10n_localpacks_scan($automated
           $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');
         }
       }
-    }        
+    }
   }
-  
+
   $user_feedback = FALSE;
   $results = db_query_range("SELECT * FROM {l10n_community_release} WHERE pid IN (SELECT pid FROM {l10n_community_project} WHERE connector_module = 'l10n_localpacks' AND status = 1) ORDER BY last_parsed ASC", 0, variable_get('l10n_localpacks_limit', 1));
   while ($release = db_fetch_object($results)) {
-    
+
     // Only parse file if something changed since we last parsed it.
     $file_name = $workdir .'/'. $release->download_link;
 
@@ -203,7 +203,7 @@ function l10n_localpacks_scan($automated
   if (!$automated && !$user_feedback) {
     drupal_set_message(t('No (new) local packages found to scan in %workdir.', array('%workdir' => $workdir)));
   }
-  
+
   // Ensure that a Drupal page will be displayed with the messages.
   return '';
 }
@@ -248,7 +248,7 @@ function l10n_localpacks_save_data($proj
       $project_uri, $project_title, 0, (variable_get('l10n_localpacks_home_link', 0) ? ('http://drupal.org/project/'. $project_uri) : ''), 'l10n_localpacks', 1
     );
   }
-  
+
   // Grab updated project data and save release information.
   $project = db_fetch_object(db_query("SELECT * FROM {l10n_community_project} WHERE uri = '%s' AND connector_module = 'l10n_localpacks'", $project_uri));
   if ($existing_release = db_fetch_object(db_query("SELECT * FROM {l10n_community_release} WHERE pid = %d AND title = '%s'", $project->pid, $release_version))) {
Index: l10n_community/ajax.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/ajax.inc,v
retrieving revision 1.1.2.18.2.2
diff -u -p -r1.1.2.18.2.2 ajax.inc
--- l10n_community/ajax.inc	22 Oct 2008 20:28:18 -0000	1.1.2.18.2.2
+++ l10n_community/ajax.inc	27 Mar 2009 18:15:40 -0000
@@ -24,7 +24,7 @@
 function l10n_community_string_details($langcode = NULL, $sid = 0) {
   // List of project releases, where this string is used.
   $result = db_query('SELECT p.pid, p.title project_title, r.rid, r.title release_title, COUNT(l.lineno) as occurance_count FROM {l10n_community_project} p INNER JOIN {l10n_community_release} r ON p.pid = r.pid INNER JOIN {l10n_community_file} f ON r.rid = f.rid INNER JOIN {l10n_community_line} l ON f.fid = l.fid INNER JOIN {l10n_community_string} s ON l.sid = s.sid WHERE s.sid = %d GROUP BY r.rid ORDER by p.pid, r.rid', $sid);
-  
+
   $list = array();
   $output = array();
   $previous_project = '';
@@ -38,11 +38,11 @@ function l10n_community_string_details($
     else {
       $list[] = $instance->release_title .' ('. $instance->occurance_count .')';
     }
-    $previous_project = $instance->project_title; 
+    $previous_project = $instance->project_title;
   }
   $output[] = join(', ', $list);
   $usage_info = '<strong>'. t('Used in:') .'</strong>'. theme('item_list', $output);
-  
+
   // Information about translator and translation timestamp.
   $translation_info = '';
   $translation = db_fetch_object(db_query("SELECT translation, uid_entered, time_entered FROM {l10n_community_translation} WHERE language = '%s' AND sid = %d AND is_active = 1 AND is_suggestion = 0", $langcode, $sid));
@@ -50,7 +50,7 @@ function l10n_community_string_details($
     $account = user_load(array('uid' => $translation->uid_entered));
     $translation_info = t('<strong>Translated by:</strong><br /> %username at %date', array('%username' => $account->name, '%date' => format_date($translation->time_entered)));
   }
-    
+
   print $usage_info . $translation_info; // . $suggestion_info;
   exit;
 }
@@ -61,19 +61,19 @@ function l10n_community_string_suggestio
   $result = db_query("SELECT t.tid, t.sid, t.translation, t.uid_entered, t.time_entered, u.name FROM {l10n_community_translation} t LEFT JOIN {users} u ON u.uid = t.uid_entered WHERE t.language = '%s' AND t.sid = %d AND t.is_active = 1 AND t.is_suggestion = 1 ORDER BY t.time_entered", $langcode, $sid);
 
   $perm = l10n_community_get_permission($langcode);
-  while ($suggestion = db_fetch_object($result)) {    
+  while ($suggestion = db_fetch_object($result)) {
     // This detail pane is only retrieved from JS, so we are free to output obtrusive JS here.
     $token = "'". drupal_get_token('l10n_server_'. $suggestion->tid .'_'. $suggestion->sid) ."'";
-    $approve_button = $perm == L10N_PERM_ALL ? theme('l10n_community_button', 'approve', 'l10n-approve', 'onclick="l10nCommunity.approveSuggestion('. $suggestion->tid .','. $suggestion->sid .', this, '. $token .');" title="'. t('Approve suggestion.') .'"') : '';    
+    $approve_button = $perm == L10N_PERM_ALL ? theme('l10n_community_button', 'approve', 'l10n-approve', 'onclick="l10nCommunity.approveSuggestion('. $suggestion->tid .','. $suggestion->sid .', this, '. $token .');" title="'. t('Approve suggestion.') .'"') : '';
     $decline_button = $perm == L10N_PERM_ALL ? theme('l10n_community_button', 'decline', 'l10n-decline', 'onclick="l10nCommunity.declineSuggestion('. $suggestion->tid .','. $suggestion->sid .', this, '. $token .');" title="'. t('Decline suggestion.') .'"') : '';
-    
+
     // Plural versions are shown in a short form.
     // Since we no longer store an additional copy of strings in JS
     // and the null byte is stripped out by browsers (?), we need to
     // use a DOM-safe delimiter: ";  "
     $translation = strpos($suggestion->translation, "\0") ? str_replace(chr(0), ";  ", $suggestion->translation) : $suggestion->translation;
     $translation = l10n_community_format_text($translation, $suggestion->sid);
-    $suggestions[] = $translation ."<div class='l10n-approval-buttons'>". $approve_button . $decline_button .'</div><div class="l10n-suggestion-by">'. t('by %user at %date', array('%user' => (empty($suggestion->name) ? variable_get('anonymous', t('Anonymous')) : $suggestion->name), '%date' => format_date($suggestion->time_entered))) .'</div>';  
+    $suggestions[] = $translation ."<div class='l10n-approval-buttons'>". $approve_button . $decline_button .'</div><div class="l10n-suggestion-by">'. t('by %user at %date', array('%user' => (empty($suggestion->name) ? variable_get('anonymous', t('Anonymous')) : $suggestion->name), '%date' => format_date($suggestion->time_entered))) .'</div>';
   }
   if (count($suggestions)) {
     // List of suggestions.
@@ -106,7 +106,7 @@ function l10n_community_string_ajax_sugg
 
 /**
  * Records approval of a previous string suggestion.
- * 
+ *
  * This callback is invoked from JavaScript.
  *
  * @param $tid
@@ -114,7 +114,7 @@ function l10n_community_string_ajax_sugg
  */
 function l10n_community_string_approve($tid = 0) {
   global $user;
-  
+
   if ($suggestion = l10n_community_string_ajax_suggestion($tid)) {
     // Mark existing translations and suggestions as inactive in this language.
     db_query("UPDATE {l10n_community_translation} SET is_active = 0 WHERE sid = %d AND language = '%s'", $suggestion->sid, $suggestion->language);
@@ -133,7 +133,7 @@ function l10n_community_string_approve($
 
 /**
  * Records decline action of a previous string suggestion.
- * 
+ *
  * This callback is invoked from JavaScript.
  *
  * @param $tid
Index: l10n_community/export.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/export.inc,v
retrieving revision 1.1.2.15.2.8
diff -u -p -r1.1.2.15.2.8 export.inc
--- l10n_community/export.inc	30 Dec 2008 16:41:41 -0000	1.1.2.15.2.8
+++ l10n_community/export.inc	27 Mar 2009 18:16:08 -0000
@@ -14,7 +14,7 @@ function l10n_community_export_page($uri
     l(t('Home'), NULL),
     l(t('Translate'), 'translate'),
   );
-  
+
   // Set a matching title with the translation page.
   $project = l10n_community_get_projects($uri);
   if (isset($langcode)) {
@@ -46,7 +46,7 @@ function l10n_community_export_form(&$fo
     // When project was preset from URL, disable the selector.
     $hide_projects = TRUE;
   }
-  
+
   $projects = l10n_community_get_projects();
   $form['data'] = array(
     '#type' => 'fieldset',
@@ -84,7 +84,7 @@ function l10n_community_export_form(&$fo
   if (isset($projects[$uri])) {
     // Set this project as default value if identified.
     $form['data']['project']['#default_value'] = $projects[$uri]->title;
-  
+
     $releases = l10n_community_get_releases($uri);
     $release_options = array('all' => t('All'));
     foreach ($releases as $rid => $this_release) {
@@ -170,7 +170,7 @@ function l10n_community_export_form_subm
       return;
     }
   }
-  
+
   $language = NULL;
   if (isset($form_state['values']['langcode'])) {
     $languages = l10n_community_get_languages();
@@ -187,7 +187,7 @@ function l10n_community_export_form_subm
     // If not set (exporting a template for a module), stick to all-in-one.
     isset($form_state['values']['version']) ? $form_state['values']['version'] : 'all-in-one'
   );
-  
+
   if (isset($export_result) && is_array($export_result)) {
     // If we got an array back from the export build, tear that into pieces.
     list($mime_type, $file_name, $serve_name) = $export_result;
@@ -196,7 +196,7 @@ function l10n_community_export_form_subm
     header('Content-Type: '. $mime_type);
     echo file_get_contents($file_name);
     unlink($file_name);
-    die();  
+    die();
   }
   else {
     // Messages should already be recorded about any build errors.
@@ -211,7 +211,7 @@ function _l10n_community_export_string_f
   $po_folder = ($version == 'drupal-5' ? 'po' : 'translations');
 
   if (!empty($export_string)) {
-    
+
     // Location comments are constructed in fileone:1,2,5; filetwo:123,537
     // format, where the numbers represent the line numbers of source
     // occurances in the respective source files.
@@ -231,7 +231,7 @@ function _l10n_community_export_string_f
       // general.po, so that later the module screen has all module info
       // translated for the admin). Or appeared in more then one file, so
       // goes to general.po for that reason.
-      
+
       // Note that some modules like ubercart might not have their
       // root module in the root folder, so this needs to be rethought.
       $filename = ($version != 'flat-package' ? $po_folder .'/' : '') .'general';
@@ -249,7 +249,7 @@ function _l10n_community_export_string_f
         $filename = str_replace('/', '-', $filename);
       }
     }
-    
+
     // Temporary hack to make the core exports put the system module
     // files to the right place. See http://drupal.org/node/212594
     // This should be solved more elegantly with a knowledge on the
@@ -265,13 +265,13 @@ function _l10n_community_export_string_f
         $filename = "modules/system/$po_folder/". basename($filename);
       }
     }
-    
+
     // Append extension.
     $filename .= ($template ? '.pot' : ($version != 'flat-package' ? ('.'. $language->language) : '') .'.po');
-    
+
     if (strpos($export_string['value'], "\0") !== FALSE) {
       // This is a string with plural variants.
-      list($singular, $plural) = explode("\0", $export_string['value']); 
+      list($singular, $plural) = explode("\0", $export_string['value']);
       $output = $comment .'msgid '. _l10n_community_export_string($singular) .'msgid_plural '. _l10n_community_export_string($plural);
       if (!$template && !empty($export_string['translation'])) {
         // Export translations we have.
@@ -359,7 +359,7 @@ function l10n_community_export($uri, $re
   // l10n_community_requirements() makes sure there is a status
   // error if this is not installed.
   include_once 'Archive/Tar.php';
-  
+
   $project = l10n_community_get_projects($uri);
   if ($template) {
     // We are exporting a template explicitly.
@@ -371,7 +371,7 @@ function l10n_community_export($uri, $re
     $sql = "SELECT s.sid, s.value, f.location, f.revision, l.lineno, l.type, t.translation, t.uid_approved, t.time_approved FROM {l10n_community_release} r INNER JOIN {l10n_community_file} f ON r.rid = f.rid INNER JOIN {l10n_community_line} l ON f.fid = l.fid INNER JOIN {l10n_community_string} s ON l.sid = s.sid  LEFT JOIN {l10n_community_translation} t ON s.sid = t.sid AND t.language = '%s' AND is_active = 1 AND is_suggestion = 0 WHERE r.pid = %d";
     $sql_args = array($language->language, $project->pid);
   }
-  
+
   if (isset($release)) {
     // Release restriction.
     $sql_args[] = $release;
@@ -379,15 +379,15 @@ function l10n_community_export($uri, $re
     $releases = l10n_community_get_releases($uri, TRUE);
     $release = $releases[$release];
   }
-  
+
   // Source strings will be repeated as many times as they appear, so to generate
   // the export file properly, order by the source id.
   $sql .= ' ORDER BY s.sid';
-  
+
   $result = db_query($sql, $sql_args);
   $previous_sid = 0;
   $export_string = $string_files = array();
-    
+
   while ($string = db_fetch_object($result)) {
     if ($string->sid != $previous_sid) {
       // New string in the stream.
@@ -419,7 +419,7 @@ function l10n_community_export($uri, $re
     // Store the last string.
     _l10n_community_export_string_files($string_files, $uri, $language, $template, $version, $export_string);
   }
-  
+
   if (empty($string_files)) {
     // No strings were found.
     if (isset($release)) {
@@ -430,14 +430,14 @@ function l10n_community_export($uri, $re
     }
     // Message to the user.
     drupal_set_message($message);
-    // Message to watchdog for possible automated packaging. 
+    // Message to watchdog for possible automated packaging.
     watchdog('l10n_community', $message);
     return NULL;
   }
 
   // Generate a 'unique' temporary filename for this package.
   $tempfile = tempnam(file_directory_temp(), 'l10n_community-'. $uri);
-  
+
   if ($version != 'all-in-one') {
     // Generate tgz file with all files added.
     $tar = new Archive_Tar($tempfile, 'gz');
@@ -449,7 +449,7 @@ function l10n_community_export($uri, $re
     else {
       $file_list = '# Generated from files:'."\n#  ". join("\n#  ", $fileinfo['revisions']) ."\n";
     }
-    
+
     $release_title = $project->title .' ('. (isset($release) ? $release->title : 'all releases') .')';
     if (!$template) {
       $header = '# '. $language->name .' translation of '. $release_title ."\n";
Index: l10n_community/extractor.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/extractor.inc,v
retrieving revision 1.1.2.13.2.2
diff -u -p -r1.1.2.13.2.2 extractor.inc
--- l10n_community/extractor.inc	15 Oct 2008 00:09:30 -0000	1.1.2.13.2.2
+++ l10n_community/extractor.inc	27 Mar 2009 18:17:22 -0000
@@ -39,7 +39,7 @@ function l10n_community_parse_package($p
   // is unique, we can append '_dir', and it will still be unique.
   $temp_name = tempnam(file_directory_temp(), 'l10n_community_');
   $temp_path = $temp_name .'_dir';
-    
+
   // Nothing to do if the file is not there or the extraction folder is taken.
   if (!file_exists($package_file)) {
     $error = t('Package to parse (%file) does not exist.', array('%file' => $package_file));
@@ -47,7 +47,7 @@ function l10n_community_parse_package($p
   elseif (is_dir($temp_path)) {
     $error = t('Temporary directory %path already exists.', array('%path' => $temp_path));
   }
-  
+
   // Extract the local file to the temporary directory.
   else {
     $obj = new Archive_Tar($package_file);
@@ -65,16 +65,16 @@ function l10n_community_parse_package($p
       foreach ($files as $name) {
         _potx_process_file($name, strlen($temp_path) + 1, 'l10n_community_save_string', 'l10n_community_save_file', $version);
       }
-      
+
       // Delete the extracted files.
       l10n_community_rmdir_recursive($temp_path);
-      
+
       // Record changes of the scanned project in the database.
       $message = t('Contents of %filename have been scanned.', array('%filename' => $package_file));
 
       // Parsed this releases files.
       db_query("UPDATE {l10n_community_release} SET last_parsed = %d WHERE rid = %d", time(), $release_rid);
-      
+
       // Update error list for this release. Although the errors are related to
       // files, we are not interested in the fine details, the file names are in
       // the error messages as text. We assume no other messages are added while
@@ -88,7 +88,7 @@ function l10n_community_parse_package($p
       }
     }
   }
-  
+
   // Remove temporary file we used to reserve the name for the directory.
   unlink($temp_name);
 
@@ -103,7 +103,7 @@ function l10n_community_parse_package($p
     watchdog('l10n_community', $message);
     $return['message'] = $message;
   }
-  
+
   return $return;
 }
 
@@ -127,7 +127,7 @@ function l10n_community_parse_package($p
 function l10n_community_save_file($revision = NULL, $file = NULL) {
   static $rid = 0;
   static $files = array();
-  
+
   if (!isset($file)) {
     // We get the release number for the files.
     $rid = $revision;
@@ -172,17 +172,17 @@ function l10n_community_save_file($revis
  *   String type: POTX_STRING_INSTALLER, POTX_STRING_RUNTIME
  *   or POTX_STRING_BOTH.
  */
-function l10n_community_save_string($value = NULL, $file = NULL, $line = 0, $string_type = 2 /*POTX_STRING_RUNTIME*/) {
+function l10n_community_save_string($value = NULL, $file = NULL, $line = 0, $string_type = 2 /* POTX_STRING_RUNTIME */) {
   static $files = array();
-  
+
   // Strip all slashes from string.
   $value = stripcslashes($value);
-  
+
   if (!isset($files[$file])) {
     // Get file ID for saving, locally cache.
     $files[$file] = l10n_community_save_file(NULL, $file);
   }
-  
+
   // If we have the file entry now, we can process adding the string.
   if (isset($files[$file])) {
     // A \0 separator in the string means we deal with a string with plural variants.
Index: l10n_community/import.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/import.inc,v
retrieving revision 1.1.2.5.2.3
diff -u -p -r1.1.2.5.2.3 import.inc
--- l10n_community/import.inc	26 Oct 2008 14:54:57 -0000	1.1.2.5.2.3
+++ l10n_community/import.inc	27 Mar 2009 18:17:42 -0000
@@ -21,7 +21,7 @@ function l10n_community_import_page($lan
   drupal_set_breadcrumb(
     array(
       l(t('Home'), NULL),
-      l(t('Translate projects'), 'translate'))    
+      l(t('Translate projects'), 'translate'))
   );
   return drupal_get_form('l10n_community_import_form', $langcode, $perm);
 }
@@ -36,7 +36,7 @@ function l10n_community_import_form($for
     '#type' => 'value',
     '#value' => $langcode,
   );
-  
+
   $form['file'] = array(
     '#type' => 'file',
     '#title' => t('Translation file'),
@@ -85,7 +85,7 @@ function l10n_community_import_form_subm
     drupal_set_message(t('File to import not found.'), 'error');
   }
 }
- 
+
 /**
  * Parses a Gettext Portable Object file and saves strings.
  *
@@ -104,7 +104,7 @@ function l10n_community_import_form_subm
  */
 function l10n_community_import($file, $langcode, $is_suggestion) {
   include_once 'includes/locale.inc';
-  
+
   $fd = fopen($file->filepath, "rb"); // File will get closed by PHP on return
   if (!$fd) {
     _locale_import_message('The translation import failed, because the file %filename could not be read.', $file);
@@ -232,7 +232,7 @@ function l10n_community_import($file, $l
     _locale_import_message('The translation file %filename ended unexpectedly at line %line.', $file, $lineno);
     return FALSE;
   }
-  
+
   return TRUE;
 }
 
@@ -248,7 +248,7 @@ function l10n_community_import($file, $l
  */
 function _l10n_community_import_one_string($value = NULL, $langcode = NULL, $is_suggestion = FALSE) {
   global $user;
-  
+
   static $inserted = 0;
   static $updated = 0;
   static $unchanged = 0;
@@ -260,17 +260,17 @@ function _l10n_community_import_one_stri
   }
   elseif (!empty($value['msgid']) && !empty($value['msgstr'])) {
     // We only save non-empty translations/suggestions.
-    
+
     // If the comment array for this value contains the ', fuzzy' flag, then
-    // mark this as a suggestion import in all cases. 
-    $is_suggestion = ($is_suggestion ? TRUE : in_array(', fuzzy', $value['#'])); 
-    
+    // mark this as a suggestion import in all cases.
+    $is_suggestion = ($is_suggestion ? TRUE : in_array(', fuzzy', $value['#']));
+
     // We use BINARY matching here to avoid case insensitively matching
     // strings like 'operations' and 'Operations'.
     if ($sid = db_result(db_query("SELECT sid FROM {l10n_community_string} WHERE BINARY value = '%s'", $value['msgid']))) {
       // We have this source string (otherwise we don't save anything).
       $translation = db_fetch_object(db_query("SELECT translation FROM {l10n_community_translation} WHERE sid = %d AND language = '%s' AND is_suggestion = 0 AND is_active = 1", $sid, $langcode));
-      
+
       // Merge plural versions into one for saving values.
       $value['msgstr'] = is_array($value['msgstr']) ? join("\0", $value['msgstr']) : $value['msgstr'];
 
@@ -281,7 +281,7 @@ function _l10n_community_import_one_stri
         // to be a suggestion instead. This allows conflict issues to be resolved.
         $is_suggestion = TRUE;
       }
-      
+
       if ($is_suggestion || !$translation) {
         l10n_community_target_save($sid, $value['msgstr'], $langcode, $user->uid, $is_suggestion, $inserted, $updated, $unchanged, $suggested);
       }
Index: l10n_community/l10n_community.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/l10n_community.admin.inc,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 l10n_community.admin.inc
--- l10n_community/l10n_community.admin.inc	15 Oct 2008 23:56:38 -0000	1.1.2.2
+++ l10n_community/l10n_community.admin.inc	27 Mar 2009 18:18:05 -0000
@@ -66,7 +66,7 @@ function l10n_community_admin_projects_f
   $form['projects'] = array(
     '#tree' => TRUE,
   );
-  
+
   $table = array();
   foreach ($projects as $project) {
     $form['projects'][$project->pid] = array(
@@ -89,7 +89,7 @@ function l10n_community_admin_projects_f
     '#type' => 'submit',
     '#value' => t('Save changes')
   );
-  
+
   $form['#theme'] = 'l10n_community_admin_projects_form';
   return $form;
 }
@@ -116,7 +116,7 @@ function theme_l10n_community_admin_proj
   $output .= theme('table', $headers, $table);
   $output .= $pager;
   $output .= drupal_render($form);
-  
+
   if ($form['orphans']['#value']) {
     drupal_set_message(format_plural($form['orphans']['#value'], 'There is @count source string orphaned.', 'There are @count source strings orphaned.') .' '. t('Deleting projects will not be available until you <a href="@cleanup">clean up the database</a> or rescan projects (within connectors you use) if you have started over with some of them.', array('@cleanup' => url('admin/l10n_server/projects/cleanup'))));
   }
Index: l10n_community/l10n_community.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/l10n_community.install,v
retrieving revision 1.1.2.11.2.7
diff -u -p -r1.1.2.11.2.7 l10n_community.install
--- l10n_community/l10n_community.install	26 Oct 2008 20:56:42 -0000	1.1.2.11.2.7
+++ l10n_community/l10n_community.install	27 Mar 2009 18:18:21 -0000
@@ -9,14 +9,14 @@
  * Implementation of hook_install().
  */
 function l10n_community_install() {
-  drupal_install_schema('l10n_community');  
+  drupal_install_schema('l10n_community');
 }
 
 /**
  * Implementation of hook_uninstall().
  */
 function l10n_community_uninstall() {
-  drupal_uninstall_schema('l10n_community');  
+  drupal_uninstall_schema('l10n_community');
 }
 
 /**
@@ -25,7 +25,7 @@ function l10n_community_uninstall() {
 function l10n_community_schema() {
   $t = get_t();
   $schema = array();
-  
+
   $schema['l10n_community_project'] = array(
     'description' => $t('Projects for which translation is running on the server.'),
     'fields' => array(
@@ -328,7 +328,7 @@ function l10n_community_schema() {
       'sid' => array('sid')
     ),
   );
-  
+
   return $schema;
 }
 
@@ -339,7 +339,7 @@ function l10n_community_requirements($ph
   $requirements = array();
   // Ensure translations don't break at install time.
   $t = get_t();
-  
+
   // Look for Tar library used for compression and uncompression.
   $tar_library = @file_get_contents('Archive/Tar.php', TRUE);
   $tar_available = !empty($tar_library);
@@ -352,7 +352,7 @@ function l10n_community_requirements($ph
     $requirements['l10n_community_tar']['severity'] = REQUIREMENT_ERROR;
     $requirements['l10n_community_tar']['value'] = $t('Not available');
   }
-  
+
   if (module_exists('potx')) {
     // If potx is already installed and enabled, check its version by looking at
     // the specific API piece which lets us fingerprint the right version.
@@ -369,7 +369,7 @@ function l10n_community_requirements($ph
       $requirements['l10n_community_potx']['value'] = $t('Not compatible with Localization Server');
     }
   }
-  
+
   return $requirements;
 }
 
@@ -391,7 +391,7 @@ function l10n_community_update_5000() {
  * Add DEFAULT 0 to integer fields we not always fill in.
  */
 function l10n_community_update_5001() {
-  $default_to_zero = array('uid_entered', 'uid_approved', 'time_entered', 'time_approved', 'has_suggestion', 'is_suggestion', 'is_active');  
+  $default_to_zero = array('uid_entered', 'uid_approved', 'time_entered', 'time_approved', 'has_suggestion', 'is_suggestion', 'is_active');
   $ret = array();
   foreach ($default_to_zero as $column) {
     $ret[] = update_sql('ALTER TABLE {l10n_community_translation} CHANGE '. $column .' '. $column .' INTEGER NOT NULL DEFAULT 0');
@@ -442,7 +442,7 @@ function l10n_community_update_6000() {
 
   // Add connector_module column for use as a clue for modules to tap onto their projects.
   db_add_field($ret, 'l10n_community_project', 'connector_module', array('type' => 'varchar', 'length' => '50', 'not null' => TRUE));
-  
+
   if (!module_exists('l10n_drupalorg') && !module_exists('l10n_localpacks')) {
     // Inform users if no known connector modules were turned on.
     drupal_set_message("Neither l10n_drupalorg nor l10n_localpacks modules were turned on, while the updates ran. The newly updated Localization Server requires knowledge of connector modules associated to projects. If you run your own connector module, please update the database with the module's internal name.");
Index: l10n_community/l10n_community.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/l10n_community.module,v
retrieving revision 1.1.2.23.2.19
diff -u -p -r1.1.2.23.2.19 l10n_community.module
--- l10n_community/l10n_community.module	12 Mar 2009 13:31:05 -0000	1.1.2.23.2.19
+++ l10n_community/l10n_community.module	27 Mar 2009 18:15:30 -0000
@@ -6,7 +6,7 @@
  *   A community web interface for Drupal project translation.
  *
  *   Builds on a connector (eg. l10n_drupalorg) and optionally l10n_groups
- *   to provide a convinient web interface for translators to collaborate 
+ *   to provide a convinient web interface for translators to collaborate
  *   on Drupal project translations.
  */
 
@@ -21,29 +21,29 @@ define('L10N_PERM_NONE', 0);
 define('L10N_PERM_SUGGEST', 1);
 
 /**
- * Permission both to suggest and translate. 
+ * Permission both to suggest and translate.
  */
 define('L10N_PERM_ALL', 2);
 
 /**
  * Strings with any status.
  */
-define('L10N_STATUS_ALL', 0); 
+define('L10N_STATUS_ALL', 0);
 
 /**
  * Untranslated strings only.
  */
-define('L10N_STATUS_UNTRANSLATED', 1); 
+define('L10N_STATUS_UNTRANSLATED', 1);
 
 /**
  * Has outstanding suggested translations.
  */
-define('L10N_STATUS_HAS_SUGGESTION', 2); 
+define('L10N_STATUS_HAS_SUGGESTION', 2);
 
 /**
  * Translated (and approved) strings only.
  */
-define('L10N_STATUS_TRANSLATED', 3); 
+define('L10N_STATUS_TRANSLATED', 3);
 
 // = Core hooks ================================================================
 
@@ -151,7 +151,7 @@ function l10n_community_menu() {
     'access arguments' => array('access localization community'),
     'type' => MENU_CALLBACK
   );
-  
+
   // AJAX callbacks for easy translation management. These are expected to be
   // used only onsite (not as remote API endpoints), so they have no versioning.
   $items['translate/details'] = array(
@@ -182,7 +182,7 @@ function l10n_community_menu() {
     'access arguments' => array('access localization community'),
     'type' => MENU_CALLBACK,
   );
-    
+
   // As soon as we have a language code, we can translate.
   $items['translate/languages/%l10n_community_language'] = array(
     'title' => 'Translate',
@@ -237,7 +237,7 @@ function l10n_community_menu() {
     'type' => MENU_LOCAL_TASK,
     'weight' => 0,
   );
-    
+
   // We have a valid project name from the web address.
   $items['translate/projects/%l10n_community_project'] = array(
     'title callback' => 'l10n_community_page_title_project',
@@ -298,7 +298,7 @@ function l10n_community_project_load($ur
 
 /**
  * Access callback for editing and import paths. Requires edit privileges for given language.
- * 
+ *
  * @param $langcode
  *  Language code.
  * @param $import
@@ -368,7 +368,7 @@ function l10n_community_block($op = 'lis
         ),
       );
       return $blocks;
-    
+
     case 'view':
       switch ($delta) {
         case 'help':
@@ -382,7 +382,7 @@ function l10n_community_block($op = 'lis
  */
 function l10n_community_block_help() {
   global $user;
-  
+
   $block = array(
     'subject' => t('Translation help'),
     'content' => '',
@@ -392,7 +392,7 @@ function l10n_community_block_help() {
     case 'translate':
       $block['content'] = '<p>'. t('Welcome to the translation server. This block will show you tips and advice throughout the application.') . ($user->uid ? ' '. t('Once you are familiar with the system, feel free to disable help in <a href="@user-page">your user settings</a>.', array('@user-page' => url('user/'. $user->uid .'/edit'))) : '') .'</p>';
       return $block;
-    
+
     // Help text for language overview page.
     case 'translate/languages':
       $block['content'] = '<p>'. t('Choose a language to dive in to suggest translations, approve suggestions, import and export.', array('@by-project-link' => url('translate/projects'))) .'</p>';
@@ -403,8 +403,8 @@ function l10n_community_block_help() {
       $block['content'] = '<p>'. t('Choose a project to explore.', array('@by-language-link' => url('translate/languages'))) .'</p>';
       return $block;
   }
-  
-  // Match actual translation editing or review pages with the two different path models they could have. 
+
+  // Match actual translation editing or review pages with the two different path models they could have.
   if (preg_match('!translate/languages/(?P<langcode>[^/]+)(/(?P<action>view|edit|import|export))?$!', $_GET['q'], $args) ||
       preg_match('!translate/projects/(?P<uri>[^/]+)(/(?P<action>|export))??$!', $_GET['q'], $args)) {
     $perm = isset($args['langcode']) ? l10n_community_get_permission($args['langcode']) : L10N_PERM_NONE;
@@ -429,9 +429,9 @@ function l10n_community_block_help() {
       $permission_help = !empty($permission_help) ? ('<p>'. $permission_help .'</p>') : '';
     }
 
-    // Now construct the actual help text depending on whether we have project or language values from the address. 
+    // Now construct the actual help text depending on whether we have project or language values from the address.
     if (isset($args['action'])) {
-      // We have an import or export action. 
+      // We have an import or export action.
       switch ($args['action']) {
         case 'import':
           $block['content'] = '<p>'. t('Because all project translations are shared, an imported file might provide translations for strings used in any project.') .'</p>'. $permission_help;
@@ -449,7 +449,7 @@ function l10n_community_block_help() {
           $formula = join(' ', preg_split('!(&&|\\|\\||%|<=|>=|==|\\!=|\\?|:)!', $languages[$args['langcode']]->formula, -1, PREG_SPLIT_DELIM_CAPTURE));
           $items[] = t('The plural formula in use with this language is %formula.', array('%formula' => str_replace('$n', 'n', $formula)));
 
-          $block['content'] = $permission_help . theme('item_list', $items); 
+          $block['content'] = $permission_help . theme('item_list', $items);
           return $block;
       }
     }
@@ -499,7 +499,7 @@ function l10n_community_user($op, &$edit
  */
 function l10n_community_get_languages($key = NULL) {
   static $languages = NULL;
-  
+
   if (!isset($languages)) {
     $result = db_query("SELECT * FROM {languages} WHERE language <> 'en' ORDER BY name ASC");
     $languages = array();
@@ -507,7 +507,7 @@ function l10n_community_get_languages($k
       $languages[$language->language] = $language;
     }
   }
-  
+
   if (isset($key)) {
     // Build list of values with the specific key, if asked.
     $result = array();
@@ -536,29 +536,29 @@ function l10n_community_get_languages($k
 function l10n_community_get_permission($langcode, $account = NULL) {
   static $permissions = array();
   global $user;
-  
+
   if (empty($langcode)) {
     return L10N_PERM_NONE;
   }
   if (!isset($account)) {
     $account = $user;
   }
-  
+
   if (isset($permissions[$account->uid][$langcode])) {
     // Return cached value if available.
     return $permissions[$account->uid][$langcode];
   }
-  
+
   // Initialize to lowest possible permission.
   $permissions[$account->uid][$langcode] = L10N_PERM_NONE;
-  
+
   if ($account->uid == 1) {
     // The administrator has all permissions in all languages.
     return ($permissions[$account->uid][$langcode] = L10N_PERM_ALL);
   }
-  
+
   $global_permission = user_access('submit translations and approve suggestions', $account) ? L10N_PERM_ALL : (user_access('submit suggestions', $account) ? L10N_PERM_SUGGEST : L10N_PERM_NONE);
-  
+
   if (($global_permission != L10N_PERM_NONE) && module_exists('l10n_groups')) {
     // Fill up permission information for this account if it has any permission.
     l10n_groups_get_permission($permissions, $global_permission, $langcode, $account);
@@ -567,7 +567,7 @@ function l10n_community_get_permission($
     // Remember global permission if using l10n_community standalone.
     $permissions[$account->uid][$langcode] = $global_permission;
   }
-  
+
   // Return from local cache.
   return $permissions[$account->uid][$langcode];
 }
@@ -586,7 +586,7 @@ function l10n_community_get_permission($
  */
 function l10n_community_get_projects($uri = NULL, $pager = NULL) {
   static $projects = array();
-  
+
   if (isset($pager)) {
     // If a pager view was asked for, collect data independently.
     $results = pager_query('SELECT * FROM {l10n_community_project} ORDER BY uri', $pager, 0, NULL);
@@ -651,7 +651,7 @@ function l10n_community_get_releases($ur
 
 /**
  * Get all errors for a project grouped by release.
- * 
+ *
  * @param $uri
  *   Project code to look up errors for.
  * @return
@@ -659,7 +659,7 @@ function l10n_community_get_releases($ur
  */
 function l10n_community_get_errors($uri) {
   $errors = array();
-  // Inner JOIN used, so if no errors are found, no rows are returned. 
+  // Inner JOIN used, so if no errors are found, no rows are returned.
   $result = db_query("SELECT e.rid, e.value FROM {l10n_community_project} p LEFT JOIN {l10n_community_release} r ON p.pid = r.pid INNER JOIN {l10n_community_error} e ON r.rid = e.rid WHERE p.uri = '%s'", $uri);
   while ($error = db_fetch_object($result)) {
     $errors[$error->rid][] = $error->value;
@@ -720,11 +720,11 @@ function l10n_community_target_save($sid
       db_query("INSERT INTO {l10n_community_translation} (sid, translation, language, uid_entered, time_entered, uid_approved, time_approved, is_suggestion, is_active) VALUES (%d, '%s', '%s', %d, %d, %d, %d, %d, 1)", $sid, $translation, $langcode, $uid, time(), ($suggestion ? 0 : $uid), ($suggestion ? 0 : time()), $suggestion);
     }
     else {
-      // Same string as existing translation. 
+      // Same string as existing translation.
       $unchanged++;
     }
   }
-  
+
   else {
     // No active translation exists.
     if ($suggestion) {
@@ -743,7 +743,7 @@ function l10n_community_target_save($sid
 
 /**
  * Make spacing and newlines the same in translation as in the source.
- * 
+ *
  * @param $translation
  *   Translation string.
  * @param $source
@@ -759,7 +759,7 @@ function l10n_community_trim($translatio
 
 /**
  * Set a message based on the number of translations changed.
- * 
+ *
  * Used by both the save and import process.
  */
 function l10n_community_update_message($inserted, $updated, $unchanged, $suggested, $duplicates) {
@@ -830,7 +830,7 @@ function l10n_community_projects_autocom
     $result = db_query_range("SELECT title FROM {l10n_community_project} WHERE LOWER(title) LIKE LOWER('%s%%')", $string, 0, 10);
     while ($project = db_fetch_object($result)) {
       $matches[$project->title] = check_plain($project->title);
-   }
+    }
   }
   print drupal_to_js($matches);
   exit();
@@ -950,7 +950,7 @@ function theme_l10n_community_strings($i
       $output .= "<div class='buttons'>". theme('l10n_community_copy_button') ."</div>";
     }
     $output .= "<div class='string'>". $item ."</div>";
-    $output .= "</li>";    
+    $output .= "</li>";
   }
   $output .= "</ul>";
   return $output;
@@ -974,14 +974,14 @@ function theme_l10n_community_copy_butto
  */
 function l10n_community_format_text($string, $sid = NULL, $delta = NULL) {
   static $path = NULL, $title = NULL;
-  
+
   if (!isset($path)) {
     $path = base_path() . drupal_get_path('module', 'l10n_community');
     $title = t('line break');
   }
 
   $original = $string;
-  
+
   // Replace all newline chars in the string with an indicator image.
   $string = str_replace(
     array("\n", "\\\\n"),
@@ -1024,7 +1024,7 @@ function l10n_community_get_stats($langc
       $stats['translations'] = db_result(db_query("SELECT COUNT(*) FROM {l10n_community_translation} WHERE is_suggestion = 0 AND is_active = 1 AND language = '%s'", $langcode));
       $stats['suggestions'] = db_result(db_query("SELECT COUNT(*) FROM {l10n_community_translation} WHERE is_suggestion = 1 AND is_active = 1 AND language = '%s'", $langcode));
       $stats['users'] = db_result(db_query("SELECT COUNT(DISTINCT uid_entered) FROM {l10n_community_translation} WHERE is_suggestion = 1 AND is_active = 1 AND language = '%s'", $langcode));
-      
+
       // Cache results for next time. Not setting a timestamp as cache validity
       // time, we would like to retain control of recalculating these values.
       cache_set('l10n:stats:'. $langcode, $stats, 'cache', CACHE_PERMANENT);
Index: l10n_community/pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/pages.inc,v
retrieving revision 1.1.2.20.2.8
diff -u -p -r1.1.2.20.2.8 pages.inc
--- l10n_community/pages.inc	13 Mar 2009 11:04:10 -0000	1.1.2.20.2.8
+++ l10n_community/pages.inc	27 Mar 2009 18:18:33 -0000
@@ -12,7 +12,7 @@
  * Translation status overview for all languages.
  */
 function l10n_community_explore_languages() {
-  
+
   // Checking whether we have languages and strings.
   if (!$languages = l10n_community_get_languages()) {
     drupal_set_message(t('No languages to list.'), 'error');
@@ -22,7 +22,7 @@ function l10n_community_explore_language
     drupal_set_message(t('No strings to translate.'), 'error');
     return '';
   }
-  
+
   // Generate listing of all languages with summaries. The list of languages
   // is relatively "short", compared to projects, so we don't need a pager here.
   $groups = array();
@@ -77,7 +77,7 @@ function l10n_community_explore_projects
       list($title, $uri, $sum, $translated, $suggested) = $string_counts[$project->pid];
       $table[] = array_merge(
         array(
-          array('data' => l($project->title, 'translate/projects/'. $uri), 'class' => 'rowhead'), 
+          array('data' => l($project->title, 'translate/projects/'. $uri), 'class' => 'rowhead'),
         ),
         // Multiply summary count by languages handled, so we get an
         // accurate picture of completeness.
@@ -115,10 +115,10 @@ function l10n_community_overview_languag
     drupal_set_message(t('No language selected.'), 'error');
     return '';
   }
-  
+
   $languages = l10n_community_get_languages('name');
   drupal_set_title(t('@language overview', array('@language' => $languages[$langcode])));
-  
+
   $output = '<div id="l10n-community-summary" class="admin clear-block"><div class="left clear-block">';
 
   $has_posts = FALSE;
@@ -184,7 +184,7 @@ function l10n_community_overview_languag
 
 
   $output .= '</div></div>';
-  
+
   return $output;
 }
 
@@ -210,7 +210,7 @@ function l10n_community_overview_project
     return '';
   }
   drupal_set_title(t('@project project translations', array('@project' => drupal_get_title())));
-  
+
   if (!$languages = l10n_community_get_languages()) {
     drupal_set_message(t('No languages to list.'), 'error');
     return '';
@@ -274,10 +274,10 @@ function l10n_community_overview_project
       $num_parsed++;
     }
   }
-  
+
   // Get information on errors.
   $num_errors = db_result(db_query("SELECT COUNT(DISTINCT e.eid) FROM {l10n_community_project} p LEFT JOIN {l10n_community_release} r ON p.pid = r.pid LEFT JOIN {l10n_community_error} e ON r.rid = e.rid WHERE p.uri = '%s'", $uri));
-  
+
   $block = array(
     'title' => t('@project summary', array('@project' => $project->title)),
     'description' => t('Some details we know about this project'),
@@ -306,14 +306,14 @@ function l10n_community_project_errors($
     return '';
   }
   drupal_set_title(t('@project project errors', array('@project' => drupal_get_title())));
-  
+
   if (!$errors = l10n_community_get_errors($uri)) {
     drupal_set_message(t('No marker errors found in any of the parsed releases of this project.'));
     return '';
   }
-  
+
   $output = '';
-  $releases = l10n_community_get_releases($uri);  
+  $releases = l10n_community_get_releases($uri);
   foreach ($releases as $release) {
     $output .= '<h3>'. $release->title .'</h3>';
     if (!isset($errors[$release->rid])) {
@@ -362,7 +362,7 @@ function theme_l10n_community_progress_c
     // suggestions are not in the bar as they overlap with both translated and
     // untranslated strings, so we cannot display them here.
   );
-  
+
   // Visual summary with a progress bar.
   $bar = '<div class="l10n-community-progress">';
   foreach ($status as $key => $values) {
@@ -371,7 +371,7 @@ function theme_l10n_community_progress_c
     }
   }
   $bar .= '</div>';
-  
+
   return array(
     $bar,
     ($sum - $translated),
@@ -442,11 +442,11 @@ function l10n_community_get_string_count
     case 'all':
       // Return a count of all strings.
       return db_result(db_query("SELECT COUNT(sid) FROM {l10n_community_string}"));
-    
+
     case 'project':
       // Return a count of all strings in this project, id required.
       return db_result(db_query('SELECT COUNT(DISTINCT s.sid) FROM {l10n_community_release} r INNER JOIN {l10n_community_file} f ON r.rid = f.rid INNER JOIN {l10n_community_line} l ON f.fid = l.fid INNER JOIN {l10n_community_string} s ON l.sid = s.sid WHERE r.pid = %d', $id));
-    
+
     case 'languages':
       // Summeries based on language codes, restricted to a specific project if $id is set.
       $sums = array();
@@ -470,10 +470,10 @@ function l10n_community_get_string_count
       }
       return $sums;
       break;
-    
+
     case 'projects':
       // Get summaries by projects. Restricted to a specific language, if $id is set.
-      
+
       // First get the count of strings available for translation.
       $sums = $count_args = array();
       $result = db_query("SELECT COUNT(DISTINCT s.sid) AS string_count, p.pid, p.title, p.uri FROM {l10n_community_project} p INNER JOIN {l10n_community_release} r ON p.pid = r.pid INNER JOIN {l10n_community_file} f ON r.rid = f.rid INNER JOIN {l10n_community_line} l ON f.fid = l.fid INNER JOIN {l10n_community_string} s ON l.sid = s.sid GROUP BY p.pid;");
Index: l10n_community/translate.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/translate.inc,v
retrieving revision 1.1.2.7.2.7
diff -u -p -r1.1.2.7.2.7 translate.inc
--- l10n_community/translate.inc	30 Dec 2008 16:57:39 -0000	1.1.2.7.2.7
+++ l10n_community/translate.inc	27 Mar 2009 18:18:40 -0000
@@ -18,15 +18,15 @@
  *   Language code, for example 'hu', 'pt-br', 'de', 'it'.
  */
 function l10n_community_translate_page($langcode = NULL, $mode = 'view') {
-  
+
   // Add missing breadcrumb.
   drupal_set_breadcrumb(
     array(
       l(t('Home'), NULL),
       l(t('Translate'), 'translate')
-    )    
+    )
   );
-  
+
   $languages = l10n_community_get_languages();
   $perm = l10n_community_get_permission($langcode);
 
@@ -38,12 +38,12 @@ function l10n_community_translate_page($
       $release = $_GET['release'];
     }
   }
-  // Thankfully L10N_STATUS_ALL is 0, so non-number bad data goes to no filter. 
+  // Thankfully L10N_STATUS_ALL is 0, so non-number bad data goes to no filter.
   $status  = isset($_GET['status']) ? (int) $_GET['status'] : 0;
   $search  = isset($_GET['search']) ? (string) $_GET['search'] : '';
-  
+
   $output = drupal_get_form('l10n_community_filter_form', $project, $status, $release, $search);
-  
+
   $strings = l10n_community_get_strings($languages[$langcode]->language, $project, $status, $release, $search, 10);
   if (!count($strings)) {
     drupal_set_message(t('No strings found with this filter. Try adjusting the filter options.'));
@@ -76,7 +76,7 @@ function l10n_community_filter_form(&$fo
     L10N_STATUS_HAS_SUGGESTION => t('Has suggestion'),
     L10N_STATUS_TRANSLATED     => t('Translated'),
   );
-  
+
   $form['project'] = array(
     '#title' => t('Project'),
     '#default_value' => isset($project) ? $project->title : '',
@@ -97,7 +97,7 @@ function l10n_community_filter_form(&$fo
       '#autocomplete_path' => 'translate/projects/autocomplete',
     );
   }
-  
+
   if (isset($project)) {
     $releases = l10n_community_get_releases($project->uri);
     $release_options = array('all' => t('All'));
@@ -111,7 +111,7 @@ function l10n_community_filter_form(&$fo
       '#default_value' => isset($release) ? $release : 'all',
     );
   }
-  
+
   $form['status'] = array(
     '#title' => t('Status'),
     '#type' => 'select',
@@ -144,12 +144,12 @@ function l10n_community_filter_form_subm
     // Just go with the redirection flow => removes URL params.
     return;
   }
-  
+
   if ($form_state['values']['op'] == t('Filter')) {
     // Validate incoming data. The project needs to be resolved by title,
-    // so that we redirect with the proper uri value. Other validations 
-    // are just to make sure that the URL keeps being short, and the user 
-    // is not tricked into thinking a certain filter is applied, while 
+    // so that we redirect with the proper uri value. Other validations
+    // are just to make sure that the URL keeps being short, and the user
+    // is not tricked into thinking a certain filter is applied, while
     // being invalid. These checks are done on input as well.
     if (!empty($form_state['values']['project'])) {
       if ($uri = l10n_community_project_uri_by_title($form_state['values']['project'])) {
@@ -169,7 +169,7 @@ function l10n_community_filter_form_subm
 
     // Redirect keeping the relevant filters intact in the URL.
     $form_state['redirect'] = array(
-      $_GET['q'], 
+      $_GET['q'],
       l10n_community_build_filter_array($form_state['values'])
     );
   }
@@ -207,7 +207,7 @@ function l10n_community_translate_view($
         $translations = explode(chr(0), l10n_community_format_text($string->translation));
         // Fill in any missing items, so it is shown that not all items are done.
         if (count($translations) < $language->plurals) {
-          $translations = array_merge($translations, array_fill(0, count($translations) - $language->plurals, '')); 
+          $translations = array_merge($translations, array_fill(0, count($translations) - $language->plurals, ''));
         }
         $translation = theme('item_list', $translations);
       }
@@ -230,7 +230,7 @@ function l10n_community_translate_view($
 
 // = Translation editor ========================================================
 
-/** 
+/**
  * Translation web interface.
  *
  * @param $strings
@@ -243,7 +243,7 @@ function l10n_community_translate_view($
  *   Community permission level of user watching the page.
  */
 function l10n_community_translate_form(&$form_state, $strings = array(), $language = NULL, $project = NULL, $perm = L10N_PERM_SUGGEST) {
-  
+
   $form = array(
     '#tree' => TRUE,
     '#redirect' => array(
@@ -280,7 +280,7 @@ function l10n_community_translate_form(&
     $toolbox = theme('l10n_community_button', 'translate', 'l10n-translate active');
     $toolbox .= theme('l10n_community_button', 'lookup', 'l10n-lookup');
     $toolbox .= $string->has_suggestion ? theme('l10n_community_button', 'has-suggestion', 'l10n-suggestions') : "";
-    $toolbox = "<div class='toolbox'>$toolbox</div>";    
+    $toolbox = "<div class='toolbox'>$toolbox</div>";
     $form[$string->sid]['toolbox'] = array(
       '#type' => 'markup',
       '#value' => $toolbox,
@@ -304,7 +304,7 @@ function l10n_community_translate_form(&
       '#type' => 'item',
       '#value' => $source,
     );
-    
+
     $translated = !empty($string->translation);
     $form[$string->sid]['translation'] = array(
       '#type' => 'item',
@@ -314,7 +314,7 @@ function l10n_community_translate_form(&
     );
 
     if ($is_plural) {
-      
+
       // Dealing with a string with plural versions.
       if ($translated) {
         // Add translation form element with all plural versions.
@@ -329,9 +329,9 @@ function l10n_community_translate_form(&
           '#value' => theme('l10n_community_strings', $string_parts),
         );
       }
-      
+
       $string_parts = explode(chr(0), $string->value);
-            
+
       for ($i = 0; $i < $language->plurals; $i++) {
         $target = $string->sid .'-'. $i;
         if ($translated) {
@@ -342,7 +342,7 @@ function l10n_community_translate_form(&
           // Not translated yet, so we ask for initial translation or suggestion.
           $description = ($perm == L10N_PERM_SUGGEST) ? t('Suggestion for variant #%d', array('%d' => $i)) : t('Translation for variant #%d', array('%d' => $i));
         }
-        
+
         // Include a textarea for each plural variant.
         $form[$string->sid]['translation']['value'][$i] = array(
           '#type' => strlen($string_parts[$i]) > 45 ? 'textarea' : 'textfield',
@@ -352,10 +352,10 @@ function l10n_community_translate_form(&
         );
       }
     }
-    
+
     // Dealing with a simple string (no plurals).
-    
-    else {      
+
+    else {
       if ($translated) {
         $form[$string->sid]['translation_existing'] = array(
           '#type' => 'item',
@@ -375,7 +375,7 @@ function l10n_community_translate_form(&
       if (strlen($string->value) > 200) {
         $form[$string->sid]['translation']['value']['#rows'] = floor(strlen($string->value) * .03);
         $form[$string->sid]['translation']['value']['#resizable'] = TRUE;
-      }      
+      }
     }
 
     // Add AJAX saving buttons
@@ -389,7 +389,7 @@ function l10n_community_translate_form(&
       '#value' => theme('l10n_community_button', 'clear', 'l10n-clear'),
       '#type' => 'markup',
     );
-    
+
     if ($perm == L10N_PERM_SUGGEST) {
       // User with suggestion capability only, record this.
       $form[$string->sid]['translation']['is_suggestion'] = array(
@@ -405,7 +405,7 @@ function l10n_community_translate_form(&
       );
     }
   }
-  
+
   // Add all strings for copy-pasting and some helpers.
   drupal_add_js(
     array(
@@ -425,15 +425,15 @@ function l10n_community_translate_form(&
     ),
     'setting'
   );
-  
+
   // Let the user submit the form.
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => ($perm == L10N_PERM_SUGGEST) ? t('Save suggestions') : t('Save translations')
   );
-  
+
   $form['#theme'] = 'l10n_community_translate_form';
-  
+
   return $form;
 }
 
@@ -444,14 +444,14 @@ function l10n_community_translate_form_s
   global $user;
 
   $inserted = $updated = $unchanged = $suggested = $duplicates = 0;
-  
+
   foreach ($form_state['values'] as $sid => $item) {
     if (!is_array($item) || !isset($item['translation'])) {
       // Skip, if we don't have translations in this form item,
       // which means this is some other form value.
       continue;
     }
-    
+
     $text = '';
     if (is_string($item['translation']['value'])) {
       // Single string representation: simple translation.
@@ -467,13 +467,13 @@ function l10n_community_translate_form_s
         $text = '';
       }
     }
-      
+
     if (!empty($text)) {
       // Check for duplicate translation or suggestion.
       if (l10n_community_is_duplicate($text, $sid, $form_state['values']['langcode'])) {
         $duplicates++;
         continue;
-      } 
+      }
 
       // We have some string to save.
       l10n_community_target_save(
@@ -483,7 +483,7 @@ function l10n_community_translate_form_s
       );
     }
   }
-  
+
   // Inform user about changes made to the database.
   l10n_community_update_message($inserted, $updated, $unchanged, $suggested, $duplicates);
 }
@@ -519,7 +519,7 @@ function theme_l10n_community_filter_for
 function theme_l10n_community_translate_form($form) {
   $rows = array();
   $output = '';
-  
+
   foreach ($form as $id => &$element) {
     // if the form id is numeric, this form element is for editing a string
     if (is_numeric($id)) {
@@ -542,7 +542,7 @@ function theme_l10n_community_translate_
           'data' => $translation_pane,
           'class' => 'translation',
           'id' => 'tpane-'. $id,
-        ),        
+        ),
       );
       $rows[] = $row;
       unset($form[$id]);
@@ -579,10 +579,10 @@ function theme_l10n_community_translate_
  *   An array of string records from database.
  */
 function l10n_community_get_strings($langcode, $project = NULL, $status = L10N_STATUS_ALL, $release = NULL, $search = NULL, $pager = NULL) {
-  
+
   $sql = $sql_count = '';
   $sql_args = array();
-  
+
   if (!isset($project)) {
     // No project based filtering.
     $sql = "SELECT DISTINCT s.sid, s.value, t.tid, t.language, t.translation, t.uid_entered, t.uid_approved, t.time_entered, t.time_approved, t.has_suggestion, t.is_suggestion, t.is_active FROM {l10n_community_string} s LEFT JOIN {l10n_community_translation} t ON s.sid = t.sid AND t.language = '%s' AND t.is_active = 1 AND t.is_suggestion = 0 WHERE";
@@ -613,12 +613,12 @@ function l10n_community_get_strings($lan
     $sql .= $release_sql;
     $sql_count .= $release_sql;
   }
-    
+
   // Restriction based on string status.
   switch ($status) {
     case L10N_STATUS_UNTRANSLATED:
-      // We are doing a LEFT JOIN especially to look into the case, when we have nothing 
-      // to match in the translation table, but we still have the string. (We get our 
+      // We are doing a LEFT JOIN especially to look into the case, when we have nothing
+      // to match in the translation table, but we still have the string. (We get our
       // records in the result set in this case). The translation field is empty or
       // NULL in this case, as we are not allowing NULL there and only saving an empty
       // translation if there are suggestions but no translation yet.
@@ -645,7 +645,7 @@ function l10n_community_get_strings($lan
       // Leave query alone on this case.
       break;
   }
-  
+
   // Morph "WHERE AND" to "WHERE" and remove closing "WHERE". The first appears
   // if there was no project filtering but further filtering was made. The
   // second appears if only language filtering was used.
Index: l10n_community/welcome.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/welcome.inc,v
retrieving revision 1.1.2.7.2.4
diff -u -p -r1.1.2.7.2.4 welcome.inc
--- l10n_community/welcome.inc	17 Feb 2009 14:34:54 -0000	1.1.2.7.2.4
+++ l10n_community/welcome.inc	27 Mar 2009 18:18:46 -0000
@@ -55,7 +55,7 @@ function l10n_community_welcome_page() {
     // Only display account creation task if not logged in.
     $content = '<p>'. t('You can view the work being done here, but to participate, first you need to <a href="@register">create an account and/or log in</a>', array('@register' => url('user'))) .'</p>';
   }
-  
+
   $content .= drupal_get_form('l10n_community_pick_go') .'<div class="clearing"></div>';
 
   $block = array(
@@ -89,7 +89,7 @@ function l10n_community_pick_go() {
   $form = array();
   $languages = l10n_community_get_languages();
   $projects = l10n_community_get_projects();
-  
+
   // Drop languages without a plural formula from the options.
   $language_list = array();
   foreach ($languages as $langcode => $language) {
@@ -102,7 +102,7 @@ function l10n_community_pick_go() {
     $form['dummy'] = array('#type' => 'markup', '#value' => t('No languages with plural formulas defined or no projects scanned yet.'));
     return $form;
   }
-  
+
   if (count($language_list) > 1) {
     // If more then one language.
     $form['langcode'] = array(
@@ -141,7 +141,7 @@ function l10n_community_pick_go() {
       '#autocomplete_path' => 'translate/projects/autocomplete',
     );
   }
-  
+
   // Either we have languages or projects, so we can jump.
   $form['submit'] = array(
     '#type' => 'submit',
Index: l10n_groups/l10n_groups.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_groups/Attic/l10n_groups.install,v
retrieving revision 1.1.2.1.2.2
diff -u -p -r1.1.2.1.2.2 l10n_groups.install
--- l10n_groups/l10n_groups.install	15 Oct 2008 15:25:05 -0000	1.1.2.1.2.2
+++ l10n_groups/l10n_groups.install	27 Mar 2009 18:23:54 -0000
@@ -9,7 +9,7 @@
  * Implementation of hook_install().
  */
 function l10n_groups_install() {
-  drupal_install_schema('l10n_groups');  
+  drupal_install_schema('l10n_groups');
   // Designate our node type as an OG group node type.
   variable_set('og_content_type_usage_l10n_group', 'group');
 }
Index: l10n_groups/l10n_groups.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_groups/Attic/l10n_groups.module,v
retrieving revision 1.1.2.4.2.2
diff -u -p -r1.1.2.4.2.2 l10n_groups.module
--- l10n_groups/l10n_groups.module	12 Mar 2009 13:24:20 -0000	1.1.2.4.2.2
+++ l10n_groups/l10n_groups.module	27 Mar 2009 18:24:23 -0000
@@ -26,8 +26,8 @@ function l10n_groups_perm() {
 }
 
 /**
- * Implemenation of hook_form_alter().
- * 
+ * Implementation of hook_form_alter().
+ *
  * Take care of the one translation group per language limitation.
  *
  * @todo
@@ -86,7 +86,7 @@ function l10n_groups_update($node) {
 }
 
 /**
- * Implemenation of hook_load().
+ * Implementation of hook_load().
  */
 function l10n_groups_load(&$node) {
   return db_fetch_object(db_query('SELECT language AS l10n_group_language, model as l10n_group_model FROM {l10n_groups_group} WHERE nid = %d', $node->nid));
@@ -116,7 +116,7 @@ function l10n_groups_form(&$node) {
       unset($languages[$group->language]);
     }
   }
-  
+
   $form['title'] = array(
     '#type' => 'textfield',
     '#title' => t('Group name'),
@@ -152,7 +152,7 @@ function l10n_groups_form(&$node) {
     '#description' => t('Whether different types of group members have different permissions.'),
     '#default_value' => isset($node->l10n_group_model) ? $node->l10n_group_model : L10N_MODEL_OPEN,
     '#options' => array(
-      L10N_MODEL_OPEN => t('Open. Everybody is equal, all members can suggest and approve translations.'), 
+      L10N_MODEL_OPEN => t('Open. Everybody is equal, all members can suggest and approve translations.'),
       L10N_MODEL_CONTROLLED => t('Controlled. Members can only suggest translations, group administrators can approve them.'),
     ),
     '#weight' => -3
@@ -179,12 +179,12 @@ function l10n_groups_form(&$node) {
  */
 function l10n_groups_block_help($perm, $langcode = NULL) {
   global $user;
-  
+
   // Only return anything if we have a language group code.
   if (!isset($langcode)) {
     return '';
   }
-  
+
   $groups = l10n_groups_get_groups();
   $permission_help = '';
   switch ($perm) {
@@ -210,7 +210,7 @@ function l10n_groups_block_help($perm, $
  */
 function l10n_groups_get_groups() {
   static $groups = NULL;
-  
+
   if (!isset($groups)) {
     $groups = array();
     $result = db_query('SELECT nid, language, model FROM {l10n_groups_group}');
@@ -218,7 +218,7 @@ function l10n_groups_get_groups() {
       $groups[$group->language] = $group;
     }
   }
-  
+
   return $groups;
 }
 
@@ -246,7 +246,7 @@ function l10n_groups_get_permission(&$pe
       if (!empty($account->og_groups) and !empty($account->og_groups[$group->nid])) {
         if (!empty($account->og_groups[$group->nid]['is_admin'])) {
           // Administrators of groups have all permissions in the group.
-          $permission = L10N_PERM_ALL; 
+          $permission = L10N_PERM_ALL;
         }
         else if ($account->og_groups[$group->nid]['is_active']) {
           // Members in the group have a permission depending on the model used.
Index: l10n_remote/l10n_remote.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_remote/Attic/l10n_remote.module,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 l10n_remote.module
--- l10n_remote/l10n_remote.module	20 Oct 2008 22:29:52 -0000	1.1.2.1
+++ l10n_remote/l10n_remote.module	27 Mar 2009 18:25:42 -0000
@@ -4,9 +4,9 @@
 /**
  * @file
  *   Localization XML-RPC server for remote translation submissions.
- *   
+ *
  *   Adds XML-RPC support for remote string submissions, to be used by l10n_client.
- *   
+ *
  * @todo Add automatic API key retrieval, where user just clicks and accepts.
  */
 
@@ -53,8 +53,8 @@ function l10n_remote_user_page($client_t
   }
 
   $items[] = array(
-    '#type' => 'item', 
-    '#title' => t('Your Localization Server API key'), 
+    '#type' => 'item',
+    '#title' => t('Your Localization Server API key'),
     '#value' => l10n_remote_user_api_key($user->uid, $client_token),
     '#description' => t('Copy and paste this API key into your user account on the client host.'),
   );
@@ -63,7 +63,7 @@ function l10n_remote_user_page($client_t
 
 /**
  * Get API key for remote submission
- * 
+ *
  * This API key will contain a visible user id and a signature from the server.
  */
 function l10n_remote_user_api_key($uid, $client_token) {
@@ -119,31 +119,31 @@ function l10n_remote_xmlrpc_string_submi
   // Check signature and permission parameters.
   if ($uid && $signature == md5(l10n_remote_user_api_key($uid, $client_token) . $langcode . $source . $translation . $client_token)) {
     if (($account = user_load($uid)) && $account->status && user_access('access localization community', $account) && user_access('submit suggestions remotely', $account)) {
-       watchdog('l10n_community', 'Submitted translation from client.');
-       // Check for existing string, and *always* save this as suggestion.
-       $languages = l10n_community_get_languages('name');
-       
-       if (!isset($languages[$langcode])) {
-         watchdog('l10n_community', 'Language not allowed for remote submission.', NULL, WATCHDOG_WARNING);
-         return array('status' => FALSE, 'reason' => 'Language not accepted.');
-       }
-       elseif (l10n_community_get_permission($langcode, $account) == L10N_PERM_NONE) {
-         watchdog('l10n_community', 'Not allowed to submit translations in this language remotely.', NULL, WATCHDOG_WARNING);
-         return array('status' => FALSE, 'reason' => 'Not allowed to submit translations in this language.');
-       }
-       elseif ($sid = db_result(db_query("SELECT sid FROM {l10n_community_string} WHERE value = '%s'", $source))) {
-         l10n_community_target_save($sid, $translation, $langcode, $uid, TRUE, $inserted, $updated, $unchanged, $suggested);
-         return array('status' => TRUE, 'sid' => $sid);
-       }
-       else {
-         return array('status' => FALSE, 'reason' => 'Source string not found on server list.');
-       }
+      watchdog('l10n_community', 'Submitted translation from client.');
+      // Check for existing string, and *always* save this as suggestion.
+      $languages = l10n_community_get_languages('name');
+
+      if (!isset($languages[$langcode])) {
+        watchdog('l10n_community', 'Language not allowed for remote submission.', NULL, WATCHDOG_WARNING);
+        return array('status' => FALSE, 'reason' => 'Language not accepted.');
+      }
+      elseif (l10n_community_get_permission($langcode, $account) == L10N_PERM_NONE) {
+        watchdog('l10n_community', 'Not allowed to submit translations in this language remotely.', NULL, WATCHDOG_WARNING);
+        return array('status' => FALSE, 'reason' => 'Not allowed to submit translations in this language.');
+      }
+      elseif ($sid = db_result(db_query("SELECT sid FROM {l10n_community_string} WHERE value = '%s'", $source))) {
+        l10n_community_target_save($sid, $translation, $langcode, $uid, TRUE, $inserted, $updated, $unchanged, $suggested);
+        return array('status' => TRUE, 'sid' => $sid);
+      }
+      else {
+        return array('status' => FALSE, 'reason' => 'Source string not found on server list.');
+      }
     }
     else {
       watchdog('l10n_community', 'Unauthorized or blocked user attempted submission.', NULL, WATCHDOG_WARNING);
       return array('status' => FALSE, 'reason' => 'No permission to submit translations.');
     }
-  } 
+  }
   else {
     watchdog('l10n_community', 'Submitted translation with wrong parameters or signature.', NULL, WATCHDOG_WARNING);
     return array('status' => FALSE, 'reason' => 'Wrong parameters or signature.');
