Impacted versions:
Master branch, should by 12.0

Steps to reproduce:
Install a third party addon with localization po file in i18n folder, even loading translation manually, the translation won't work, The console reports error: Translation .... not found in reference pot, skipping.
Reverse the change of  "odoo/tools/translate.py" in this commit, the issue was gone.

Expected behavior:
The po translation works as before.



odoo/tools/translate.py
todo.append(child)
                todo_has_text = todo_has_text or child_has_text
        
        if (
            node.tag in TRANSLATED_ELEMENTS and
            not (result.text or len(result)) and
            not any(name.startswith("t-") for name in node.attrib)
        ):
            
            append_content(result, todo)
            result.tail = node.tail
            has_text = todo_has_text or nonspace(result.text) or nonspace(result.tail)
            return (has_text, result)
        
        append_content(result, translate_content(todo) if todo_has_text else todo)
        
        for name, value in result.attrib.items():
            if name in TRANSLATED_ATTRS:
                result.set(name, translate_text(value) or value)
        
        result.tail = node.tail
        return (None, result)
    has_text, node = process(node)
    if has_text is True:
        
        wrapped = etree.Element('div')
        wrapped.append(node)
        return translate_content(wrapped)[0]
    return node
def parse_xml(text):