On Thu, Mar 30, 2006 at 10:16:20PM +0200, Robert Luberda wrote:
> Package: po4a
> Version: 0.24-1
> Severity: normal
> 
> Hi,
> 
> `po4a --force' updates the POT-Creation-Date field in the POT file, 
> but does not change the field in PO file:
> 
>     $ LC_ALL=C po4a -vf fdim.3.cfg 
>     Updating pot/fdim.3.pot:
>      (17 entries)
>     Updating po/fdim.3.pl.po: 
>     .. done.
>    [snip]
>     $ grep POT-Creation-Date pot/fdim.3.pot po/fdim.3.pl.po
>     pot/fdim.3.pot:"POT-Creation-Date: 2006-03-30 22:04+0200\n"
>     po/fdim.3.pl.po:"POT-Creation-Date: 2006-03-30 20:46+0200\n"
> 
> Consequently all the following calls to po4a (without --force) try 
> to update the PO file:
> 
>     $ LC_ALL=C po4a -v fdim.3.cfg 
>     Updating po/fdim.3.pl.po: 
>     .. done.
>     17 translated messages.  
> 
> Best Regards,
> robert


Actually, it is not as easy as it seems to be.

First of all, you can do "po4a -v fdim.3.cfg" several times, they will
always update the po file. The story is that it is not trivial to detect
when the po file should be updated and we decided to update them
inconditionally. 

Here is an example of problem:
Imagine three times: day1 < day2 < day3
POT gets updated on day1 and day2
Translator works on day3, but based on pot of day1.

The po file must be updated against the day2 pot version, even if hte po
file itself is more recent.


Then, you could argue that we have to use the POT revision dates from the
header instead of trusting the file modification date, but it will not help
us much here. We rely on msgmerge to do the merge, with the -U flag to
update the po file. Unfortunately, the documentation says:
  -U, --update
   update def.po, do nothing if def.po already up to date

It does not even update the POT revision date of the po file (just tested).


So, in summary, I think that we should: 
 - use the POT revision date to decide whether we update the po file or not
 - bug msgmerge for not updating this when the other fields do not change
   or not rely on "msgmerge *-U*" here

Bye, Mt.

-- 
The tragedy of modern man is not that he knows less and less about the
meaning of his own life, but that it bothers him less and less.
          --- Vaclav Havel

Attachment: signature.asc
Description: Digital signature

Reply via email to