def METHOD_NAME(
    inputfile,
    outputfile,
    templatefile,
    encoding="cp1252",
    includefuzzy=False,
    remove_untranslated=False,
    outputthreshold=None,
):
    """wraps po2prop but converts outputfile to properties first"""
    outputpropfile = BytesIO()
    if templatefile is not None:
        templatelines = templatefile.readlines()
        templateproplines = list(
            mozfunny2prop.it2prop(templatelines, encoding=encoding)
        )
        templatepropfile = BytesIO("".join(templateproplines).encode())
    else:
        templatepropfile = None
    result = po2prop.convertmozillaprop(
        inputfile,
        outputpropfile,
        templatepropfile,
        includefuzzy=includefuzzy,
        remove_untranslated=remove_untranslated,
        outputthreshold=outputthreshold,
    )
    if result:
        outputpropfile.seek(0)
        pf = properties.propfile(outputpropfile, personality="mozilla")
        outputlines = prop2it(pf)
        for line in outputlines:
            line = line.encode(encoding)
            outputfile.write(line)
    return result