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.10
diff -u -p -r1.1.2.10 ajax.inc
--- l10n_community/ajax.inc	23 Feb 2008 10:52:10 -0000	1.1.2.10
+++ l10n_community/ajax.inc	7 Mar 2008 22:22:24 -0000
@@ -134,3 +134,24 @@ function l10n_community_string_decline($
   print 'error';
   exit;
 }
+
+/**
+ * Remote submission, no form exposed, so we get the data by POST.
+ */
+function l10n_community_string_remote($langcode) {
+  global $user;
+  
+  if (!empty($_POST['source']) && !empty($_POST['target'])) {
+    if ($sid = db_result(db_query("SELECT sid FROM {l10n_community_string} WHERE value = '%s'", $_POST['source']))) {
+      // Always save this as suggestion.
+      l10n_community_target_save(
+        $sid, $_POST['target'], $langcode, $user->uid, TRUE,
+        $inserted, $updated, $unchanged, $suggested
+      );
+      watchdog('l10n_server', 'saved');
+    }
+      watchdog('l10n_server', 'post');
+  }
+  watchdog('l10n_server', 'invoked');
+  echo '<script>alert("'. check_plain(var_export($_POST), TRUE) . '")</script>';
+}
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.15
diff -u -p -r1.1.2.15 l10n_community.module
--- l10n_community/l10n_community.module	2 Jan 2008 23:14:12 -0000	1.1.2.15
+++ l10n_community/l10n_community.module	7 Mar 2008 22:22:25 -0000
@@ -151,6 +151,17 @@ function l10n_community_menu($may_cache)
       'type' => MENU_CALLBACK,
     );
     
+    if ((arg(1) == 'remote') && ($langcode = arg(2)) && ($languages = l10n_community_get_languages('name')) && isset($languages[$langcode])) {
+      $items[] = array(
+        'title' => t('Remote translation submission'),
+        'path' => 'translate/remote/'. $langcode,
+        'callback' => 'l10n_community_page_wrapper',
+        'callback arguments' => array('ajax', 'l10n_community_string_remote', $langcode),
+        'access' => user_access('access localization community'), //&& (l10n_community_get_permission($langcode) != L10N_PERM_NONE),
+        'type' => MENU_CALLBACK,
+      );
+    }
+    
     drupal_add_css(drupal_get_path('module', 'l10n_community') .'/l10n_community.css', 'module');
     // For the translation overview pages. This is used to present admin page like panels.
     drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
