Denis Barbier <barbier@linuxfr.org> (20/04/2005): > > $version{"$lang/$file"} = $altcvs->revision($f); > > if (!$transcheck->revision()) { > > - $original{"english/$file"} = $lang; > > - $transversion{"english/$file"} ||= "1.1"; > > + $transcheckenglish = Webwml::TransCheck->new("english/$file"); > > + if (!$transcheckenglish->revision() and (-e "english/$file")) { > > + $transversion{"$lang/$file"} = "1.1"; > > + $original{"$lang/$file"} = "english"; > > + } else { > > + $original{"english/$file"} = $lang; > > + $transversion{"english/$file"} ||= "1.1"; > > + } > > English files are processed first, I think it is not true. > so there is IMO no need to introduce $transcheckenglish, you can > instead try (not tested) > if (-e "english/$file" && !defined($transversion{"english/$file"})) { > $transversion{"$lang/$file"} = "1.1"; > $original{"$lang/$file"} = "english"; > } else { > $original{"english/$file"} = $lang; > $transversion{"english/$file"} ||= "1.1"; > } If this was true, the old version was enough. But I have already seen some files without translation-check header beeing considered as the original instead of English. I've checked with the -v switch, which confirm what I'm saying. > With both versions (yours and mine), $original{"english/$file"} is set if > english/$file does not exist, I do not know whether this causes trouble. No, no problems at all. It was already the case in the previous version. Thanks for your comments. Regards, -- Thomas Huriaux
Attachment:
signature.asc
Description: Digital signature