? l10n_server_coder.patch
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.6
diff -u -p -r1.1.2.6 l10n_drupalorg.module
--- connectors/l10n_drupalorg/l10n_drupalorg.module	24 Dec 2007 23:43:40 -0000	1.1.2.6
+++ connectors/l10n_drupalorg/l10n_drupalorg.module	28 Dec 2007 15:50:32 -0000
@@ -17,7 +17,7 @@
 function l10n_drupalorg_help($section) {
   switch ($section) {
     case 'admin/l10n_server/l10n_drupalorg':
-      return '<p>'. t('The drupal.org localization community connector watches for new projects at drupal.org, downloads the new packages and extracts their translatable strings. Here you can set up the limits of how these operations are performed. The <a href="@scan_link">Scan tab</a> allows you to initiate a manual scan.', array('@scan_link' => url('admin/l10n_server/l10n_drupalorg/scan'))) . '</p>';
+      return '<p>'. t('The drupal.org localization community connector watches for new projects at drupal.org, downloads the new packages and extracts their translatable strings. Here you can set up the limits of how these operations are performed. The <a href="@scan_link">Scan tab</a> allows you to initiate a manual scan.', array('@scan_link' => url('admin/l10n_server/l10n_drupalorg/scan'))) .'</p>';
   }
 }
 
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.7
diff -u -p -r1.1.2.7 l10n_localpacks.module
--- connectors/l10n_localpacks/l10n_localpacks.module	24 Dec 2007 23:43:40 -0000	1.1.2.7
+++ connectors/l10n_localpacks/l10n_localpacks.module	28 Dec 2007 15:50:32 -0000
@@ -16,7 +16,7 @@
 function l10n_localpacks_help($section) {
   switch ($section) {
     case 'admin/l10n_server/l10n_localpacks':
-      return '<p>'. t('The local package connector for localization community looks at a local directory and handles packages you upload there, making them available for localization on the web interface. Set up the properties of that directory here. The <a href="@scan_link">Scan tab</a> allows you to initiate a manual scan on files in the directory, but it is advised to set up cron to check for new packages periodically.', array('@scan_link' => url('admin/l10n_server/l10n_localpacks/scan'))) . '</p>';
+      return '<p>'. t('The local package connector for localization community looks at a local directory and handles packages you upload there, making them available for localization on the web interface. Set up the properties of that directory here. The <a href="@scan_link">Scan tab</a> allows you to initiate a manual scan on files in the directory, but it is advised to set up cron to check for new packages periodically.', array('@scan_link' => url('admin/l10n_server/l10n_localpacks/scan'))) .'</p>';
   }
 }
 
