mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +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:
@ -5,7 +5,7 @@ import { service } from "@ember/service";
|
||||
import { tagName } from "@ember-decorators/component";
|
||||
import { fmt } from "discourse/lib/computed";
|
||||
import discourseComputed, { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import Permalink from "admin/models/permalink";
|
||||
|
||||
@tagName("")
|
||||
@ -23,12 +23,12 @@ export default class PermalinkForm extends Component {
|
||||
@discourseComputed
|
||||
permalinkTypes() {
|
||||
return [
|
||||
{ id: "topic_id", name: I18n.t("admin.permalink.topic_id") },
|
||||
{ id: "post_id", name: I18n.t("admin.permalink.post_id") },
|
||||
{ id: "category_id", name: I18n.t("admin.permalink.category_id") },
|
||||
{ id: "tag_name", name: I18n.t("admin.permalink.tag_name") },
|
||||
{ id: "external_url", name: I18n.t("admin.permalink.external_url") },
|
||||
{ id: "user_id", name: I18n.t("admin.permalink.user_id") },
|
||||
{ id: "topic_id", name: i18n("admin.permalink.topic_id") },
|
||||
{ id: "post_id", name: i18n("admin.permalink.post_id") },
|
||||
{ id: "category_id", name: i18n("admin.permalink.category_id") },
|
||||
{ id: "tag_name", name: i18n("admin.permalink.tag_name") },
|
||||
{ id: "external_url", name: i18n("admin.permalink.external_url") },
|
||||
{ id: "user_id", name: i18n("admin.permalink.user_id") },
|
||||
];
|
||||
}
|
||||
|
||||
@ -74,11 +74,11 @@ export default class PermalinkForm extends Component {
|
||||
|
||||
let error;
|
||||
if (e?.jqXHR?.responseJSON?.errors) {
|
||||
error = I18n.t("generic_error_with_reason", {
|
||||
error = i18n("generic_error_with_reason", {
|
||||
error: e.jqXHR.responseJSON.errors.join(". "),
|
||||
});
|
||||
} else {
|
||||
error = I18n.t("generic_error");
|
||||
error = i18n("generic_error");
|
||||
}
|
||||
|
||||
this.dialog.alert({
|
||||
|
Reference in New Issue
Block a user