mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
DEV: Consolidate i18n import paths (#29804)
Enables our new eslint rules which enforce consistent i18n imports. For more info, see 0d58b40cd7
This commit is contained in:
@ -8,8 +8,7 @@ import DButton from "discourse/components/d-button";
|
||||
import replaceEmoji from "discourse/helpers/replace-emoji";
|
||||
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 ChannelTitle from "discourse/plugins/chat/discourse/components/channel-title";
|
||||
|
||||
export default class AdminChatIncomingWebhooksList extends Component {
|
||||
@ -24,7 +23,7 @@ export default class AdminChatIncomingWebhooksList extends Component {
|
||||
@action
|
||||
destroyWebhook(webhook) {
|
||||
this.dialog.deleteConfirm({
|
||||
message: I18n.t("chat.incoming_webhooks.confirm_destroy"),
|
||||
message: i18n("chat.incoming_webhooks.confirm_destroy"),
|
||||
didConfirm: async () => {
|
||||
this.loading = true;
|
||||
|
||||
|
@ -2,7 +2,7 @@ import Component from "@glimmer/component";
|
||||
import { action } from "@ember/object";
|
||||
import { service } from "@ember/service";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import I18n from "discourse-i18n";
|
||||
import { i18n } from 'discourse-i18n';
|
||||
|
||||
export default class ChatAdminPluginActions extends Component {
|
||||
@service dialog;
|
||||
@ -11,7 +11,7 @@ export default class ChatAdminPluginActions extends Component {
|
||||
@action
|
||||
confirmExportMessages() {
|
||||
return this.dialog.confirm({
|
||||
message: I18n.t("chat.admin.export_messages.confirm_export"),
|
||||
message: i18n("chat.admin.export_messages.confirm_export"),
|
||||
didConfirm: () => this.exportMessages(),
|
||||
});
|
||||
}
|
||||
@ -21,7 +21,7 @@ export default class ChatAdminPluginActions extends Component {
|
||||
try {
|
||||
await this.chatAdminApi.exportMessages();
|
||||
this.dialog.alert(
|
||||
I18n.t("chat.admin.export_messages.export_has_started")
|
||||
i18n("chat.admin.export_messages.export_has_started")
|
||||
);
|
||||
} catch (error) {
|
||||
popupAjaxError(error);
|
||||
|
@ -10,8 +10,7 @@ import Form from "discourse/components/form";
|
||||
import replaceEmoji from "discourse/helpers/replace-emoji";
|
||||
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 ChatChannelChooser from "discourse/plugins/chat/discourse/components/chat-channel-chooser";
|
||||
|
||||
export default class ChatIncomingWebhookEditForm extends Component {
|
||||
@ -53,7 +52,7 @@ export default class ChatIncomingWebhookEditForm extends Component {
|
||||
this.toasts.success({
|
||||
duration: 3000,
|
||||
data: {
|
||||
message: I18n.t("chat.incoming_webhooks.saved"),
|
||||
message: i18n("chat.incoming_webhooks.saved"),
|
||||
},
|
||||
});
|
||||
} else {
|
||||
@ -65,7 +64,7 @@ export default class ChatIncomingWebhookEditForm extends Component {
|
||||
this.toasts.success({
|
||||
duration: 3000,
|
||||
data: {
|
||||
message: I18n.t("chat.incoming_webhooks.created"),
|
||||
message: i18n("chat.incoming_webhooks.created"),
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "discourse-i18n";
|
||||
import { i18n } from 'discourse-i18n';
|
||||
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
||||
|
||||
export default class DiscourseChatIncomingWebhooksIndex extends DiscourseRoute {
|
||||
@ -35,6 +35,6 @@ export default class DiscourseChatIncomingWebhooksIndex extends DiscourseRoute {
|
||||
}
|
||||
|
||||
titleToken() {
|
||||
return I18n.t("chat.incoming_webhooks.title");
|
||||
return i18n("chat.incoming_webhooks.title");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user