How do I create a new .po file?

Hello Everyone,

I want to create my own Loughborough University English “po” file and I
cannot remember how this should be done. I know it’s got something to
do with “extract-message-catalog”, but that’s about it. I’ve searched
the wiki and list archives with no luck, can anyone give me a brief
description of what needs to be done?

I’m running RT 3.5.5 on FC4, Apache2, mod_perl 2.0.1, mysql 4.1.12, perl
5.8.6, HTML::Mason 1.3101.

Thanks in advance,

Stewart
Stewart Tranter
Computing Services
Loughborough University

E: s.g.tranter@lboro.ac.uk
W: http://www.lboro.ac.uk/computing/
T: +44 (0) 1509 223719
F: +44 (0) 1509 223989

Stewart Tranter wrote:

Hello Everyone,

I want to create my own Loughborough University English “po” file and I
cannot remember how this should be done. I know it’s got something to
do with “extract-message-catalog”, but that’s about it. I’ve searched
the wiki and list archives with no luck, can anyone give me a brief
description of what needs to be done?

I’m running RT 3.5.5 on FC4, Apache2, mod_perl 2.0.1, mysql 4.1.12, perl
5.8.6, HTML::Mason 1.3101.

Surely someone can help me?? Pleeeeaaaassseeee! I will write a Wiki
entry when I learn how to do it! :slight_smile:

Thanks in advance,

Stewart

Stewart Tranter wrote:

Hello Everyone,

I want to create my own Loughborough University English “po” file and I
cannot remember how this should be done. I know it’s got something to
do with “extract-message-catalog”, but that’s about it. I’ve searched
the wiki and list archives with no luck, can anyone give me a brief
description of what needs to be done?

I’m running RT 3.5.5 on FC4, Apache2, mod_perl 2.0.1, mysql 4.1.12, perl
5.8.6, HTML::Mason 1.3101.

Surely someone can help me?? Pleeeeaaaassseeee! I will write a Wiki
entry when I learn how to do it! :slight_smile:
I really don’t know much about I18N RT’s subsystem, but as I remember
there is some special targets in makefile. Grep it.

Thanks in advance,

Stewart


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Buy your copy of our new book, RT Essentials, today!

Download a free sample chapter from http://rtbook.bestpractical.com

Best regards, Ruslan.

Stewart Tranter wrote:

Hello Everyone,

I want to create my own Loughborough University English “po” file and I
cannot remember how this should be done. I know it’s got something to
do with “extract-message-catalog”, but that’s about it. I’ve searched
the wiki and list archives with no luck, can anyone give me a brief
description of what needs to be done?

I’m running RT 3.5.5 on FC4, Apache2, mod_perl 2.0.1, mysql 4.1.12, perl
5.8.6, HTML::Mason 1.3101.

Surely someone can help me?? Pleeeeaaaassseeee! I will write a Wiki
entry when I learn how to do it! :slight_smile:

Create a new, empty .po file with a proper ISO language code. (You can
rename it later).

make extract-message-catalogs

Viola.

Jesse

Create a new, empty .po file with a proper ISO language code. (You can
rename it later).

make extract-message-catalogs

Viola.

I prefer cellos, myself.

Cheers,
– jr ‘:-)’ a
Jay R. Ashworth jra@baylink.com
Designer Baylink RFC 2100
Ashworth & Associates The Things I Think '87 e24
St Petersburg FL USA http://baylink.pitas.com +1 727 647 1274

"NPR has a lot in common with Nascar... we both turn to the left."
	- Peter Sagal, on Wait Wait, Don't Tell Me!

Jesse Vincent wrote:

Create a new, empty .po file with a proper ISO language code. (You can
rename it later).

make extract-message-catalogs

