Possible Translation Conditions in Code



I have been looking at bug #386118 [1] recently, as it seems like an
important issue to me, and is relatively easy to fix. When looking over
the patch, and the issue originally reported, I discovered that we suck
for translation detection in C files much worse than the bug implies.

So, that brings us to you, the developers. I have a patch which
currently fixes things up with the following regular expression:

/[\s\(\{\:\?\=,][NQ]?_ *\(QUOTEDTEXT/

My question is if there are any other conditions that we need to
check for, so that we don't claim files need translations, when
they don't (if someone defines a FOO_ macro that operates on strings,
for example). I think this covers pretty much all of the cases that
we have. If others could please send me issues where the above
expression doesn't work, so that I could add them in, that would
be great.

I've also attached a patch [2], so that people can easily test
this issue. If people could thoroughly test it, so that I can get
any remaining cases fixed, and get a release out with this fix,
that would be great as well.

Thanks.

-- dobey

[1] http://bugzilla.gnome.org/show_bug.cgi?id=386118
[2] http://bugzilla.gnome.org/attachment.cgi?id=78601&action=view





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]