title: Odoo - How to translate strings in javascript file
body: <p>I'm struggling with the lack of understanding on doing Javascript. The Odoo documentation is painfully poor and I have another question on this topic without an answer here: <a href="https://stackoverflow.com/questions/42227474/odoo10-how-to-do-javascript">Odoo10 - How to do javascript</a></p>
  
  <p>I hope I'll have more luck with this one.</p>
  
  <p>What I'm trying to do now:</p>
  
  <pre><code>var _t = null;
  odoo.define('mymodule.translate', function (require) {
  "use strict";
      var translation = require('web.translation');
      _t = translation._t;
      console.log("_t assigned");
  });
  </code></pre>
  
  <p>A view:</p>
  
  <pre><code>app.categoriesView = Backbone.View.extend({
      tagName: 'div',
      className: 'categoriesView',
      template: _.template($('#categories_list_template').html()),
      initialize: function() {
          this.title = _t('OUR PRODUCTS');
          console.log("Initilized title: "+this.title);
      },
  });
  </code></pre>
  
  <p>Po file:</p>
  
  <pre><code>#. module: mymodule
  #: code:addons/mymodule/static/js/views.js:8
  #, python-format
  msgid "OUR PRODUCTS"
  msgstr "PRODUKTI"
  </code></pre>
  
  <p>I don't get any errors and firebug console only says:</p>
  
  <pre><code>_t assigned
  Initilized title: OUR PRODUCTS
  </code></pre>
  
  <p>So the string doesn't get translated. What am I doing wrong?</p>