On the locally fine construction in uniform spaces, locales and formal spaces