--- support.module	Sat Sep 22 23:49:34 2012
+++ support.module	Mon Sep 24 13:07:31 2012
@@ -284,7 +284,7 @@
     'type' => MENU_CALLBACK,
   );
 
-  $states = array(-3 => 'all', -2 => 'all open', -1 => 'my open') + _support_states();
+  $states = array(-3 => 'all', -2 => 'all open', -1 => 'my open') + _support_states(TRUE, NULL, NULL, TRUE);
   $result = db_query('SELECT clid, path, name FROM {support_client} WHERE status = :status AND parent = :parent', array(':status' => 1, ':parent' => 0));
   foreach ($result as $client) {
     $items["support/$client->path"] = array(
@@ -2993,11 +2993,11 @@
 /**
  * Helper function to list available states.
  */
-function _support_states($all = TRUE, $sid = NULL, $account = NULL) {
+function _support_states($all = TRUE, $sid = NULL, $account = NULL, $preserve_names = FALSE) {
   static $states = array();
   $admin = user_access('can administer state', $account);
 
-  if (!isset($states["$admin-$all-$sid"])) {
+  if (!isset($states["$admin-$all-$sid-$preserve_names"])) {
     if ($admin || $all) {
       $result = db_query("SELECT sid, state FROM {support_states} ORDER BY weight");
     }
@@ -3008,15 +3008,18 @@
       $result = db_query("SELECT sid, state FROM {support_states} WHERE phase2 = :phase2 ORDER BY weight", array(':phase2' => 1));
     }
     foreach ($result as $state) {
-      $states["$admin-$all-$sid"][$state->sid] = $state->state;
+      $states["$admin-$all-$sid-$preserve_names"][$state->sid] = $state->state;
     }
     // include the current state, even if user doesn't actually have access
-    if ($sid && !in_array($sid, $states["$admin-$all-$sid"])) {
-      $states["$admin-$all-$sid"][$sid] = db_query("SELECT state FROM {support_states} WHERE sid = :sid", array(':sid' => $sid))->fetchField();
+    if ($sid && !in_array($sid, $states["$admin-$all-$sid-$preserve_names"])) {
+      $states["$admin-$all-$sid-$preserve_names"][$sid] = db_query("SELECT state FROM {support_states} WHERE sid = :sid", array(':sid' => $sid))->fetchField();
+    }
+    if (function_exists('i18n_string_translate') && !$preserve_names) {
+      $states["$admin-$all-$sid-$preserve_names"] = i18n_string_translate("support:state:*:state", $states["$admin-$all-$sid-$preserve_names"]);
     }
   }
-
-  return $states["$admin-$all-$sid"];
+ 
+  return $states["$admin-$all-$sid-$preserve_names"];
 }
 
 /**
@@ -3044,7 +3047,7 @@
 /**
  * Helper function to list available priorities.
  */
-function _support_priorities($pid = NULL) {
+function _support_priorities($pid = NULL, $preserve_names = FALSE) {
   static $priorities = array();
 
   if (empty($priorities)) {
@@ -3053,6 +3056,10 @@
       $priorities[$priority->pid] = $priority->priority;
     }
   }
+  
+  if (function_exists('i18n_string_translate') && is_array($priorities) && !$preserve_names) {
+    $priorities = i18n_string_translate("support:priority:*:priority", $priorities);
+  }  
 
   if ($pid && isset($priorities[$pid])) {
     return $priorities[$pid];
@@ -3917,3 +3924,39 @@
     }
   }
 }
+
+
+/**
+ * Implements hook_i18n_string_info().
+ */
+function support_i18n_string_info() {
+  $groups['support'] = array(
+    'title' => t('Support'),
+    'description' => t('Translatable Support elements'),
+    'format' => FALSE, // This group has strings with format.
+    'list' => TRUE, // This group can list all strings.
+  );
+  return $groups;
+}
+
+function support_i18n_string_refresh($group) {
+  if ($group === 'support') {
+    _support_update_i18n_strings();
+  }
+  return TRUE;
+}
+
+
+function _support_update_i18n_strings($names = array()) {
+  if (!function_exists('i18n_string_update')) {
+    return;
+  }
+  $items = _support_states(TRUE, NULL, NULL, TRUE);
+  foreach ($items as $id => $item) {
+    i18n_string_update("support:state:{$id}:state", $item);
+  }
+  $items = _support_priorities(NULL, TRUE);
+  foreach ($items as $id => $item) {
+    i18n_string_update("support:priority:{$id}:priority", $item);
+  }
+}
\ No newline at end of file
