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/components/count-i18n.js.es6
2019-05-27 10:15:39 +02:00

17 lines
351 B
JavaScript

import { bufferedRender } from "discourse-common/lib/buffered-render";
export default Ember.Component.extend(
bufferedRender({
tagName: "span",
rerenderTriggers: ["count", "suffix"],
buildBuffer(buffer) {
buffer.push(
I18n.t(this.key + (this.suffix || ""), {
count: this.count
})
);
}
})
);