diff --git a/app/assets/javascripts/admin/addon/components/admin-backups-actions.gjs b/app/assets/javascripts/admin/addon/components/admin-backups-actions.gjs index b37a8692003..6598657efa7 100644 --- a/app/assets/javascripts/admin/addon/components/admin-backups-actions.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-backups-actions.gjs @@ -4,7 +4,7 @@ import { service } from "@ember/service"; import routeAction from "discourse/helpers/route-action"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; -import I18n from "discourse-i18n"; +import { i18n } from "discourse-i18n"; export default class AdminBackupsActions extends Component { @service currentUser; @@ -15,7 +15,7 @@ export default class AdminBackupsActions extends Component { toggleReadOnlyMode() { if (!this.site.isReadOnly) { this.dialog.yesNoConfirm({ - message: I18n.t("admin.backups.read_only.enable.confirm"), + message: i18n("admin.backups.read_only.enable.confirm"), didConfirm: () => { this.currentUser.set("hideReadOnlyAlert", true); this.#toggleReadOnlyMode(true); diff --git a/app/assets/javascripts/admin/addon/components/admin-backups-logs.js b/app/assets/javascripts/admin/addon/components/admin-backups-logs.js index ce0306a5b2c..0a02a657026 100644 --- a/app/assets/javascripts/admin/addon/components/admin-backups-logs.js +++ b/app/assets/javascripts/admin/addon/components/admin-backups-logs.js @@ -3,13 +3,13 @@ import { scheduleOnce } from "@ember/runloop"; import { classNames } from "@ember-decorators/component"; import { observes, on } from "@ember-decorators/object"; import discourseDebounce from "discourse-common/lib/debounce"; -import I18n from "discourse-i18n"; +import { i18n } from "discourse-i18n"; @classNames("admin-backups-logs") export default class AdminBackupsLogs extends Component { showLoadingSpinner = false; hasFormattedLogs = false; - noLogsMessage = I18n.t("admin.backups.logs.none"); + noLogsMessage = i18n("admin.backups.logs.none"); formattedLogs = ""; index = 0; diff --git a/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs b/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs index 22af1e94b92..abe34fb4bca 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs @@ -1,13 +1,13 @@ import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; -import I18n from "discourse-i18n"; +import { i18n } from "discourse-i18n"; export default class AdminConfigAreaCard extends Component { @tracked collapsed = false; get computedHeading() { if (this.args.heading) { - return I18n.t(this.args.heading); + return i18n(this.args.heading); } return this.args.translatedHeading; } @@ -18,7 +18,7 @@ export default class AdminConfigAreaCard extends Component { get computedDescription() { if (this.args.description) { - return I18n.t(this.args.description); + return i18n(this.args.description); } return this.args.translatedDescription; } diff --git a/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/contact-information.gjs b/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/contact-information.gjs index e0bf32ec63c..c215ae17a64 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/contact-information.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/contact-information.gjs @@ -6,8 +6,7 @@ import { service } from "@ember/service"; import Form from "discourse/components/form"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; -import i18n from "discourse-common/helpers/i18n"; -import I18n from "discourse-i18n"; +import { i18n } from "discourse-i18n"; import GroupChooser from "select-kit/components/group-chooser"; import UserChooser from "select-kit/components/user-chooser"; @@ -65,7 +64,7 @@ export default class AdminConfigAreasAboutContactInformation extends Component { this.toasts.success({ duration: 3000, data: { - message: I18n.t( + message: i18n( "admin.config_areas.about.toasts.contact_information_saved" ), }, diff --git a/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/general-settings.gjs b/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/general-settings.gjs index 7ba26e0b715..3fdf8d1a90a 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/general-settings.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/general-settings.gjs @@ -5,8 +5,7 @@ import { service } from "@ember/service"; import Form from "discourse/components/form"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; -import i18n from "discourse-common/helpers/i18n"; -import I18n from "discourse-i18n"; +import { i18n } from "discourse-i18n"; export default class AdminConfigAreasAboutGeneralSettings extends Component { @service toasts; @@ -47,7 +46,7 @@ export default class AdminConfigAreasAboutGeneralSettings extends Component { this.toasts.success({ duration: 3000, data: { - message: I18n.t( + message: i18n( "admin.config_areas.about.toasts.general_settings_saved" ), }, diff --git a/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/your-organization.gjs b/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/your-organization.gjs index b43af60d62b..4a6b105e7b7 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/your-organization.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-area-cards/about/your-organization.gjs @@ -5,8 +5,7 @@ import { service } from "@ember/service"; import Form from "discourse/components/form"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; -import i18n from "discourse-common/helpers/i18n"; -import I18n from "discourse-i18n"; +import { i18n } from "discourse-i18n"; export default class AdminConfigAreasAboutYourOrganization extends Component { @service toasts; @@ -41,7 +40,7 @@ export default class AdminConfigAreasAboutYourOrganization extends Component { this.toasts.success({ duration: 30000, data: { - message: I18n.t( + message: i18n( "admin.config_areas.about.toasts.your_organization_saved" ), }, diff --git a/app/assets/javascripts/admin/addon/components/admin-config-area-empty-list.gjs b/app/assets/javascripts/admin/addon/components/admin-config-area-empty-list.gjs index f5bf3444354..08a7009ef2c 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-area-empty-list.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-area-empty-list.gjs @@ -1,6 +1,6 @@ import DButton from "discourse/components/d-button"; import concatClass from "discourse/helpers/concat-class"; -import i18n from "discourse-common/helpers/i18n"; +import { i18n } from "discourse-i18n"; const AdminConfigAreaEmptyList =