[LinuxCNC/linuxcnc PR#542] Modify the Submakefile that extracts the POT file.

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

Issue #542 | 状态: 已关闭 | 作者: Solitarily | 创建时间: 2018-12-14


The translation of “gmoccapy” does not need to be included in “linuxcnc.pot”. So I commented it out. The translation of “gladevcp” is not valid in “gmoccapy.pot”. It should be included in “linuxcnc.pot”.


评论 (9)

#1 – c-morley 于 2019-01-10

If the Gmoccapy translation does not need to be added in the make file, we should probably remove it rather then comment it out.
@gmoccapy could you confirm this is ok for Gmoccapy?


#2 – Solitarily 于 2019-01-10

The translation in “linuxcnc.pot” is not valid for “gmoccapy”. All translations for “gmoccapy” are included in “gmoccapy.pot”, so I commented on it. It is also possible to delete it.


#3 – gmoccapy 于 2019-01-10

Hallo,

no! It is not possible to delete it!
gmoccapy.pot are all translations from gmoccapy and if not found, gmoccapy will not start localized!

I had a very good reason to separate the translation file of gmoccapy from the monster linuxcnc.pot. When I started to translate gmoccapy first to German and next to Spanish, I was very frustrated, that I was forced to read the very large file linuxcnc.pot. After I separated the translation file, it was very simple to maintain all changes within the code and the corresponding translations synchronized and a lot of non developers got in contact witch me, I explained how to translate gmoccapy and they did, because it was a reasonable job to do.

I am not willing to do any translation in the huge linuxcnc file. IMHO we should split that file into reasonable parts, to convince people to translate just a small part.

Why I did include some glade files in my Makefile was, that that ones did not have valid translations and are used within gmoccapy.

So please leave the translation as it is.

I hope I did understand all correct.

Norbert


#4 – c-morley 于 2019-01-10

Thanks Norbert, I thought there was a reason it was they way it was.
I agree with Norbert that Ideally the translations would be broken up more in subsystems.
I am not sure if thee is any practical reason for it to be one big file, other then that was just the way it evolved.


#5 – Solitarily 于 2019-01-11

Hi ,Norbert

I deleted the translation of gmoccapy in linuxcnc.pot, not deleting gmoccapy.pot. Because the translation of gmoccapy has been stripped into gmoccapy.pot. And the translation related to gmoccapy in linuxcnc.pot is invalid for gmoccapy. So I think gmoccapy translation should not be kept in linuxcnc.pot. As you said, it will cause the linuxcnc.pot file to be too large.

Thanks
David


#6 – Solitarily 于 2019-01-11

1,This is the commented out code to ensure that the translation of gmoccapy is not included in linuxcnc.pot.

#PYI18NSRCS += emc/usrintf/gmoccapy/gmoccapy.py $(patsubst %,emc/usrintf/gmoccapy/%.py,$(GMOCCAPY_MODULES)) \
#emc/usr_intf/gmoccapy/gmoccapy.glade

2,This part of the code is to include the translation of gladevcp in linuxcnc.pot, because the translation of gladevcp is not valid in gmoccapy.pot. Gladevcp needs to be included in linuxcnc.pot to support international translation.

TOOLI18NSRCS := \
../lib/python/gladevcp/iconview.py \
../lib/python/gladevcp/hal_mdihistory.py \
../lib/python/gladevcp/offsetpage_widget.py \
../lib/python/gladevcp/tooledit_widget.py \
../lib/python/gladevcp/gladevcp-test.glade \
../lib/python/gladevcp/offsetpage.glade \
../lib/python/gladevcp/tooledit_gtk.glade
po/linuxcnc.pot: $(TOOLI18NSRCS)

3,This is the gmoccapy.pot code, I removed the code that included the translation of gladevcp to gmoccapy.pot.

GMOCCAPY_GLADE := \
emc/usr_intf/gmoccapy/gmoccapy.glade.h
$(GMOCCAPY_GLADE): %.glade.h: %.glade
intltool-extract –type=gettext/glade $< GMOCCAPYI18NSRCS := \
$(patsubst %,emc/usr_intf/gmoccapy/%, \
gmoccapy.py dialogs.py getiniinfo.py notification.py player.py \
preferences.py widgets.py gmoccapy.glade.h) \
po/gmoccapy/gmoccapy.pot: $(GMOCCAPYI18NSRCS)
$(XGETTEXT) –from-code=UTF-8 –language=Python \
TARGETS += po/gmoccapy/gmoccapy.pot


#7 – andypugh 于 2020-04-08

Norbert / Chris: Does this look good for 2.8?


#8 – gmoccapy 于 2021-05-14

Hallo Andy,

unfortunately this has been merged, not taking care of my comments.
Gmoccapy takes all its translations from the gmocapy.pot file. Now the gladevcp part is taken away, so gmoccapy will not be able to translate the used glade widgets.

I do not know a way to use 2 pot files simultaneous.

Can this be reversed?

Norbert


#9 – gmoccapy 于 2021-05-14

Andy,

I just checked again, may be it can be this way, I do not see any difference after doing a make clean and build fresh between master and 2.8.

So ok, may be merged to 2.8 too.

Norbert


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

喜欢 (0)