Recompile for translation update under gettext?

Discuss and coordinate development of mainline and user-made content translations.

Moderator: Forum Moderators

Post Reply
sanna
Posts: 425
Joined: June 5th, 2004, 9:59 am
Location: Halmstad, Sweden

Recompile for translation update under gettext?

Post by sanna »

Have I understood it correctly when I infer that you have to recompile to update a translation under gettext?
isaac
Inactive Developer
Posts: 173
Joined: January 15th, 2004, 5:09 pm
Location: Zaragoza, Spain
Contact:

Post by isaac »

Definitely not, after you have changed the sv.po you only need to generate the .gmo by running:

Code: Select all

make -C po sv.gmo
from the main directory. Then copy the sv.gmo to the place where Wesnoth .mo files reside (renamed as sv.mo).

That should work. I'm really pleased to see that you're trying again.

Best regards.
yann
Inactive Developer
Posts: 34
Joined: June 30th, 2004, 11:31 am

Re: Recompile for translation update under gettext?

Post by yann »

sanna wrote:Have I understood it correctly when I infer that you have to recompile to update a translation under gettext?
No, you only have to "compile" the new version of the po file you just updated. You can do that by running "make update-po" in the po directory. That will refresh the wesnoth.pot files in case the source files have changed, resync all *.po files, and rebuild all *.gmo files from them, including yours.

Then "make install" will put the gmo files in the right place, so that the next wesnoth run will see them.
gettextization
french l10n team member
isaac
Inactive Developer
Posts: 173
Joined: January 15th, 2004, 5:09 pm
Location: Zaragoza, Spain
Contact:

Post by isaac »

That command basically runs:

Code: Select all

rm -f sv.gmo && /usr/bin/msgfmt -c --statistics -o sv.gmo sv.po
First it deletes the previous gmo and then run the msgfmt program to generate the .gmo from the .po.

The .po file (as you know) is an UTF-8 ASCII file with the translations and all the non-translated strings.

The .mo file is a binary version of the .po file, which is smaller and faster, and because of that is used when the program runs instead of the .po.
sanna
Posts: 425
Joined: June 5th, 2004, 9:59 am
Location: Halmstad, Sweden

Post by sanna »

isaac wrote:I'm really pleased to see that you're trying again.
Well, I'm not REALLY translating again, just trying to get the version yeti compiled working with 0.8.3 :wink: Frankly, I want something like poedit on mac!
isaac wrote:Then copy the sv.gmo to the place where Wesnoth .mo files reside (renamed as sv.mo).
Oh deary me, where might that be on mac?
yann
Inactive Developer
Posts: 34
Joined: June 30th, 2004, 11:31 am

Post by yann »

sanna wrote:
isaac wrote:I'm really pleased to see that you're trying again.
Well, I'm not REALLY translating again, just trying to get the version yeti compiled working with 0.8.3 :wink: Frankly, I want something like poedit on mac!
isaac wrote:Then copy the sv.gmo to the place where Wesnoth .mo files reside (renamed as sv.mo).
Oh deary me, where might that be on mac?
Hm, maybe we should install by default the compiled catalogs under $datadir, to make things easier. People willing to install them in a central place can always override the defaults.
gettextization
french l10n team member
Post Reply