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.2
diff -u -p -r1.1.2.5.2.2 import.inc
--- l10n_community/import.inc	23 Oct 2008 22:33:45 -0000	1.1.2.5.2.2
+++ l10n_community/import.inc	26 Oct 2008 14:53:10 -0000
@@ -78,7 +78,7 @@ function l10n_community_import_form_subm
       // Get status report on what was done in the process.
       list($inserted, $updated, $unchanged, $suggested) = _l10n_community_import_one_string();
       drupal_set_message(t('The translation was successfully imported.'));
-      l10n_community_update_message($inserted, $updated, $unchanged, $suggested);
+      l10n_community_update_message($inserted, $updated, $unchanged, $suggested, 0);
     }
   }
   else {
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.7
diff -u -p -r1.1.2.23.2.7 l10n_community.module
--- l10n_community/l10n_community.module	24 Oct 2008 18:04:28 -0000	1.1.2.23.2.7
+++ l10n_community/l10n_community.module	26 Oct 2008 14:53:10 -0000
@@ -776,7 +776,7 @@ function l10n_community_trim($translatio
  * 
  * Used by both the save and import process.
  */
-function l10n_community_update_message($inserted, $updated, $unchanged, $suggested) {
+function l10n_community_update_message($inserted, $updated, $unchanged, $suggested, $duplicates) {
   // Inform user about changes made.
   $message = array();
   if ($inserted) {
@@ -791,6 +791,9 @@ function l10n_community_update_message($
   if ($unchanged) {
     $message[] = format_plural($unchanged, '1 translation unchanged', '@count translations unchanged');
   }
+  if ($duplicates) {
+    $message[] = format_plural($duplicates, '1 duplicate translation not saved', '@count duplicate translations not saved');
+  }
   if (count($message)) {
     drupal_set_message(join(', ', $message) .'.');
   }
@@ -861,6 +864,13 @@ function l10n_community_filter_value($na
   return isset($_GET[$name]) ? $_GET[$name] : (isset($_SESSION['l10n_community'][$name]) ? $_SESSION['l10n_community'][$name] : NULL);
 }
 
+/**
+ * Check whether $suggestion is duplicate for $sid in $langcode.
+ */
+function l10n_community_is_duplicate($suggestion, $sid, $langcode) {
+  return (bool) db_result(db_query("SELECT s.sid FROM {l10n_community_string} s LEFT JOIN {l10n_community_translation} t ON s.sid = t.sid WHERE t.translation = '%s' AND t.is_active = 1 AND t.language = '%s' AND s.sid = %d", $suggestion, $langcode, $sid));
+}
+
 // = Theme functions ===========================================================
 
 /**
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.3
diff -u -p -r1.1.2.7.2.3 translate.inc
--- l10n_community/translate.inc	23 Oct 2008 21:18:44 -0000	1.1.2.7.2.3
+++ l10n_community/translate.inc	26 Oct 2008 14:53:10 -0000
@@ -470,7 +470,8 @@ function l10n_community_translate_form(&
 function l10n_community_translate_form_submit($form, &$form_state) {
   global $user;
 
-  $inserted = $updated = $unchanged = $suggested = 0;
+  $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,
@@ -494,7 +495,13 @@ function l10n_community_translate_form_s
       }
     }
       
-    if ($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(
         $sid, $text, $form_state['values']['langcode'], $user->uid,
@@ -505,7 +512,7 @@ function l10n_community_translate_form_s
   }
   
   // Inform user about changes made to the database.
-  l10n_community_update_message($inserted, $updated, $unchanged, $suggested);
+  l10n_community_update_message($inserted, $updated, $unchanged, $suggested, $duplicates);
 }
 
 // = Theme functions ===========================================================
