enum values to strings.

Neil Williams linux at codehelp.co.uk
Sat Mar 26 12:51:41 EST 2005


On Saturday 26 March 2005 9:29 am, Christian Stimming wrote:
> As Derek said, the idea is nice, but since we already have covered most
> such cases of interest in gnucash with "normal code", I wouldn't change
> those existing solutions.

Fine, I'll test it more fully and consider using it only in examples linked to 
QOF. 

> > Should the strings be translatable?
> > #define AS_STRING_CASE(name, value) \
> >     case name: return _(#name);
> > instead of return #name?
>
> NOT AT ALL! Enum values are source-code level things (and the string values
> for these as well), but gettext translations are for user-visible things.

OK, I may investigate methods of using user-visible translatable strings 
instead of a direct mapping, it could be useful in some situations. The 
Doxygen problem is the hardest one to solve. 

Thanks for the comments.

-- 

Neil Williams
=============
http://www.dcglug.org.uk/
http://www.nosoftwarepatents.com/
http://sourceforge.net/projects/isbnsearch/
http://www.neil.williamsleesmill.me.uk/
http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20050326/2695aaa4/attachment.bin


More information about the gnucash-devel mailing list