Forum > Translations

I18N and maintaining PO files

(1/4) > >>

dbannon:
Totally new space to me, please be gentle ...

Someone has offfered to provide a Spanish translation for my app, I long ago turned on I18N but know no more than what I have read on the wiki.

If this person sends me back a PO file based on my current snapshot, and I then add a new term somewhere, and build my app, that new term appears in my (default, english) po file but is not merged into the Spanish one. Its clearly impractical for him to start anew for every release. I guess there is a process that merges new or changed entries from the default PO file to existing translations ?

If its not Lazarus that does that, is it (eg) poedit ?  What approach to people recommend please ?

Davo

dsiders:

--- Quote from: dbannon on April 22, 2019, 02:23:58 am ---Totally new space to me, please be gentle ...

Someone has offfered to provide a Spanish translation for my app, I long ago turned on I18N but know no more than what I have read on the wiki.

If this person sends me back a PO file based on my current snapshot, and I then add a new term somewhere, and build my app, that new term appears in my (default, english) po file but is not merged into the Spanish one. Its clearly impractical for him to start anew for every release. I guess there is a process that merges new or changed entries from the default PO file to existing translations ?

If its not Lazarus that does that, is it (eg) poedit ?  What approach to people recommend please ?

Davo

--- End quote ---

The sync you're looking for doesn't happen automatically. There is a program in ./tools/updatepofiles.pas that can be used to sync a resource file and its .pot file (that's the translation template) and any files generated from that template. You still have to submit the .pot for translation again to get translated strings for each language/locale.

Hope that helps.

lainz:
Actually if you rebuild your application (Compile > Build) the po file gets updated with the new terms. Just send that back and poedit will show only the new entries to translate.

dsiders:

--- Quote from: Lainz on April 22, 2019, 03:43:51 am ---Actually if you rebuild your application (Compile > Build) the po file gets updated with the new terms.

--- End quote ---

I've never seen that happen after a Build.

But I did just discover the Force update PO Files on next build button in Project options. You learn something new every day.

lainz:
Yes, it must be from that menu entry, not a normal hit on the play button, I don't know the reason BTW.

Edit: the right name of the menu is Run > Build.

Navigation

[0] Message Index

[#] Next page

Go to full version