diff --git a/admin/assets/javascripts/discourse/components/house-ads-chooser.js b/admin/assets/javascripts/discourse/components/house-ads-chooser.js index 1fb1995..fcde111 100644 --- a/admin/assets/javascripts/discourse/components/house-ads-chooser.js +++ b/admin/assets/javascripts/discourse/components/house-ads-chooser.js @@ -1,6 +1,6 @@ import { computed } from "@ember/object"; import { classNames } from "@ember-decorators/component"; -import { makeArray } from "discourse-common/lib/helpers"; +import { makeArray } from "discourse/lib/helpers"; import MultiSelectComponent from "select-kit/components/multi-select"; @classNames("house-ads-chooser") diff --git a/admin/assets/javascripts/discourse/components/house-ads-list-setting.js b/admin/assets/javascripts/discourse/components/house-ads-list-setting.js index 911ad89..69f0ecd 100644 --- a/admin/assets/javascripts/discourse/components/house-ads-list-setting.js +++ b/admin/assets/javascripts/discourse/components/house-ads-list-setting.js @@ -1,7 +1,7 @@ import { action } from "@ember/object"; import { mapBy } from "@ember/object/computed"; import { classNames } from "@ember-decorators/component"; -import { makeArray } from "discourse-common/lib/helpers"; +import { makeArray } from "discourse/lib/helpers"; import HouseAdsSetting from "discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting"; @classNames("house-ads-setting house-ads-list-setting") diff --git a/admin/assets/javascripts/discourse/components/house-ads-setting.js b/admin/assets/javascripts/discourse/components/house-ads-setting.js index bf5937a..b028f53 100644 --- a/admin/assets/javascripts/discourse/components/house-ads-setting.js +++ b/admin/assets/javascripts/discourse/components/house-ads-setting.js @@ -3,8 +3,8 @@ import { action } from "@ember/object"; import { classNames } from "@ember-decorators/component"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; -import { i18n, propertyNotEqual } from "discourse/lib/computed"; -import I18n from "I18n"; +import { i18n as computedI18n, propertyNotEqual } from "discourse/lib/computed"; +import { i18n } from "discourse-i18n"; @classNames("house-ads-setting") export default class HouseAdsSetting extends Component { @@ -12,8 +12,8 @@ export default class HouseAdsSetting extends Component { saving = false; savingStatus = ""; - @i18n("name", "admin.adplugin.house_ads.%@.title") title; - @i18n("name", "admin.adplugin.house_ads.%@.description") help; + @computedI18n("name", "admin.adplugin.house_ads.%@.title") title; + @computedI18n("name", "admin.adplugin.house_ads.%@.description") help; @propertyNotEqual("adValue", "value") changed; init() { @@ -26,7 +26,7 @@ export default class HouseAdsSetting extends Component { if (!this.get("saving")) { this.setProperties({ saving: true, - savingStatus: I18n.t("saving"), + savingStatus: i18n("saving"), }); ajax(`/admin/plugins/pluginad/house_settings/${this.get("name")}.json`, { @@ -38,7 +38,7 @@ export default class HouseAdsSetting extends Component { adSettings.set(this.get("name"), this.get("adValue")); this.setProperties({ value: this.get("adValue"), - savingStatus: I18n.t("saved"), + savingStatus: i18n("saved"), }); }) .catch(popupAjaxError) diff --git a/admin/assets/javascripts/discourse/components/modal/preview.gjs b/admin/assets/javascripts/discourse/components/modal/preview.gjs index 08794b9..f9ff54d 100644 --- a/admin/assets/javascripts/discourse/components/modal/preview.gjs +++ b/admin/assets/javascripts/discourse/components/modal/preview.gjs @@ -1,6 +1,6 @@ import { htmlSafe } from "@ember/template"; import DModal from "discourse/components/d-modal"; -import i18n from "discourse-common/helpers/i18n"; +import { i18n } from "discourse-i18n"; const Preview =