mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 11:32: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:
@ -3,7 +3,7 @@ import { render } from "@ember/test-helpers";
|
||||
import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import I18n from "discourse-i18n";
|
||||
import { i18n } from 'discourse-i18n';
|
||||
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||
|
||||
module(
|
||||
@ -21,7 +21,7 @@ module(
|
||||
|
||||
assert
|
||||
.dom(".chat-retention-reminder-text")
|
||||
.includesText(I18n.t("chat.retention_reminders.indefinitely_long"));
|
||||
.includesText(i18n("chat.retention_reminders.indefinitely_long"));
|
||||
|
||||
await render(
|
||||
hbs`<ChatRetentionReminderText @channel={{this.channel}} @type="short" />`
|
||||
@ -29,7 +29,7 @@ module(
|
||||
|
||||
assert
|
||||
.dom(".chat-retention-reminder-text")
|
||||
.includesText(I18n.t("chat.retention_reminders.indefinitely_short"));
|
||||
.includesText(i18n("chat.retention_reminders.indefinitely_short"));
|
||||
});
|
||||
|
||||
test("when channel is a public channel", async function (assert) {
|
||||
@ -42,7 +42,7 @@ module(
|
||||
|
||||
assert
|
||||
.dom(".chat-retention-reminder-text")
|
||||
.includesText(I18n.t("chat.retention_reminders.long", { count: 10 }));
|
||||
.includesText(i18n("chat.retention_reminders.long", { count: 10 }));
|
||||
|
||||
await render(
|
||||
hbs`<ChatRetentionReminderText @channel={{this.channel}} @type="short" />`
|
||||
@ -50,7 +50,7 @@ module(
|
||||
|
||||
assert
|
||||
.dom(".chat-retention-reminder-text")
|
||||
.includesText(I18n.t("chat.retention_reminders.short", { count: 10 }));
|
||||
.includesText(i18n("chat.retention_reminders.short", { count: 10 }));
|
||||
});
|
||||
|
||||
test("when channel is a DM channel", async function (assert) {
|
||||
@ -63,7 +63,7 @@ module(
|
||||
|
||||
assert
|
||||
.dom(".chat-retention-reminder-text")
|
||||
.includesText(I18n.t("chat.retention_reminders.long", { count: 10 }));
|
||||
.includesText(i18n("chat.retention_reminders.long", { count: 10 }));
|
||||
|
||||
await render(
|
||||
hbs`<ChatRetentionReminderText @channel={{this.channel}} @type="short" />`
|
||||
@ -71,7 +71,7 @@ module(
|
||||
|
||||
assert
|
||||
.dom(".chat-retention-reminder-text")
|
||||
.includesText(I18n.t("chat.retention_reminders.short", { count: 10 }));
|
||||
.includesText(i18n("chat.retention_reminders.short", { count: 10 }));
|
||||
});
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user