Git: How can I use localisation files in Git for Windows

Created on 10 Apr 2016  路  9Comments  路  Source: git-for-windows/git

  • [x] I was not able to find an open
    or closed issue
    matching what I'm seeing

64-bits Git 2.7.1.windows.2 on Windows 10 build 14925, but also appeared on 10586.

Whenever I run a git command, in any shell, I get this:

C:\Users\Charles\Git\APNGViewer>git push
sh: warning: setlocale: LC_ALL: cannot change locale (fr): No such file or directory
sh: warning: setlocale: LC_ALL: cannot change locale (fr): No such file or directory
Everything up-to-date

Because the environement variable LC_ALL is set to fr, but Git or sh (not sure which one) was not able to find it's appropriate localisation files. I know that some exists, but they don't seem to be bundled with a Git for Windows setup.

For example, make:

C:\Users\Charles\Git\APNGViewer>make
make: *** Pas de cibles sp茅cifi茅es et aucun makefile n'a 茅t茅 trouv茅. Arr锚t.

It has the appropriate localisation files, and thus shows content in French.

How can I use the localisation files to get French translations and fix this error?

question

All 9 comments

----- Original Message -----
From: Charles Milette
To: git-for-windows/git
Sent: Sunday, April 10, 2016 1:08 AM
Subject: [git-for-windows/git] How can I use localisation files in Git for Windows (#724)

a..  I was not able to find an open or closed issue matching what I'm seeing 

64-bits Git 2.7.1.windows.2 on Windows 10 build 14925, but also appeared on 10586.

Whenever I run a git command, in any shell, I get this:

C:\Users\Charles\Git\APNGViewer>git push
sh: warning: setlocale: LC_ALL: cannot change locale (fr): No such file or directory
sh: warning: setlocale: LC_ALL: cannot change locale (fr): No such file or directory
Everything up-to-date
Because the environement variable LC_ALL is set to fr, but Git or sh (not sure which one) was not able to find it's appropriate localisation files. I know that some exists, but they don't seem to be bundled with a Git for Windows setup.

For example, make:

C:\Users\Charles\Git\APNGViewer>make
make: *** Pas de cibles sp茅cifi茅es et aucun makefile n'a 茅t茅 trouv茅. Arr锚t.
It has the appropriate localisation files, and thus shows content in French.

How can I use the localisation files to get French translations and fix this error?

IIRC the full set of translations is not bundled into the release (see Release notes) as most users have been using the default 'US English'.

The solution would be to download the french translation files.

Philip

It seems that they are in the .po format, while make's translations files are in .mo. How can I convert them to .mo and where do I need to put them?

I tried C:\Program Files\Git\mingw64\share\locale\fr\LC_MESSAGES\git.mo and C:\Program Files\Git\share\locale\fr\LC_MESSAGES\git.mo, but none works.

The localization files are properly built and installed when you use Git for Windows' SDK. However, they are excluded from the installer because

  1. they would increase the size of the installer substantially, and
  2. many users made their wish known to keep Git for Windows unlocalized.

----- Original Message -----
From: Johannes Schindelin
To: git-for-windows/git
Cc: Philip Oakley
Sent: Monday, April 11, 2016 11:34 AM
Subject: Re: [git-for-windows/git] How can I use localisation files in Git for Windows (#724)

The localization files are properly built and installed when you use Git for Windows' SDK. However, they are excluded from the installer because

1.. they would increase the size of the installer substantially, and 
2.. many users made their wish known to keep Git for Windows unlocalized. 

Dscho,
Is there a documented mechanism for regular users to pick up the localisation if they want it?
[I agree about point 1.]

I didn't find any. Maybe a separate installer for the translation, as TortoiseGit, so that the user could install the language if needed.

I haven't been able to fully compile git, but enough to get the translations. I copied them into C:\Program Files\Git\mingw64\share\locale\$LC_ALL\LC_MESSAGES\git.mo and C:\Program Files\Git\mingw64\share\git-gui\lib\msgs\$LC_ALL.msgand they worked.
I won't close this issue for now, to see if we can implement something to get the translation files for the end user.

Notice: git is now translated, but I still get sh: warning: setlocale: LC_ALL: cannot change locale (fr): No such file or directory.
Putting the bash translation files the same way than with git didn't worked.

Is there a documented mechanism for regular users to pick up the localisation if they want it?

@PhilipOakley only via the SDK (there is a switch you can use to generate installers with localization).

I haven't been able to fully compile git

Please file a proper bug report.

I still get sh: warning: setlocale: LC_ALL: cannot change locale (fr): No such file or directory.
Putting the bash translation files the same way than with git didn't worked.

You need to copy _all_ localization files, not just git's and bash's.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yegorich picture yegorich  路  3Comments

daxelrod picture daxelrod  路  4Comments

vocaviking picture vocaviking  路  5Comments

sschlesier picture sschlesier  路  3Comments

rangka-kacang picture rangka-kacang  路  3Comments