Index: sites/all/modules/contrib/stringoverrides/stringoverrides.module
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- sites/all/modules/contrib/stringoverrides/stringoverrides.module	(revision 4ed59fc9286ce1f5842f14faa9be222dc5e66eef)
+++ sites/all/modules/contrib/stringoverrides/stringoverrides.module	(revision )
@@ -13,6 +13,7 @@
     case 'admin/help#stringoverrides':
       $output = '<p>' . t('The <strong>String Overrides</strong> module provides a quick and easy way of replacing text.') . '</p>';
       $output .= '<p>' . t('To replace a string, enter <strong>the complete string</strong> that is passed through the <a href="@t">t()</a> function. String Overrides cannot translate user-defined content, it can only replace strings wrapped in the t() function. To find the strings you can actually change, open up a module and look for t() function calls. Places where %, @, or ! are used means that the translation contains dynamic information (such as the node type or title in the above examples); these are not translated while the text around them is.', array('@t' => 'http://api.drupal.org/api/function/t')) . '</p>';
+      $output .= '<p>' . t('Overrides with a context of "js" will be applied to JavaScript translations.') . '</p>';
       $output .= theme('item_list', array(
         'title' => t('Examples'),
         'items' => array(
@@ -97,4 +98,21 @@
       'file' => 'stringoverrides.admin.inc',
     ),
   );
+}
+
+/**
+ * Implements hook_js_alter().
+ */
+function stringoverrides_js_alter(&$javascript) {
+  global $language;
+  if (isset($language->language)) {
+    $translations = variable_get('locale_custom_strings_' . $language->language);
+    if (isset($translations['js'])) {
+      // Add stringoverrides.js to the page, as well as the overrides into the
+      // JavaScript settings.
+      $file = drupal_get_path('module', 'stringoverrides') . '/js/stringoverrides.js';
+      $javascript[$file] = drupal_js_defaults($file);
+      $javascript['settings']['data'][] = array('stringoverrides' => $translations['js']);
+    }
+  }
 }
Index: sites/all/modules/contrib/stringoverrides/js/stringoverrides.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- sites/all/modules/contrib/stringoverrides/js/stringoverrides.js	(revision )
+++ sites/all/modules/contrib/stringoverrides/js/stringoverrides.js	(revision )
@@ -0,0 +1,21 @@
+(function($) {
+
+/**
+ * String Overrides behavior to load in JavaScript-based translations.
+ */
+Drupal.behaviors.stringoverrides = {
+  attach: function (context, settings) {
+    alert(90);
+    if (settings.stringoverrides || false) {
+      // Make sure the JavaScript localization is available.
+      Drupal.locale = Drupal.locale || {};
+      Drupal.locale.strings = Drupal.locale.strings || {};
+      Drupal.locale.strings[''] = Drupal.locale.strings[''] || {};
+
+      // Add the string overrides translations to the Drupal.locale array.
+      jQuery.extend(Drupal.locale.strings[''], settings.stringoverrides);
+    }
+  }
+};
+
+})(jQuery);
