Skip to content

Commit 152083c

Browse files
committed
Merge branch 'hotfix/0.8.2'
2 parents a1bb5cb + 4a89a08 commit 152083c

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

addon/instance-initializers/ember-osf.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,24 @@ Automatically expose translations for addon in a way that can be merged in with
44
*/
55
import Ember from 'ember';
66
import en from 'ember-osf/locales/en/translations';
7-
import tHelper from 'ember-i18n/helper';
8-
97

108
export function initialize(appInstance) {
11-
tHelper.reopen({
9+
const i18n = appInstance.lookup('service:i18n');
10+
i18n.reopen({
1211
theme: Ember.inject.service(),
13-
compute(_, params) {
14-
let translations = this.get('i18n._locale.translations');
12+
t(_, data) {
13+
let translations = this.get('_locale.translations');
1514
let preprintWord = this.get('theme.provider.preprintWord') || 'preprint';
16-
params = params || {};
17-
params.preprintWords = {
15+
data = data || {};
16+
data.preprintWords = {
1817
preprint: translations[`preprintWords.${preprintWord}.preprint`],
1918
preprints: translations[`preprintWords.${preprintWord}.preprints`],
2019
Preprint: translations[`preprintWords.${preprintWord}.Preprint`],
2120
Preprints: translations[`preprintWords.${preprintWord}.Preprints`]
2221
};
23-
return this._super(_, params);
22+
return this._super(_, data);
2423
}
2524
});
26-
const i18n = appInstance.lookup('service:i18n');
2725
i18n.addTranslations('en', en);
2826
}
2927

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@centerforopenscience/ember-osf",
3-
"version": "0.8.1",
3+
"version": "0.8.2",
44
"description": "Reusable ember models and components for interacting with the Open Science Framework",
55
"directories": {
66
"doc": "docs",

0 commit comments

Comments
 (0)