Closed KieranP closed 14 years ago
I was looking at how VirtualBox GUI and such do this and it looks like they use a lookup table of their own so I'd like to leave this to application developers. In general, the symbols will be more useful unless you're displaying it, which I think is a special case with your vbox_web =] I recommend using Rails i18n to make this easier for you.
Mitchell
Alright, thanks. I went ahead as you suggested and used I18n.
The result:
http://github.com/KieranP/vboxweb_rb/commit/3fba1894b78263deebbeadd31c891f4213081c09
http://github.com/KieranP/vboxweb_rb/blob/master/config/locales/en.yml
It would be good if AbstractEnums took a hash, comprised of keys, and their command names. In vboxweb_rb, I have to make this mapping manually, which it very incomplete.
The idea is to be able to pass this off to the virtualbox gem.
Then: