Index: l10n_community/export.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/l10n_server/l10n_community/Attic/export.inc,v
retrieving revision 1.1.2.15.2.24.2.15
diff -u -r1.1.2.15.2.24.2.15 export.inc
--- l10n_community/export.inc	11 Aug 2010 11:19:25 -0000	1.1.2.15.2.24.2.15
+++ l10n_community/export.inc	26 Oct 2010 21:12:42 -0000
@@ -255,8 +255,14 @@
     // format, where the numbers represent the line numbers of source
     // occurances in the respective source files.
     $comment = array();
+    $injs = FALSE;
     foreach ($export_string['comment'] as $path => $lines) {
       $comment[] = preg_replace('!(^[^/]+/)!', '', $path) .':'. join(',', array_keys($lines));
+      if (preg_match('!.js$!', $path)) {
+        // This string appears in JS files. Important to export in the compact
+        // method, so Drupal can still associate it with JS files.
+        $injs = TRUE;
+      }
     }
     $comment = '#: '. join('; ', $comment) ."\n";
 
@@ -307,10 +313,13 @@
 
     // Append extension.
     $filename .= ($template ? '.pot' : ($version != 'flat-package' ? ('.'. $language->language) : '') .'.po');
-
+    // Lead with a comment for this file.
     if (!$compact) {
       $output = $comment;
     }
+    elseif ($injs) {
+      $output = "#: in.js\n";
+    }
 
     $fuzzy = FALSE;
     if ($suggestions) {
