-
Notifications
You must be signed in to change notification settings - Fork 327
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
Add an option to select output language manually #203
Comments
The standard way for console tools to change language is to simply do,
This goes for everything, not only gitinspector. If we add an option it would conflict with the standard way of doing things, so I won't do that. Closing this. |
Ok, but your command |
Are you using the latest stable release or the master branch? I think the master branch needs some additional work with the localization and can have some problems. Also note that you have to use |
I'm using 0.4.3 from ubuntu repos. I realize I need to add |
That locale probably is not defined then. |
It didn't. What do you mean "is not defined"? My system needs to be somehow "aware" of the language I'm trying to use? |
Yes, the locale has to be supported/enabled on the system. You can read about GNU gettext localization (which is what gitinspector and most other console tools use) here, https://www.gnu.org/software/gettext/manual/html_node/Locale-Names.html To list the supported locales on your system you can execute |
I see. |
There is no russian translation in gitinspector. Not in 0.4.3 anyway. |
Ok, I'll look into it and try to figure out what is supposed to be done. |
I'm trying this in Windows 10 with git bash and also in Ubuntu (WSL):
The result is always English for me (as well as if I use it to generate HTML files). |
@fuhrmanator You need to have that locale enabled in your system for it to pick it up. Did you try |
Yes,
it's still English. I tried several variants ( |
@fuhrmanator None of this is specific to gitinspector. Try the same for something like the Make sure you are using 0.4.4. Did you install gitinspector via the debian package? If you installed it some other way, maybe it's just unable to find the language files. An example run of how its supposed to work:
Standard language on this system is Swedish (which it picks up by default), but I can change to any of the ones listed under |
Ok, it's not working for For my WSL, there were no locales for French, so I added them using this process and basic commands now work:
With
which looks great. However, the With On a related note, I have a question: the GNU gettext .po/.mo option for translating (I just learned about it) seems fragile when you change a string in the base language. Do all the the .po files have to be manually changed? Is this why the |
As you figured out - No, it's not a bug. If you want stable translations, please use the stable version (0.4.4). If a string changes (which it has in the master branch, there is no translation available until the language files are updated. I don't recommend using 0.5.0 until it's actually released and marked as final. Translations are only done just prior to new releases. One of these days I plan on having time to do 0.5.0. Then I will ask the translators to update the language files. |
I did some more digging, and even on the v0.4.4 version I was able to fix both problems in v0.4.4 by re-generating a Would it be possible to get the stable (0.4.4) version of the npm package? The earliest npm version (that I could find) is 0.5.0. This answer might explain how it can be done. Maybe this is moot if you plan to release 0.5.0 soon (seems like it's been baking a long time)? I totally understand the time problem :) Thanks again for your help! |
I tried to change system language with
LANG=...
, but it seems to have no effect. In any way, it is not very convenient to change your system language.The text was updated successfully, but these errors were encountered: