This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/models/badge_grouping.js
Sam c8284170ad FEATURE: badge grouping UI
FIX: not loading more badges on badge show page
2014-07-18 15:46:36 +10:00

11 lines
352 B
JavaScript

Discourse.BadgeGrouping= Discourse.Model.extend({
i18nNameKey: function() {
return this.get('name').toLowerCase().replace(/\s/g, '_');
}.property('name'),
displayName: function(){
var i18nKey = "badges.badge_grouping." + this.get('i18nNameKey') + ".name";
return I18n.t(i18nKey, {defaultValue: this.get('name')});
}.property()
});