fix locale installation logic

this simulates correct gettext behavior