I’m going to need more help I’m afraid! :((

Where do I need touch the empty.po file? Is there not something I need
to download or configure in order that “make extract-message-catalogs”
works? At the moment I’m getting “make: *** No rule to make target
`extract-message-catalogs’. Stop.”

Thanks again,

Stewart
Stewart Tranter
Computing Services
Loughborough University

E: s.g.tranter@lboro.ac.uk
W: IT Services | Loughborough University
T: +44 (0) 1509 223719
F: +44 (0) 1509 223989

Jesse Vincent wrote:

Create a new, empty .po file with a proper ISO language code. (You can
rename it later).

make extract-message-catalogs

I’m going to need more help I’m afraid! :((

Where do I need touch the empty.po file?

lib/RT/I18N/. Same directory as the rest of em.

Is there not something I need

to download or configure in order that “make extract-message-catalogs”
works? At the moment I’m getting “make: *** No rule to make target
`extract-message-catalogs’. Stop.”

I may have typoed the Makefile target. If you pop open the Makefile in
ia text editor, you should see it.

Jesse Vincent wrote:

Where do I need touch the empty.po file?

lib/RT/I18N/. Same directory as the rest of em.

Is there not something I need to download or configure in order that “make extract-message-catalogs”
works? At the moment I’m getting “make: *** No rule to make target
`extract-message-catalogs’. Stop.”

I may have typoed the Makefile target. If you pop open the Makefile in
ia text editor, you should see it.

I created eo.po (Esperanto) in /opt/rt3/lib/RT/I18N.

I then looked in the Makefile and saw:

regenerate-catalogs:
$(PERL) sbin/extract-message-catalog

which is correct. Still gives the error “Stop” error though as above.
I tried perl sbin/extract-message-catalog as no args seemed to be passed
to the extract-message-catalog, but this seemed to leave everything
untouched, eo.po was still 0 bytes.

What am I doing wrong? Is my country code to obscure?

Stewart
Stewart Tranter
Computing Services
Loughborough University

E: s.g.tranter@lboro.ac.uk
W: IT Services | Loughborough University
T: +44 (0) 1509 223719
F: +44 (0) 1509 223989

I created eo.po (Esperanto) in /opt/rt3/lib/RT/I18N.

I then looked in the Makefile and saw:

regenerate-catalogs:
$(PERL) sbin/extract-message-catalog

which is correct. Still gives the error “Stop” error though as above.
I tried perl sbin/extract-message-catalog as no args seemed to be passed
to the extract-message-catalog, but this seemed to leave everything
untouched, eo.po was still 0 bytes.

well, it shouldn’t be that empty…

I tried with the following (and only) content for eo.po :

cat << EOF > eo.po
msgid “”
msgstr “”
“Project-Id-Version: eo\n”
“MIME-Version: 1.0\n”
“Content-Type: text/plain; charset=UTF-8\n”
“Content-Transfer-Encoding: 8bit\n”
EOF

make regenerate-catalogs

It worked nicely, you can then use kbabel (or any other po tool you
like) to edit it.
Do not forget to add other header fields, such as your mail address
(Last-Translator)

Regards,

J.
Jérôme Fenal - jfenal AT gmail.com - http://fenal.org/
Paris.pm - http://paris.mongueurs.net/

Stewart Tranter wrote:

I created eo.po (Esperanto) in /opt/rt3/lib/RT/I18N.

I then looked in the Makefile and saw:

regenerate-catalogs:
$(PERL) sbin/extract-message-catalog

which is correct. Still gives the error “Stop” error though as above. I
tried perl sbin/extract-message-catalog as no args seemed to be passed
to the extract-message-catalog, but this seemed to leave everything
untouched, eo.po was still 0 bytes.

What am I doing wrong? Is my country code to obscure?

I created an eo.po in /usr/src/build/rt-3.5.5 and re-ran make
regenerate-message-catalogs.

And hurrah, eo.po was populated. Can I simply edit this file and place
it in /opt/rt3/lib/RT/I18N or is that to simple?

Stewart
Stewart Tranter
Computing Services
Loughborough University

E: s.g.tranter@lboro.ac.uk
W: IT Services | Loughborough University
T: +44 (0) 1509 223719
F: +44 (0) 1509 223989

I created an eo.po in /usr/src/build/rt-3.5.5 and re-ran make
regenerate-message-catalogs.

And hurrah, eo.po was populated. Can I simply edit this file and place
it in /opt/rt3/lib/RT/I18N or is that to simple?

It is that simple. However, you should give a try to kbabel which is
way easier to edit .po files.
It also has useful checks about the .po, such punctuation, right
number of placeholer in translated string compared to the original
one, and so on.

Do not forget to “msgfmt eo.po” to check syntax if you edit it by hand.

Regards,

J.
Jérôme Fenal - jfenal AT gmail.com - http://fenal.org/
Paris.pm - http://paris.mongueurs.net/