How to use the ember-intl/models/translation.extend function in ember-intl

To help you get started, weā€™ve selected a few ember-intl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ember-intl / ember-intl / blueprints / ember-intl-dot-notation / files / app / models / ember-intl-translation.js View on Github external
import TranslationModel from 'ember-intl/models/translation';

export default TranslationModel.extend({
  getValue(key) {
    return this.translations[key];
  }
});
github ember-intl / ember-intl / packages / ember-intl / blueprints / ember-intl-dot-notation / files / app / models / ember-intl-translation.js View on Github external
import TranslationModel from 'ember-intl/models/translation';

export default TranslationModel.extend({
  addTranslation(key, value) {
    this.translations[key] = value;
  },

  getValue(key) {
    return this.translations[key];
  }
});