very long translation key
Hi there, globalizers.
I'm using globalize to build two multilingual sites and I saw
globalize_translations table has a tr_key string field that is 255
characteres long (I'm using MySQL), but I have some sections of text
to be translated greater than that.
The translation mechanism stop working because ViewTranslation#pick
finds by full text to be translated and tr_key is cut at 255
character.
First I changed Globalize to cut at 255 characters the translation
key, but it doesn't seems to be a good idea (we can have duplicate
keys for different texts)...
So, I monkeypatched Globalize to build a sha1 hash of text to be
translated and store it in tr_key, it seems to be working fine ;-)
But, I wrote to list because I would like to hear what do you think
about this approach.
Opinions are welcome :-)
--
andré ribeiro camargo
--
gerente de tecnologia
CanguçuCenter :: cangucucenter.com.br
PelotasCenter :: pelotascenter.com.br
--
proprietário
boa idéia software livre :: boaideia.inf.br