Topics

Need help on how to generate pot file for translating add-on


 

Hi all
How can I generate pot file for translation an add-on?
Since I start translating some add-on via github, I usually ask add-on's author to send me the pot file for translating its interface, and he/she must send me the new pot file eatch time the add-on updated, but I think we could generate that file if we have add-on source code with tools such as scons inside. Doing this, I don't need to wait, and add-on author don't need to send me that file each time update the add-on so I ask here.
Any help would be appreciated.
Cuong


Oleksandr Gryshchenko
 

Hi Cuong,
I have already answered you in a privat letter, but I think that this question may be of interest to someone else in our group.

To generate POT-template use:

scons pot

To merge existing PO-file with generated POT use:

msgmerge -N old.po generated.pot > new.po

Also in the description of scons there is a command line argument "mergePot", but, unfortunately, I don't know how to use it...
Maybe some of the more experienced developers will be able to explain to us how to use it.

Good luck!
Oleksandr


 

Hi Oleksandr and all
If you see my later e-mail asking about error when generate pot file,
and know to solve, please help me. Now sounds I can't do anything
using scons because the command prompt told something like xgettext is
not recognize as an internal program. I think I missed something on
setting up add-on development. For the unmute repo, if I switch to
Vietnamese branch, which I use for translating into Vietnamese, then I
can genertate pot file or package add-on, but can't do that in master
branch.
By the way, Do I need NVDA running when generate pot or package
add-on? I use Jaws more than NVDA, and I usually use Jaws for this
job.
Appreciated your help
Cuong

On 10/17/20, Oleksandr Gryshchenko <@grisov> wrote:
Hi Cuong,
I have already answered you in a privat letter, but I think that this
question may be of interest to someone else in our group.

To generate POT-template use:

scons pot

To merge existing PO-file with generated POT use:

msgmerge -N old.po generated.pot > new.po

Also in the description of scons there is a command line argument
"mergePot", but, unfortunately, I don't know how to use it...
Maybe some of the more experienced developers will be able to explain to us
how to use it.

Good luck!
Oleksandr





--
Đặng Mạnh Cường
Chuyên viên công nghệ trợ giúp
Trung tâm hướng nghiệp và công nghệ trợ giúp cho người mù Sao Mai
52/22 Huỳnh Thiện Lộc, P. Hòa Thạnh, Q. Tân Phú, TP. HCM
Điện thoại: 028-7302-4488
E-mail: tech@...
Website: http://www.trungtamsaomai.org; http://www.saomaicenter.org
Điện thoại di động / Zalo: 0902-572-300
E-mail: @cuongdang; @dangmanhcuong
Skype: dangmanhcuong
facebook: http://facebook.com/dangmanhcuong
Twitter: ManhCuongTech
Chuyên viên NVDA: https://certification.nvaccess.org/


Oleksandr Gryshchenko
 

Hi Cuong,
Try installing "gettexttool" on your computer.

You can download precompiled version, for example, here:
https://mlocati.github.io/articles/gettext-iconv-windows.html

Good luck!
Oleksandr


 

Hi Oleksandr, and thanks for your help
I read on readme file for unmute, then installed python-gettext via
pip, and everything worked well. I'm thinking of suggest edit this in
add-on development documentation to avoid other people misunderstand
like me.
Cuong

On 10/17/20, Oleksandr Gryshchenko <@grisov> wrote:
Hi Cuong,
Try installing "gettexttool" on your computer.

You can download precompiled version, for example, here:
https://mlocati.github.io/articles/gettext-iconv-windows.html

Good luck!
Oleksandr





--
Đặng Mạnh Cường
Chuyên viên công nghệ trợ giúp
Trung tâm hướng nghiệp và công nghệ trợ giúp cho người mù Sao Mai
52/22 Huỳnh Thiện Lộc, P. Hòa Thạnh, Q. Tân Phú, TP. HCM
Điện thoại: 028-7302-4488
E-mail: tech@...
Website: http://www.trungtamsaomai.org; http://www.saomaicenter.org
Điện thoại di động / Zalo: 0902-572-300
E-mail: @cuongdang; @dangmanhcuong
Skype: dangmanhcuong
facebook: http://facebook.com/dangmanhcuong
Twitter: ManhCuongTech
Chuyên viên NVDA: https://certification.nvaccess.org/