I can’t export es_XX custom language and I suspect that could be related to wrong configuration but then I see that production password and host seems to be not declared on yml files.
I tried to play with LANG and DISCOURSE_DEFAULT_LOCALE but it shouldn’t enough.
Currently I have LANG = en_US.UTF-8
and DISCOURSE_DEFAULT_LOCALE = es
(and that allows me to fix trust_level on custom-locale issue as workaround).