Index: connectors/l10n_gettext/l10n_gettext.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/connectors/l10n_gettext/Attic/l10n_gettext.module,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 l10n_gettext.module
--- connectors/l10n_gettext/l10n_gettext.module	5 May 2010 15:08:45 -0000	1.1.2.1
+++ connectors/l10n_gettext/l10n_gettext.module	15 Feb 2011 10:52:48 -0000
@@ -41,7 +41,9 @@ function l10n_gettext_upload_handler($fo
 
     // Do the actual parsing on the local file.
     if (l10n_server_parse_po($file, 'l10n_gettext_store_string', array($project->pid, $release->rid, $fid))) {
-      drupal_set_message(format_plural(l10n_gettext_store_string(), 'The source file was successfully imported. One source string was added.', 'The source file was successfully imported. @count source strings were added.'));
+      $added = l10n_gettext_store_string();
+      drupal_set_message(format_plural($added, 'The source file was successfully imported. One source string was added.', 'The source file was successfully imported. @count source strings were added.'));
+      db_query("UPDATE {l10n_server_release} SET sid_count = %d WHERE rid = %d", $added, $release->rid);
     }
   }
   else {
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.15.2.14.2.3
diff -u -p -r1.1.2.11.2.15.2.14.2.3 l10n_community.install
--- l10n_community/l10n_community.install	9 Jan 2011 16:59:20 -0000	1.1.2.11.2.15.2.14.2.3
+++ l10n_community/l10n_community.install	15 Feb 2011 10:52:48 -0000
@@ -518,7 +518,7 @@ function l10n_community_update_6022() {
   // Save approval history data with L10N_SERVER_ACTION_APPROVE (2) and
   // L10N_SERVER_MEDIUM_WEB (1).
   $ret[] = update_sql("INSERT INTO {l10n_server_translation_history} (tid, uid_action, type_action, time_action, medium_action) SELECT tid, uid_approved, 2, time_approved, 1 FROM {l10n_server_translation} WHERE is_active = 1 AND is_suggestion = 0");
-  
+
   // Save somewhat padded decline data with L10N_SERVER_ACTION_DECLINE (3) and
   // L10N_SERVER_MEDIUM_WEB (1). Use a second later time based on submission
   // time, so in time ordering of events, it will appear later. Actual display
@@ -533,11 +533,11 @@ function l10n_community_update_6022() {
 
   // Add the time_changed field.
   db_add_field($ret, 'l10n_server_translation', 'time_changed', array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11'));
-  
+
   // The last change date we know is either the submission or approval time
   // for active strings.
   $ret[] = update_sql("UPDATE {l10n_server_translation} SET time_changed = GREATEST(time_entered, time_approved) WHERE is_active = 1");
-  
+
   // The last change date for declined strings is faked above to time_entered + 1,
   // so use that for consistency. That is sure to be later to time_entered and
   // will be consistent with the last history action on the string.
@@ -549,3 +549,20 @@ function l10n_community_update_6022() {
 
   return $ret;
 }
+
+/**
+ * Add sid_count to releases.
+ */
+function l10n_community_update_6023() {
+  $ret = array();
+
+  db_add_field($ret, 'l10n_server_release', 'sid_count', array('type' => 'int', 'not null' => TRUE));
+
+  // Fill in with sid_count based on line data.
+  $sid_counts = db_query('SELECT rid, COUNT(DISTINCT sid) sid_count FROM {l10n_server_line} GROUP BY rid');
+  while ($row = db_fetch_object($sid_counts)) {
+    db_query('UPDATE {l10n_server_release} SET sid_count = %d WHERE rid = %d', $row->sid_count, $row->rid);
+  }
+
+  return $ret;
+}
Index: l10n_server/l10n_server.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_server/Attic/l10n_server.install,v
retrieving revision 1.1.2.3.2.2
diff -u -p -r1.1.2.3.2.2 l10n_server.install
--- l10n_server/l10n_server.install	9 Jan 2011 16:08:46 -0000	1.1.2.3.2.2
+++ l10n_server/l10n_server.install	15 Feb 2011 10:52:48 -0000
@@ -12,7 +12,7 @@
 function l10n_server_install() {
   if (!db_table_exists('l10n_community_project')) {
     // Only run the schema installation if l10n_community was
-    // not installed previously. Used to help the transition process. 
+    // not installed previously. Used to help the transition process.
     drupal_install_schema('l10n_server');
   }
 }
@@ -138,6 +138,11 @@ function l10n_server_schema() {
         'type' => 'int',
         'not null' => TRUE,
       ),
+      'sid_count' => array(
+        'description' => 'Count of source strings in this project release.',
+        'type' => 'int',
+        'not null' => TRUE,
+      ),
     ),
     'primary key' => array('rid'),
     'indexes' => array(
@@ -364,7 +369,7 @@ function l10n_server_schema() {
       'sid_language_is_suggestion_is_active' => array('sid', 'language', 'is_suggestion', 'is_active')
     ),
   );
-  
+
   $schema['l10n_server_translation_history'] = array(
     'fields' => array(
       'tid' => array(
@@ -447,4 +452,4 @@ function l10n_server_schema() {
   return $schema;
 }
 
-?>
\ No newline at end of file
+?>
