Git cli in Russian after brew upgrade

前端 未结 3 652
迷失自我
迷失自我 2020-12-11 02:38

My git cli switched to russian after brew upgrade. I\'ve tried to find why, or how, but no clue.

$ git --version
git version 2.19.0

How do

相关标签:
3条回答
  • 2020-12-11 03:14

    I added to ~/.bash_profile:

    alias git="LANG=\"en_US.UTF-8\" git"
    

    Then execute source ~/.bash_profile and git is in English at Terminal.

    0 讨论(0)
  • 2020-12-11 03:17

    A simple workaround is to add the following line to your ~/.bashrc or ~/.zshrc file:

    alias git="LANG=\"en_US.UTF-8\" git"
    

    Then execute source ~/.bashrc (or source ~/.zshrc) and voila :)

    0 讨论(0)
  • 2020-12-11 03:21

    It happened because of removing "NO_GETTEXT=1" line here: https://github.com/Homebrew/homebrew-core/commit/2049390786eff5dd50862ee63ddca822dc138c64.

    I think setting LC_* is not an option that's why I recommend either remove /usr/local/Cellar/git/{version}/share/locale/es directory or rebuild git from sources.

    If you want to rebuild git from sources you need to edit homebrew git formula:

    $ brew uninstall git
    $ brew edit git
    
    <<<
    - depends_on "gettext"
    + depends_on "gettext" => :optional
    <<<
    - args = %W[
    + ENV["NO_GETTEXT"] = "1" if build.without? "gettext"
    +
    + args = %W[
    <<<
    :wq
    
    $ brew install -s git
    

    then your git will be built with NO_GETTEXT=1 flag that disables translations.

    Hope it will help.

    I have commented corresponding thread with that issue: https://github.com/Homebrew/homebrew-core/issues/31980#issuecomment-425894125. Voting may help to fix it.

    0 讨论(0)
提交回复
热议问题