Build locale dir env var name consistently

Use get_locale_dir_variable_name to build the environment variable in
get_available_languages() and Message._translate_msgid().

Change-Id: I660debd0680f2c2e29b62c5d6c1bbe29b308b695