@@ -137,7 +137,7 @@ function l10n_localpacks_scan($automated
           // 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. 
           // Grab the directory name as project title.
-          list ($project_title, $package) = explode('/', $path);
+          list($project_title, $package) = explode('/', $path);
         }
         if (strpos($package, '-')) {
           // Only remaining are the project uri and release,
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.7
diff -u -p -r1.1.2.7 ajax.inc
--- l10n_community/ajax.inc	27 Dec 2007 17:00:24 -0000	1.1.2.7
+++ l10n_community/ajax.inc	28 Dec 2007 15:50:32 -0000
@@ -34,7 +34,7 @@ function l10n_community_string_details($
       if (!empty($list)) {
         $output[] = join(', ', $list);
       }
-      $list = array('<em>'. $instance->project_title . ':</em> '. $instance->release_title .' ('. $instance->occurance_count .')');
+      $list = array('<em>'. $instance->project_title .':</em> '. $instance->release_title .' ('. $instance->occurance_count .')');
     }
     else {
       $list[] = $instance->release_title .' ('. $instance->occurance_count .')';
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.3
diff -u -p -r1.1.2.3 export.inc
--- l10n_community/export.inc	17 Dec 2007 20:09:54 -0000	1.1.2.3
+++ l10n_community/export.inc	28 Dec 2007 15:50:32 -0000
@@ -275,11 +275,11 @@ function l10n_community_export($uri, $re
         if (strpos($export_string['value'], "\0") !== FALSE) {
           // This is a string with plural variants.
           list($singular, $plural) = explode("\0", $export_string['value']); 
-          $output = $comment . 'msgid '. _l10n_community_export_string($singular) .'msgid_plural '. _l10n_community_export_string($plural);
+          $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.
             foreach (explode("\0", $export_string['translation']) as $id => $value) {
-              $output .= 'msgstr['. $id . '] ' . _l10n_community_export_string($value);
+              $output .= 'msgstr['. $id .'] '. _l10n_community_export_string($value);
             }
           }
           elseif (isset($language)) {
@@ -287,7 +287,7 @@ function l10n_community_export($uri, $re
             // a plural without translation or a template generated for a
             // specific language.
             for ($pi = 0; $pi < $language->plurals; $pi++) {
-              $output .= 'msgstr['. $pi . '] ""'."\n";
+              $output .= 'msgstr['. $pi .'] ""'."\n";
             }
           }
           else {
@@ -298,9 +298,9 @@ function l10n_community_export($uri, $re
         }
         else {
           // Simple string (and possibly translation pair).
-          $output = $comment . 'msgid '. _l10n_community_export_string($export_string['value']);
+          $output = $comment .'msgid '. _l10n_community_export_string($export_string['value']);
           if (!empty($export_string['translation'])) {
-            $output .= 'msgstr ' . _l10n_community_export_string($export_string['translation']);
+            $output .= 'msgstr '. _l10n_community_export_string($export_string['translation']);
           }
           else {
             $output .= 'msgstr ""'."\n";
@@ -342,10 +342,10 @@ function l10n_community_export($uri, $re
   $tar = new Archive_Tar($tempfile, 'gz');
   foreach ($string_files as $filename => $fileinfo) {
     if (count($fileinfo['revisions']) == 1) {
-      $file_list = '# Generated from file: '. $fileinfo['revisions'][0] . "\n";
+      $file_list = '# Generated from file: '. $fileinfo['revisions'][0] ."\n";
     }
     else {
-      $file_list = '# Generated from files:' . "\n#  " . join("\n#  ", $fileinfo['revisions']) . "\n";
+      $file_list = '# Generated from files:'."\n#  ". join("\n#  ", $fileinfo['revisions']) ."\n";
     }
     
     $release_title = $project->title .' ('. (isset($release) ? $release->title : 'all releases') .')';
@@ -356,11 +356,11 @@ function l10n_community_export($uri, $re
       $header .= "#\n";
       $header .= "msgid \"\"\n";
       $header .= "msgstr \"\"\n";
-      $header .= "\"Project-Id-Version: ". $release_title . "\\n\"\n";
+      $header .= "\"Project-Id-Version: ". $release_title ."\\n\"\n";
       $header .= "\"POT-Creation-Date: ". date("Y-m-d H:iO") ."\\n\"\n";
       // Use date placeholder, if we have no date information (no translation here yet).
       $header .= "\"PO-Revision-Date: ". (!empty($fileinfo['changed']) ? date("Y-m-d H:iO", $fileinfo['changed']) : 'YYYY-mm-DD HH:MM+ZZZZ') ."\\n\"\n";
-      $header .= "\"Language-Team: ". $language->name . "\\n\"\n";
+      $header .= "\"Language-Team: ". $language->name ."\\n\"\n";
       $header .= "\"MIME-Version: 1.0\\n\"\n";
       $header .= "\"Content-Type: text/plain; charset=utf-8\\n\"\n";
       $header .= "\"Content-Transfer-Encoding: 8bit\\n\"\n";
@@ -370,16 +370,16 @@ function l10n_community_export($uri, $re
     }
     else {
       $language_title = (isset($language) ? $language->name : 'LANGUAGE');
-      $header = "# ". $language_title . " translation of ". $release_title . "\n";
-      $header .= "# Copyright (c) ". date('Y') . "\n";
+      $header = "# ". $language_title ." translation of ". $release_title ."\n";
+      $header .= "# Copyright (c) ". date('Y') ."\n";
       $header .= $file_list;
       $header .= "#\n";
       $header .= "msgid \"\"\n";
       $header .= "msgstr \"\"\n";
-      $header .= "\"Project-Id-Version: ". $release_title . "\\n\"\n";
+      $header .= "\"Project-Id-Version: ". $release_title ."\\n\"\n";
       $header .= "\"POT-Creation-Date: ". date("Y-m-d H:iO") ."\\n\"\n";
       $header .= "\"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\\n\"\n";
-      $header .= "\"Language-Team: ". $language_title . "\\n\"\n";
+      $header .= "\"Language-Team: ". $language_title ."\\n\"\n";
       $header .= "\"MIME-Version: 1.0\\n\"\n";
       $header .= "\"Content-Type: text/plain; charset=utf-8\\n\"\n";
       $header .= "\"Content-Transfer-Encoding: 8bit\\n\"\n";
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.8
diff -u -p -r1.1.2.8 l10n_community.install
--- l10n_community/l10n_community.install	21 Dec 2007 15:17:12 -0000	1.1.2.8
+++ l10n_community/l10n_community.install	28 Dec 2007 15:50:32 -0000
@@ -152,7 +152,7 @@ function l10n_community_update_5001() {
   $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');
+    $ret[] = update_sql('ALTER TABLE {l10n_community_translation} CHANGE '. $column .' '. $column .' INTEGER NOT NULL DEFAULT 0');
   }
   return $ret;
 }
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.10
diff -u -p -r1.1.2.10 l10n_community.module
--- l10n_community/l10n_community.module	27 Dec 2007 22:46:57 -0000	1.1.2.10
+++ l10n_community/l10n_community.module	28 Dec 2007 15:50:32 -0000
@@ -162,7 +162,7 @@ function l10n_community_menu($may_cache)
         // As soon as we have a language code, we can translate.
         $items[] = array(
           'title' => t('Translate'),
-          'path' => 'translate/languages/' . $langcode,
+          'path' => 'translate/languages/'. $langcode,
           'callback' => 'l10n_community_page_wrapper',
           'callback arguments' => array('pages', 'l10n_community_overview_language', $langcode),
           'access' => TRUE,
@@ -171,7 +171,7 @@ function l10n_community_menu($may_cache)
         // Language overview.
         $items[] = array(
           'title' => t('Overview'),
-          'path' => 'translate/languages/' . $langcode .'/overview',
+          'path' => 'translate/languages/'. $langcode .'/overview',
           'type' => MENU_DEFAULT_LOCAL_TASK,
           'weight' => -20,
           'access' => TRUE,
@@ -179,7 +179,7 @@ function l10n_community_menu($may_cache)
         // Tabs to translate, import and export projects.
         $items[] = array(
           'title' => t('View'),
-          'path' => 'translate/languages/' . $langcode .'/view',
+          'path' => 'translate/languages/'. $langcode .'/view',
           'callback' => 'l10n_community_page_wrapper',
           'callback arguments' => array('translate', 'l10n_community_translate_page', $langcode),
           'type' => MENU_LOCAL_TASK,
@@ -188,7 +188,7 @@ function l10n_community_menu($may_cache)
         );
         $items[] = array(
           'title' => t('Edit'),
-          'path' => 'translate/languages/' . $langcode .'/edit',
+          'path' => 'translate/languages/'. $langcode .'/edit',
           'callback' => 'l10n_community_page_wrapper',
           'callback arguments' => array('translate', 'l10n_community_translate_page', $langcode, 'edit'),
           'type' => MENU_LOCAL_TASK,
@@ -197,7 +197,7 @@ function l10n_community_menu($may_cache)
         );
         $items[] = array(
           'title' => t('Import'),
-          'path' => 'translate/languages/' . $langcode .'/import',
+          'path' => 'translate/languages/'. $langcode .'/import',
           'callback' => 'l10n_community_page_wrapper',
           'callback arguments' => array('import', 'l10n_community_import_page', $langcode),
           'type' => MENU_LOCAL_TASK,
@@ -206,7 +206,7 @@ function l10n_community_menu($may_cache)
         );
         $items[] = array(
           'title' => t('Export'),
-          'path' => 'translate/languages/' . $langcode .'/export',
+          'path' => 'translate/languages/'. $langcode .'/export',
           'callback' => 'l10n_community_page_wrapper',
           'callback arguments' => array('export', 'l10n_community_export_page', NULL, $langcode),
           'type' => MENU_LOCAL_TASK,
@@ -358,7 +358,7 @@ function l10n_community_block_help() {
         case 'edit':
           // Language code and project both present.
           $items = array();
-          $items[] = t('!newline_image represents a line break. Remember to include a line break in the same position in the translation. Beginning and ending line breaks are saved properly, even if you forget to include them.', array('!newline_image' => ' <img src="'. base_path() . drupal_get_path('module', 'l10n_community') .'/images/newline.png" alt="'. t('Newline marker') . '" /> '));
+          $items[] = t('!newline_image represents a line break. Remember to include a line break in the same position in the translation. Beginning and ending line breaks are saved properly, even if you forget to include them.', array('!newline_image' => ' <img src="'. base_path() . drupal_get_path('module', 'l10n_community') .'/images/newline.png" alt="'. t('Newline marker') .'" /> '));
           $items[] = t('Variables are designated with !, @ and % (like %example, !example or @example), and should be kept in the translated text as-is.');
           $languages = l10n_community_get_languages();
           $formula = join(' ', preg_split('!(&&|\\|\\||%|<=|>=|==|\\!=|\\?|:)!', $languages[$args['langcode']]->formula, -1, PREG_SPLIT_DELIM_CAPTURE));
@@ -744,7 +744,7 @@ function l10n_community_detect_major_ver
   $filename = basename($path);
   // The project name could not contain hyphens, as the project name equals
   // function name prefixes, and hyphens are not allowed in function names.
-  list ($project_name, $version) = explode('-', $filename);
+  list($project_name, $version) = explode('-', $filename);
   // The major number is the first digit (eg. 6 for 6.x-dev, 4 for 4.7.x).
   return (int) $version;
 }
@@ -799,7 +799,7 @@ function l10n_community_filter_value($na
  * Text values are centralized here so it is easy to change.
  */
 function theme_l10n_community_button($type, $class, $extras = '') {
-  switch($type) {
+  switch ($type) {
     case 'edit':
       // Source string and translation edit field.
       $text = t('edit');
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.18
diff -u -p -r1.1.2.18 pages.inc
--- l10n_community/pages.inc	24 Dec 2007 16:01:51 -0000	1.1.2.18
+++ l10n_community/pages.inc	28 Dec 2007 15:50:32 -0000
@@ -263,7 +263,7 @@ function l10n_community_overview_project
     'title' => t('@project summary', array('@project' => $project->title)),
     'description' => t('Some details we know about this project'),
     'content' => theme('item_list', array(
-      t('Project home') .': '. (!empty($project->home_link) ? ('<a href="'. check_url($project->home_link) .'">'. check_plain($project->home_link). '</a>') : t('Not available')),
+      t('Project home') .': '. (!empty($project->home_link) ? ('<a href="'. check_url($project->home_link) .'">'. check_plain($project->home_link) .'</a>') : t('Not available')),
       format_plural(count($releases), '1 release in total', '@count releases in total'),
       format_plural($num_parsed, '1 release parsed', '@count releases parsed'),
       format_plural($num_source, '1 source string in total', '@count source strings in total'),
@@ -348,7 +348,7 @@ function theme_l10n_community_progress_c
   $bar = '<div class="l10n-community-progress">';
   foreach ($status as $key => $values) {
     if ($values[1] > 0) {
-      $bar .= '<div class="l10n-community-progress-'. $key . '" style="width:'. $values[1] .'%;" title="'. strtr($values[2], array('!percent' => $values[1] .'%')) .'"></div>';
+      $bar .= '<div class="l10n-community-progress-'. $key .'" style="width:'. $values[1] .'%;" title="'. strtr($values[2], array('!percent' => $values[1] .'%')) .'"></div>';
     }
   }
   $bar .= '</div>';
@@ -441,10 +441,10 @@ function l10n_community_get_string_count
       }
       $result = db_query($count_sql, $id);
       while ($row = db_fetch_object($result)) {
-      	if (!isset($sums[$row->language])) {
+        if (!isset($sums[$row->language])) {
       	  // Set default zeroes for summaries.
           $sums[$row->language] = array(0, 0);
-      	}
+        }
         // Fill in the 0 or 1 element based on whether we have a result
         // for suggestions or translations.
         $sums[$row->language][(int) $row->is_suggestion] = $row->translation_count;
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.4
diff -u -p -r1.1.2.4 translate.inc
--- l10n_community/translate.inc	27 Dec 2007 22:46:57 -0000	1.1.2.4
+++ l10n_community/translate.inc	28 Dec 2007 15:50:32 -0000
@@ -239,7 +239,7 @@ function l10n_community_translate_view($
       // Single source string otherwise.
       $source = l10n_community_format_text($string->value);
     }
-    $output .= '<div class="source">'. $source. '</div>';
+    $output .= '<div class="source">'. $source .'</div>';
     
     // Translation display.
     if (!empty($string->translation)) {
@@ -307,7 +307,7 @@ function l10n_community_translate_form($
     // A toolbox which displays action icons on each string editor fieldset.
     $form[$string->sid]['toolbox'] = array(
       '#type' => 'markup',
-      '#value' => '<div class="toolbox">' . ($string->has_suggestion ? theme('l10n_community_button', 'has-suggestion', 'l10n-has-suggestion', 'title="'. t('Has suggestions.') .'"') : theme('l10n_community_button', 'has-no-suggestion', 'l10n-has-no-suggestion', 'title="'. t('Has no suggestions.') .'"') ) .'</div><div class="messagebox"></div>'
+      '#value' => '<div class="toolbox">'. ($string->has_suggestion ? theme('l10n_community_button', 'has-suggestion', 'l10n-has-suggestion', 'title="'. t('Has suggestions.') .'"') : theme('l10n_community_button', 'has-no-suggestion', 'l10n-has-no-suggestion', 'title="'. t('Has no suggestions.') .'"') ) .'</div><div class="messagebox"></div>'
     );
 
     $is_plural = strpos($string->value, "\0");
@@ -352,7 +352,7 @@ function l10n_community_translate_form($
         // Add translation form element with all plural versions.
         $translations = explode("\0", $string->translation);
         $string_parts = array();
-        for($i = 0; $i < $language->plurals; $i++) {
+        for ($i = 0; $i < $language->plurals; $i++) {
           $target = $string->sid .'-'. $i;
           $string_parts[] = theme('l10n_community_copy_button', $target .'-t') .' '. l10n_community_format_text($translations[$i]);
           $js_strings[$target .'-t'] = $translations[$i];
@@ -365,7 +365,7 @@ function l10n_community_translate_form($
         );
       }
       
-      for($i = 0; $i < $language->plurals; $i++) {
+      for ($i = 0; $i < $language->plurals; $i++) {
         $target = $string->sid .'-'. $i;
         if ($translated) {
           // Already translated so we ask for new translation or suggestion.
@@ -434,7 +434,7 @@ function l10n_community_translate_form($
     array(
       'l10n_strings'          => $js_strings,
 
-      'l10n_image_path'       => base_path() . drupal_get_path('module', 'l10n_community') . '/images/',
+      'l10n_image_path'       => base_path() . drupal_get_path('module', 'l10n_community') .'/images/',
 
       'l10n_lookup_help'      => t('Show detailed information.'),
       'l10n_approve_error'    => t('There was an error approving this suggestion. You might not have permission or the suggestion id was invalid.'),
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.5
diff -u -p -r1.1.2.5 welcome.inc
--- l10n_community/welcome.inc	23 Dec 2007 23:12:33 -0000	1.1.2.5
+++ l10n_community/welcome.inc	28 Dec 2007 15:50:32 -0000
@@ -66,7 +66,7 @@ function l10n_community_welcome_page() {
   $block = array(
     'title' => t('Contribute'),
     'description' => t('Suggest, translate, review'),
-    'content' => '<dl class="admin-list">'. $content . '</dl>'
+    'content' => '<dl class="admin-list">'. $content .'</dl>'
   );
   $output .= str_replace('class="admin-panel"', 'class="admin-panel admin-panel-contribute"', theme('admin_block', $block));
 
@@ -83,7 +83,7 @@ function l10n_community_welcome_page() {
   $block = array(
     'title' => t('Handy links'),
     'description' => t('Documentation, discussion spaces'),
-    'content' => '<dl class="admin-list">'. $content . '</dl>'
+    'content' => '<dl class="admin-list">'. $content .'</dl>'
   );
   $output .= theme('admin_block', $block);
   $output .= '</div></div>';
