title: weird django translations behaviour
body: <p>I have weird problem with django translations that i need help figuring out. Problem is that instead of getting translated string every time i seem to get randomly either translated string or default string.</p>
  
  <p>I have created a class for putting "action" buttons on several pages. Many of those buttons are reusable so why should i put </p>
  
  <p><code>&lt;a href="something"&gt;blabla&lt;/a&gt;</code> </p>
  
  <p>into several templates when i can create simple toolbar and use </p>
  
  <p><code>toolbar.add(tool)</code></p>
  
  <p>in view and then just use templatetag for rendering all the tools.... anyway.</p>
  
  <p>This is example of one tool:</p>
  
  <pre><code>class NewUserGroupButton(MyTool):
      tool_id = 'new-user-group'
      button_label = ugettext(u'Create new user group')
      tool_href = 'new/'
      js = ()
  
      def render(self):
          s = '&lt;a id="%(tool_id)s" href="%(tool_href)s" class="button blue"&gt;%(button_label)s&lt;/a&gt;'
          return s % {'tool_id': self.tool_id, 'tool_href': self.tool_href, 'button_label':self.button_label}
  </code></pre>
  
  <p>The tools are rendered like this:</p>
  
  <pre><code>class ToolbarTools:
      def __init__(self):
          self.tools = []
  
      def add(self, tool):
          self.tools.append(tool)
  
      def render(self):
          # Organize tools by weight
          self.tools.sort(key=lambda x: x.weight)
  
          # Render tools
          output = '&lt;ul id="toolbar" class="clearfix"&gt;'
  
          for tool in self.tools:
              output += '&lt;li id="%s"&gt;' % ('tool-'+ tool.tool_id)
              output += tool.render() if tool.renderable else ''
              output += '&lt;/li&gt;'
  
          output += '&lt;/ul&gt;'
  
          # Reset tools container
          self.tools = []
  
          return mark_safe(output)
  </code></pre>
  
  <p>im using ugettext to translate the string. using (u)gettext=lambda s:s or ugettext_lazy gives me either no translations or proxy object corresponding to function choices. </p>
  
  <p>And like i said - while rest of the page is in correct language the toolbar buttons seem to be randomly either translated or not. The faulty behaviour remains consistent if i move between different pages with different "tools" or even refresh the same page several times.</p>
  
  <p>Could someone please help me to figure out what is causing this problem and how to fix it?</p>