def _(string, doNotTranslate=False, hotKey=False):
    """Returns the translated 'string', or 'string' itself if no translation found."""
    if isinstance(string, str):
        string = unicode(string, enc)
    if doNotTranslate:
        return string
    if not isinstance(string, (str, unicode)):
        return string
    trn = string_cache.get(string, string)
    if trn == string and '-' in string:
        # Support for hotkeys
        trn = '-'.join([_(a, hotKey=True) for a in string.split('-') if _(a, hotKey=True) != a or a])
        hotKey = True
    # We don't want hotkeys and blank strings.
    if buildTemplate and not hotKey and string.strip():
        global template
        global strNum
        if (string, None) not in [(a, None) for a, b in template.values()]:
            template[len(template.keys())] = (string, "")
            strNum += 1
    return trn or string
Returns the translated 'string', or 'string' itself if no translation found.
albow/translate.py