[Fixed]-Django i18n: Translating database values where one word is a name that might change

1👍

If the texts are ‘standard’ texts as you put it, you probably shouldn’t store them redundantly in the database with just the names change (I don’t believe what you are trying to do is possible). You are probably better off with a property or function of the model:

@property
def message(self):
    return ugettext('{name} has sent you a message').format(name=self.foo.bar.name)

This way, makemessages will work properly for your translations.

Leave a comment