Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use localisation files in Git for Windows #724

Closed
1 task done
sylveon opened this issue Apr 10, 2016 · 11 comments
Closed
1 task done

How can I use localisation files in Git for Windows #724

sylveon opened this issue Apr 10, 2016 · 11 comments
Labels

Comments

@sylveon
Copy link

sylveon commented Apr 10, 2016

  • 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?

@PhilipOakley
Copy link

----- 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

@sylveon
Copy link
Author

sylveon commented Apr 10, 2016

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?

@sylveon
Copy link
Author

sylveon commented Apr 11, 2016

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.

@dscho
Copy link
Member

dscho commented Apr 11, 2016

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 dscho added the question label Apr 11, 2016
@PhilipOakley
Copy link

----- 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.]

@sylveon
Copy link
Author

sylveon commented Apr 11, 2016

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

@sylveon
Copy link
Author

sylveon commented Apr 11, 2016

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.

@sylveon
Copy link
Author

sylveon commented Apr 11, 2016

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.

@dscho
Copy link
Member

dscho commented Apr 13, 2016

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.

@zhchch
Copy link

zhchch commented Dec 6, 2022

Solution?

@dscho
Copy link
Member

dscho commented Dec 6, 2022

Solution?

Build Git for Windows manually, including the localization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants