[LinuxCNC/linuxcnc PR#535] Fix multi-language loading error for “tklinuxcnc” UI

未分类 bolang 5个月前 (10-15) 28次浏览

Issue #535 | 状态: 已关闭 | 作者: Solitarily | 创建时间: 2018-11-29


In the test “tklinuxcnc” UI found that other languages could not be loaded. First I found the language path definition in “/src/configure.ac” is wrong, I fixed it, but multi-language still can’t work. Then I found that the sentence “msgcat::mclocale $env(LANG)” in “/tcl/tklinuxcnc.tcl” and “/tcl/linuxcnc.tcl.in” is the key to the problem. I looked in the relevant documentation and wrote: (“msgcat::mclocale?newLocale?” This function sets the locale to newLocale. If newLocale is omitted, the current locale is returned). So I deleted “$env(LANG)”, which proved to be correct, and now multi-language loading works fine.

Document link:http://www.tcl.tk/man/tcl8.4/TclCmd/msgcat.htm#M8


评论 (2)

#1 – jepler 于 2018-11-29

@Solitarily In the future, can you use a branch other than “master” as your branch name when preparing pull requests for LinuxCNC?

The reason for this is, if you push any other work to your “master” branch, it will immediately become a part of this Pull Request, even if it is not intended to be thus.

By creating a different branch for each PR you submit, you can ensure that the work for each PR is kept separate.


#2 – Solitarily 于 2018-11-29

> @Solitarily In the future, can you use a branch other than “master” as your branch name when preparing pull requests for LinuxCNC?
>
> The reason for this is, if you push any other work to your “master” branch, it will immediately become a part of this Pull Request, even if it is not intended to be thus.
>
> By creating a different branch for each PR you submit, you can ensure that the work for each PR is kept separate.

Ok, I will take your advice.


原始Issue: https://github.com/LinuxCNC/linuxcnc/pull/535

喜欢 (0)