title: Map combobox options for translation
body: <p>I have a bunch of state names in my data model that I want to map to different keys for translation, e.g.</p>
  
  <ul>
  <li>Open -> state_open</li>
  <li>New -> state_new</li>
  <li>Wait for approval -> state_wait_for_approval</li>
  </ul>
  
  <p>Currently my combo box is populated this way:</p>
  
  <pre><code>&lt;select class="form-control select" id="client"
    ng-model="statusType"
    ng-change="setStatusType(statusType)"
    ng-options="statusType.name for statusType in statusTypes track by statusType.id"&gt;
    &lt;option value=""&gt;-&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I have read that I can implement translation by doing this:</p>
  
  <pre><code>  ng-options="statusType.name | translate for statusType in statusTypes track by statusType.id"&gt;
  </code></pre>
  
  <p>However, this will assume that my translation keys are equal to the state names. I would rather like to map my state names to the translation keys mentioned above.</p>
  
  <p>How can I implement this mechanism in Angular? I probably need some sort of custom directive (?). I'm new to Angular, so all hints are welcome.</p>
  
  <p>I'm thinking of something like:</p>
  
  <pre><code>mapStateToTranslationKey(statusType.name) -&gt; return "status_" + toLowerCase(replaceSpacesWithUnderscores(statusType.name))
  </code></pre>