From: Jan P. <pa...@pi...> - 2008-01-31 14:11:38
|
Dan, this is weird. Can you specify "strangely"? How come we didn't have such problems in the past? -- Jan > Modified Files: > exif-entry.c exif-tag.c > Log Message: > GNU gettext behaves strangely when given an empty string, so make sure > not to do that. > > > Index: exif-tag.c > > if (ifd >= EXIF_IFD_COUNT) return NULL; > for (i = 0; ExifTagTable[i].description; i++) > - if ((ExifTagTable[i].tag == tag) && RECORDED) break; > - return _(ExifTagTable[i].description); > + if ((ExifTagTable[i].tag == tag) && RECORDED) { > + /* GNU gettext acts strangely when given an empty string */ > + if (!*ExifTagTable[i].description) > + return ""; > + return _(ExifTagTable[i].description); > + } > + return NULL; > } |
From: Dan F. <da...@co...> - 2008-01-31 19:17:08
|
On Thu, Jan 31, 2008 at 03:11:25PM +0100, Jan Patera wrote: > this is weird. Can you specify "strangely"? How come we didn't have such > problems in the past? It's a documented "bug" in gettext: "When an empty string is used for msgid, the functions may return a nonempty string." I suspect it was added in a misguided attempt to be a feature, because the nonempty string it returns is actually the header from the .po file listing the translator, translation date, etc. You can see if by reverting the patch and running exif --tag=InteroperabilityVersion --ifd=Interoperability -s I saw it in gtkam, too, before this patch. I'm not completely positive why it didn't show up before. Now that you mention it, the description in cases like this used to duplicate the title instead--now it's blank. I'm not sure where that behaviour has changed. >>> Dan -- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has moved |
From: Dan F. <da...@co...> - 2008-01-31 20:04:37
|
On Thu, Jan 31, 2008 at 11:16:48AM -0800, I wrote: > I'm not completely positive why it didn't show up before. Now that you > mention it, the description in cases like this used to duplicate the title > instead--now it's blank. I'm not sure where that behaviour has changed. The problem was displaying the description string was completely broken in the previous version of exif. e.g. compare "exif --tag=Make -s" with the old version and the CVS version. This was probably due to reusing a static buffer (in the "C" macro) in a printf. >>> Dan -- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has moved |
From: Jan P. <pa...@pi...> - 2008-02-01 06:15:41
|
Hi Dan, Thank you for the explanations. I don't have gettext ;) I was curious because your changes really looked unnecessary. -- Jan > On Thu, Jan 31, 2008 at 03:11:25PM +0100, Jan Patera wrote: >> this is weird. Can you specify "strangely"? How come we didn't have >> such problems in the past? > > It's a documented "bug" in gettext: "When an empty string is used for > msgid, the functions may return a nonempty string." I suspect it was > added in a misguided attempt to be a feature, because the nonempty > string it returns is actually the header from the .po file listing the > translator, translation date, etc. You can see if by reverting the > patch and running > > exif --tag=InteroperabilityVersion --ifd=Interoperability -s > > I saw it in gtkam, too, before this patch. > > I'm not completely positive why it didn't show up before. Now that you > mention it, the description in cases like this used to duplicate the > title instead--now it's blank. I'm not sure where that behaviour has > changed. > >>>> Dan |