enum values to strings.
warlord at MIT.EDU
Sat Mar 26 15:09:14 EST 2005
Quoting Neil Williams <linux at codehelp.co.uk>:
> > > 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
> > 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.
You never want to translate non-user-input data in the data file. The problem
is that if you change locales between the writer and reader you no longer
retain the ability to read the data file. I'll note that some QIF
implementations have this problem, where they write out !Tipo:Banco instead of
!Type:Bank. It means you can't read in this data file if you're in a French
> Thanks for the comments.
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel