Sublime Forum

How to disable localized error messages?

#1

When there is a problem I get error messages in Swedish! I really want everything in English for my programming environment.

How can I change this? And why does SublimeMerge think it should use Swedish?

In my mac system preferences I have English as my primary language. I only use Sweden as my region, to get time/calendar formatting.

Example error message

fatal: Kunde inte l"asa fran fj"arrarkiv.

Se till att du har korrekt atkomstbeh"orighet
och att arkivet existerar.

Also note that even if I was ok with messages in swedish, the message is incorrectly formated for the Swedish letters, it should be läsa, fjärrarkiv, and åtkomstbehörighet

0 Likes

#2

what happens when you execute Git commands from a terminal? does it also use Swedish language? (side question: which git binary is your Sublime Merge configured to use?)

0 Likes

#3

Nope, running from terminal is english

$ git co feature/swarm-deploy
error: Your local changes to the following files would be overwritten by checkout:
        version.json
Please commit your changes or stash them before you switch branches.
Aborting

and in SublimeMerge

error: Dina lokala "andringar av f"oljande filer skulle skrivas "over av utcheckning:
	version.json
Checka in dina "andringar eller anv"and "stash" innan du byter gren.
Avbryter

In terminal I am using git from homebrew on Mac

$ which git
/usr/local/bin/git

$ git --version
git version 2.19.1

In sublime I have not changed any default, git_binary says Prefer system over bundled

Now I also tested explicitly setting git_binary to /usr/local/bin/git, but still getting Swedish.

0 Likes

#4

maybe an environment variable is different in Sublime Merge - did you try launching Sublime Merge from the terminal?

0 Likes

#5

Yup, works when launched from the terminal.

I notice that I have since before added this to my .zshrc

export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

If I remove these I get the Swedish version in the terminal as well, even with the command line git.

But I do not understand where git determines that the locale is Swedish :confused:

This is my defaults, when removing the exports from my shell init script

$ locale 
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

Where does Swedish come from? :sob:

0 Likes

#6

I found a solution for setting globally on Mac

$ launchctl setenv LANG en_US.UTF-8

And this can be set with a launch script using something like this

0 Likes

#7

This setting seem to mess with Mac OS keyboard language switching functionality. And it does seem to reset between restart. Setting this up on multiple computers is a bit of a hassle.

Providing a setting for this inside SublimeMerge would be really helpful!

1 Like

#8

Same issues here. I use English locales everywhere on my system (macOS preferences, shell environment, profile etc.) My system region is set to Japan.

In terminal, git error messages show up in English, but in SublimeMerge they are… German? I use German keyboard settings from time to time, so maybe that’s where it’s coming from. Still, nobody here except me understands German, so it would be nice to show the right locales instead.

0 Likes