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.



if lang is None:
        lang = locale.getdefaultlocale()[0]
    if os.name == 'nt':
        lang = _LOCALE2WIN32.get(lang, lang)
    def process(enc):
        ln = locale._build_localename((lang, enc))
        yield ln
        nln = locale.normalize(ln)
        if nln != ln:
            yield nln
    for x in process('utf8'): yield x
    prefenc = locale.getpreferredencoding()
    if prefenc:
        for x in process(prefenc): yield x
        prefenc = {
            'latin1': 'latin9',
            'iso-8859-1': 'iso8859-15',
            'cp1252': '1252',
        }.get(prefenc.lower())
        if prefenc:
            for x in process(prefenc): yield x
    yield lang
def resetlocale():