Handle variants of the same language code in TM
Handle variants of the same language code in TM

The translation memory stores full language code (e.g. cs_CZ) and search
required identical match. This caused problem particularly for languages
that are same in different locales (e.g. cs and cs_CZ are
interchangeable).

Make the search more inteligent by searching both variants: search using
the short version too and use prefix search in the other direction.
Penalize the secondary search term slightly to give the right results
when the difference *does* matter (e.g. pt vs. pt_BR or zh_CN vs. zh_TW).

dwaynebailey/poedit,egoitzro/poedit,egoitzro/poedit,alexhenrie/poedit,babycaseny/poedit,PKRoma/poedit,nawawi/poedit,vslavik/poedit,dwaynebailey/poedit,dwaynebailey/poedit,c72578/poedit,PatidarWeb/poedit,vslavik/poedit,BenKeyFSI/poedit,PatidarWeb/poedit,nawawi/poedit,huoxudong125/poedit,PKRoma/poedit,c72578/poedit,alexhenrie/poedit,c72578/poedit,BenKeyFSI/poedit,vslavik/poedit,egoitzro/poedit,egoitzro/poedit,PKRoma/poedit,dwaynebailey/poedit,c72578/poedit,huoxudong125/poedit,nawawi/poedit,alexhenrie/poedit,babycaseny/poedit,babycaseny/poedit,babycaseny/poedit,babycaseny/poedit,nawawi/poedit,PatidarWeb/poedit,BenKeyFSI/poedit,PatidarWeb/poedit,PKRoma/poedit,alexhenrie/poedit,dwaynebailey/poedit,BenKeyFSI/poedit,egoitzro/poedit,PKRoma/poedit,vslavik/poedit,PatidarWeb/poedit,c72578/poedit,huoxudong125/poedit,huoxudong125/poedit,nawawi/poedit,BenKeyFSI/poedit,huoxudong125/poedit,vslavik/poedit,alexhenrie/poedit