[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] little changes to gmBMICalc & gmPreg Calc
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] little changes to gmBMICalc & gmPreg Calc |
Date: |
Wed, 1 Jan 2003 01:53:17 +0100 |
User-agent: |
Mutt/1.3.22.1i |
Hi Michael,
another morsel concerning i18n:
> def getToolbar_BMICalcData():
> return cPickle.loads(zlib.decompress(
> 'x\xda]\x90\xbd\n\x83P\x0c\x85\xf7>E ^,\x08\xe1\xbaT\xc7P\xc55\x83\xcb]\xc5\
> \xb1\x82}\xff\xa9\x89\xf7Gm\x0c\xc2\xf9r\x92\x18\x9f\xdb\xb7}\xccu\xfb\x02K\
> \x0fm\xfdX\xe6\x9a`\x85\xf7\xb6\xac\x9fC\x05U\xd8\xf5\xdd\xe0\xfd\xa1%\xeb\
> \xae?4\x98\x1e\xfbq\x18\xa3nb\xdd\xfb\xe4\xdfMO\xfd\x94\xfb+\xd3\xde\x17\xcd\
> address@hidden(0h\xe6W\x82r\x8b\x04\xa9\x11\
> \xb8D\x82A\x84\x99\xad\x82X\x16\x05\xe1\x8a\xb9\x12 w\x85BL"\xe8\xf49!\x08\
> \x93\xf6*\xa4+\xac\x88\x9cC\xf9w:D\x10\xbc9\xd9\xc6\xc1\xddi\xbd`\xf0\xbc\
> \xdd\xf6\xb2\x9dC\xc5\xa9\x1f\xaf\x8bc\x94\x99\x12\xf4\xef\xe9-1\r\xd2\x0fX\
> \x95oP' ))
>
> def getToolbar_BMICalcBitmap():
> return wxBitmapFromXPMData(getToolbar_BMICalcData())
>
> def getToolbar_BMICalcImage():
> return wxImageFromBitmap(getToolbar_BMICalcBitmap())
>
> # This method was added
> def getBMICalcIcon():
> icon = wxEmptyIcon()
> icon.CopyFromBitmap(getToolbar_BMICalcBitmap())
> return icon
Even when using icons we need to be aware of localization
issues. So once we get this working we should modify
BMICalcData() to return icon data based on some key value which
- if a string is used - can be i18n'ed easily via gettext() ->
_() such that we'll be able to provide locale specific icons.
For an example of how to implement this please take a look at
gmPlugin.
Regards,
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346