UTF8 coding in TCL ?

More
18 Jun 2016 07:09 #76240 by bladekel
Hello All...

I am trying to modify axis.tcl .
I have translated the menu names in to Turkish but I cant use the Turkish characters.

Is anybody know how to use Turkish characters in menu names or etc.?

This one is what I can
setup_menu_accel .menu.file end [_  "_Ac..."]

This one is what I need
setup_menu_accel .menu.file end [_  "_AƧ..."]

Please Log in or Create an account to join the conversation.

More
20 Jun 2016 11:04 #76308 by andypugh
Replied by andypugh on topic UTF8 coding in TCL ?
I believe that you are doing this the wrong way.
The syntax of the essage text includes the sequence [_ and that is an indication that the strings are included in the automatic language conversion system.

You should be editing (or creating) a new .po file, and those can definitely include non-latin characters, see for example:
github.com/LinuxCNC/linuxcnc/blob/master/src/po/zh_HK.po

Some instructions are here:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Internationalization

It should be easier to create a translation this way, as you only need to edit one file, and all the messages are in the same place.
The guide says that you need to install git and compile LinuxCNC from source. I don't know for sure if that is the case. I would be tempted to try creating a .po file and translating a few messages to see what happens.

If you are willing to create a complete translation file then I am sure we can help you to include it in the LinuxCNC distribution.

Please Log in or Create an account to join the conversation.

More
21 Jun 2016 09:32 #76335 by bladekel
Replied by bladekel on topic UTF8 coding in TCL ?
Hmmm. That sounds better.

I was also thinking about translating the messages... If I can do them in one way, that will be fine.

Starting by today, I'm translating LinuxCNC to Turkish.

Please Log in or Create an account to join the conversation.

More
21 Jun 2016 10:29 #76336 by andypugh
Replied by andypugh on topic UTF8 coding in TCL ?
If you open a terminal and type "locale" then you should get something like
LANG=tr_TR.UTF-8

So, you would need to re-name the linuxcnc.pot file to tr_TR.po and then translate all the messages in it.

Unfortunately it looks like the .pot files don't exist until after the compilation stage, and I am not at a Linux PC at the moment to create one.
You can work with one of the files that does exist here:
github.com/LinuxCNC/linuxcnc/tree/2957cc...14909c09a5fb7/src/po
But the problem with that is that any untranslated messages will be in neither Tukish nor English, but whatever source file you chose.

Please Log in or Create an account to join the conversation.

Time to create page: 0.221 seconds
Powered by Kunena Forum