On the Axis of the Chinese language to improve, add the Gmoccapy Chinese language.
评论 (16)
#2 – Solitarily 于 2017-08-28
The tooltip_markup exists that causes the button to not support multiple languages, so you need to remove it.
#3 – Solitarily 于 2017-08-28
Button to add tooltip_markup should be a mistake, and I saw the 2.8.0 source code, which has been deleted in 2.8.0.
#4 – gmoccapy 于 2017-08-28
Please do not delete the tool tips from the glade file!
You can extract that text from the glade file and include them in the translation, i did that for german and spanish translation.
Unfortunately i am not on my computer to send a howto.
#5 – Solitarily 于 2017-08-29
Hi @gmoccapy
I did not delete the tool tips . I just deleted the (name = “tooltipmarkup”) instead of (name = “tooltiptext”). German and Spanish are also extracted from the (name = “tooltip_text”), so this does not affect German and Spanish or other language translations.
Of course I also accept your opinion, I will try to extract tooltip_markup.
#6 – jepler 于 2017-08-29
@gmoccapy if it requires manual steps to put a msgid into the .pot file, that is not ok. Please describe what you knew in a new issue so that hopefully someone else can resolve the problem.
#7 – jepler 于 2017-08-29
Some projects I found via search say translatable="yes" next to this property in the glade file, e.g., https://github.com/gtk-rs/examples/blob/master/src/bin/builder_basics.glade#L22
~~~~
perhaps this is an appropriate solution to the tooltip_markup property localization problem?
#8 – gmoccapy 于 2017-08-29
body {font-family: ‘monospace’;}I will post a HowTo asap.
Norbert
Von meinem Fonepad gesendet
Jeff Epler schrieb:@gmoccapy if it requires manual steps to put a msgid into the .pot file, that is not ok. Please describe what you knew in a new issue so that hopefully someone else can resolve the problem.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
{“apiversion”:”1.0″,”publisher”:{“apikey”:”05dde50f1d1a384dd78767c55493e4bb”,”name”:”GitHub”},”entity”:{“externalkey”:”github/LinuxCNC/linuxcnc”,”title”:”LinuxCNC/linuxcnc”,”subtitle”:”GitHub repository”,”mainimageurl”:”https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png”,”avatarimage_url”:”https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png”,”action”:{“name”:”Open in GitHub”,”url”:”https://github.com/LinuxCNC/linuxcnc”}},”updates”:{“snippets”:[{“icon”:”PERSON”,”message”:”@jepler in #319: @gmoccapy if it requires manual steps to put a msgid into the .pot file, that is not ok. Please describe what you knew in a new issue so that hopefully someone else can resolve the problem.”}],”action”:{“name”:”View Pull Request”,”url”:”https://github.com/LinuxCNC/linuxcnc/pull/319#issuecomment-325673881″}}}
I will post a HowTo asap.NorbertVon meinem Fonepad gesendetJeff Epler
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
{“apiversion”:”1.0″,”publisher”:{“apikey”:”05dde50f1d1a384dd78767c55493e4bb”,”name”:”GitHub”},”entity”:{“externalkey”:”github/LinuxCNC/linuxcnc”,”title”:”LinuxCNC/linuxcnc”,”subtitle”:”GitHub repository”,”mainimageurl”:”https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png”,”avatarimage_url”:”https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png”,”action”:{“name”:”Open in GitHub”,”url”:”https://github.com/LinuxCNC/linuxcnc”}},”updates”:{“snippets”:[{“icon”:”PERSON”,”message”:”@jepler in #319: @gmoccapy if it requires manual steps to put a msgid into the .pot file, that is not ok. Please describe what you knew in a new issue so that hopefully someone else can resolve the problem.”}],”action”:{“name”:”View Pull Request”,”url”:”https://github.com/LinuxCNC/linuxcnc/pull/319#issuecomment-325673881″}}}
#9 – Solitarily 于 2017-09-01
@jepler very sorry! I read the glade wiki found that tooltiptext and tooltipmarkup have the same functionality, so I deleted the tooltip_markup. The next time I will be translated according to your method. thank you very much!
#10 – gmoccapy 于 2017-09-03
Am 29.08.2017 um 16:06 schrieb Jeff Epler:
>
> Some projects I found via search say |translatable=”yes”| next to this
> property in the glade file, e.g.,
> https://github.com/gtk-rs/examples/blob/master/src/bin/builder_basics.glade#L22
>
> |
> trying this example
>
> perhaps this is an appropriate solution to the tooltip_markup property
> localization problem?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/LinuxCNC/linuxcnc/pull/319#issuecomment-325675038>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AGgE-ekmfWr1uxF9TFwzHS7qaR4y_pzhks5sdBrtgaJpZM4PE1yL>.
>
Please find attached my script to extract all relevant text from all
files related to gmoccapy at once.
This script should work with small modifications for all languages
without the need to change source code.
Norbert
#11 – jepler 于 2017-09-03
@gmoccapy attachments cannot be sent to github issues via e-mail. Consider creating a gist a gist.github.com and then linking to it here.
That said, I want to reiterate what I said above: If your workflow to get source strings (“msgid”s) into the .po or .pot file involves doing anything other than “make”, then the workflow needs to change (possibly by integrating this script you are referring to into the Makefiles).
#12 – gmoccapy 于 2017-09-04
Am 03.09.2017 um 22:47 schrieb Jeff Epler:
>
> @gmoccapy <https://github.com/gmoccapy> attachments cannot be sent to
> github issues via e-mail. Consider creating a gist a gist.github.com
> and then linking to it here.
>
> That said, I want to reiterate what I said above: If your workflow to
> get source strings (“msgid”s) into the .po or .pot file involves doing
> anything other than “make”, then the workflow needs to change
> (possibly by integrating this script you are referring to into the
> Makefiles).
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/LinuxCNC/linuxcnc/pull/319#issuecomment-326830223>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AGgE-fwfm22IyMJDFjKflf4V8Olbsgm2ks5sexBigaJpZM4PE1yL>.
>
Hallo Jeff,
sorry, I did not know that it is not allowed to add small files. As I am
out of home for a while, I add the code here as text:
As you may see, I just use the script to extract the mesages from the
relevant files and put them in pot files. This is only needed if the
source code is changed. I have no idea where to beginn to integrate that
one to a make file. Could you give me a hand please?
Norbert
———————————————————————————————-
#! /bin/bash
script to get new translation file
cd ~/linuxcnc-dev
cd src
cd emc
cd usr_intf
cd gmoccapy
first get the strings from glade file
intltool-extract –type=gettext/glade gmoccapy.glade
intltool-extract –type=gettext/glade
../../../../lib/python/gladevcp/offsetpage.glade
intltool-extract –type=gettext/glade
../../../../lib/python/gladevcp/tooledit_gtk.glade
now get them from the handler file and merge them with the glade strings
xgettext –from-code=UTF-8 –language=Python –keyword= –keyword=N
–output=../../../po/gmoccapy.pot gmoccapy.py dialogs.py getiniinfo.py
notification.py player.py preferences.py widgets.py gmoccapy.glade.h
../../../../lib/python/gladevcp/iconview.py
../../../../lib/python/gladevcp/offsetpage_widget.py
../../../../lib/python/gladevcp/tooledit_widget.py
../../../../lib/python/gladevcp/offsetpage.glade.h
../../../../lib/python/gladevcp/tooledit_gtk.glade.h
clean_up
rm gmoccapy.glade.h
rm ../../../../lib/python/gladevcp/tooledit_gtk.glade.h
rm ../../../../lib/python/gladevcp/offsetpage.glade.h
now there should be a gmoccapy.pot file in the locale folder and we
change to that location
cd ..
cd ..
cd ..
cd po
cp ./gmoccapy.pot ./gmoccapy/new_gmoccapy.pot
cd gmoccapy
now we need to merge the old gmoccapy.po file with the new
gmoccapy.pot file
German
msgmerge de.po newgmoccapy.pot –output-file=newde.po
Spanish
msgmerge es.po newgmoccapy.pot –output-file=newes.po
French
msgmerge fr.po newgmoccapy.pot –output-file=newpl.po
Hungarian
msgmerge hu.po newgmoccapy.pot –output-file=newpl.po
Polish
msgmerge pl.po newgmoccapy.pot –output-file=newpl.po
Serbian
msgmerge sr.po newgmoccapy.pot –output-file=newrs.po
and open the new file to edit the changes
German only
gtranslator new_de.po
—————————————————————————————————–
#13 – Solitarily 于 2017-09-05
@jepler
I translated the Pncconf wizard and the Stepconf wizard in po, but my translation does not work, I do not know how to fix this problem, can you help me?
#14 – jepler 于 2017-09-05
@Solitarily please open two issues about translation of pncconf and stepconf. I’ll try to look into it.
#15 – Solitarily 于 2017-09-05
@jepler
Both gmoccapy and axis GUI can display Chinese correctly. However, the pncconf and stepconf runtime did not load Chinese, and only the text of the glade itself was displayed. I only tested Chinese, and I don’t know if other languages have such a situation, such as German or french.
#16 – jepler 于 2017-09-11
This is superseded by #320 which I believe addresses the concerns raised by @gmoccapy too.
#1 – SebKuzminsky 于 2017-08-28
Thanks for adding Chinese translation for gmoccapy, and for refreshing the Chinese translation of everything else. I don’t know Chinese so I can’t evaluate the translated phrases themselves, but i’m inclined to accept this PR as is.
@Solitarily, can you explain the change you made to src/emc/usr_intf/gmoccapy/gmoccapy.glade, where you remove the tool tip? Was it not used, or was that an accidental deletion?