Fall back to language name for translations lookup if locale name fails
For locales like de_AT, the current code only looks in
share/locale/de_AT/ and share/locale/de-AT/ for translation catalogs,
but not in share/locale/de/ where they most likely are.
That's because bcp47Name() returns "de-AT" for de_AT (though in the
case of de_DE e.g. it does return "de").
This patch additionally tries to fall back to the general language by
taking the part of the locale name before the first '_'.
Differential Revision: https://phabricator.kde.org/D9793