Avoid duplicate entries in all_locales

For some reason the equality check of babel Locale objects doesn't work
as expected, therefore we store its string representation in the done-
set.
Don't add c.locale in all_locales if empty