code: def translate_state(self, s):
          
          if not isinstance(s, basestring):
              return s
          s = s.capitalize().replace("_", " ")
          return t(_(s))
docs: Translate the given state string