human
Complete this python program:
def findT(path, language=DEFAULT_LANGUAGE):
assistant
#Here is the Python program you requested.

    """Note:
    Must be run by the admin app
    """
    from gluon.tools import Auth, Crud
    lang_file = pjoin(path, 'languages', (language + '.py'))
    sentences = read_dict(lang_file)
    mp = pjoin(path, 'models')
    cp = pjoin(path, 'controllers')
    vp = pjoin(path, 'views')
    mop = pjoin(path, 'modules')
    def add_message(message):
        if ((not message.startswith('#')) and (not ('\n' in message))):
            tokens = message.rsplit('##', 1)
        else:
            tokens = [message]
        if (len(tokens) == 2):
            message = ((tokens[0].strip() + '##') + tokens[1].strip())
        if (message and (not (message in sentences))):
            sentences[message] = message.replace('@markmin\x01', '')
    for filename in (((listdir(mp, '^.+\\.py$', 0) + listdir(cp, '^.+\\.py$', 0)) + listdir(vp, '^.+\\.html$', 0)) + listdir(mop, '^.+\\.py$', 0)):
        data = to_native(read_locked(filename))
        items = regex_translate.findall(data)
        for x in regex_translate_m.findall(data):
            if (x[0:3] in ["'''", '"""']):
                items.append(('%s@markmin\x01%s' % (x[0:3], x[3:])))
            else:
                items.append(('%s@markmin\x01%s' % (x[0], x[1:])))
        for item in items:
            try:
                message = safe_eval(item)
            except:
                continue
            add_message(message)
    gluon_msg = [Auth.default_messages, Crud.default_messages]
    for item in [x for m in gluon_msg for x in m.values() if (x is not None)]:
        add_message(item)
    if (not ('!langcode!' in sentences)):
        sentences['!langcode!'] = (DEFAULT_LANGUAGE if (language in ('default', DEFAULT_LANGUAGE)) else language)
    if (not ('!langname!' in sentences)):
        sentences['!langname!'] = (DEFAULT_LANGUAGE_NAME if (language in ('default', DEFAULT_LANGUAGE)) else sentences['!langcode!'])
    write_dict(lang_file, sentences)