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.



elif not row.get('translation'):
                    row['translation'] = ''
                writer.write(row['modules'], row['tnrs'], src, row['translation'], row['comments'])
        elif format == 'tgz':
            rows_by_module = defaultdict(list)
            for row in rows:
                module = row[0]
                rows_by_module[module].append(row)
            with tarfile.open(fileobj=buffer, mode='w|gz') as tar:
                for mod, modrows in rows_by_module.items():
                    with io.BytesIO() as buf:
                        _process('po', [mod], modrows, buf, lang)
                        buf.seek(0)
                        info = tarfile.TarInfo(
                            join(mod, 'i18n', '{basename}.{ext}'.format(
                                basename=lang or mod,
                                ext='po' if lang else 'pot',
                            )))
                        
                        
                        info.size = len(buf.getvalue())
                        tar.addfile(info, fileobj=buf)
        else:
            raise Exception(_('Unrecognized extension: must be one of '
                '.csv, .po, or .tgz (received .%s).') % format)
    translations = trans_generate(lang, modules, cr)
    modules = set(t[0] for t in translations)
    _process(format, modules, translations, buffer, lang)
    del translations
def trans_parse_rml(de):