mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Rename I18n imports to discourse-i18n (#23915)
As of #23867 this is now a real package, so updating the imports to use the real package name, rather than relying on the alias. The name change in the package name is because `I18n` is not a valid name as NPM packages must be all lowercase. This commit also introduces an eslint rule to prevent importing from the old I18n path. For themes/plugins, the old 'i18n' name remains functional.
This commit is contained in:
@@ -5,7 +5,7 @@ import { htmlSafe } from "@ember/template";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatChannelArchiveStatus extends Component {
|
||||
@service chatApi;
|
||||
|
||||
@@ -2,7 +2,7 @@ import Component from "@glimmer/component";
|
||||
import { LinkTo } from "@ember/routing";
|
||||
import { inject as service } from "@ember/service";
|
||||
import icon from "discourse-common/helpers/d-icon";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatChannelStatus from "discourse/plugins/chat/discourse/components/chat-channel-status";
|
||||
import ChatChannelTitle from "discourse/plugins/chat/discourse/components/chat-channel-title";
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import { modifier } from "ember-modifier";
|
||||
import isElementInViewport from "discourse/lib/is-element-in-viewport";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import gt from "truth-helpers/helpers/gt";
|
||||
import ChatUserInfo from "discourse/plugins/chat/discourse/components/chat-user-info";
|
||||
import DcFilterInput from "discourse/plugins/chat/discourse/components/dc-filter-input";
|
||||
|
||||
@@ -12,7 +12,7 @@ import concatClass from "discourse/helpers/concat-class";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import icon from "discourse-common/helpers/d-icon";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import and from "truth-helpers/helpers/and";
|
||||
import eq from "truth-helpers/helpers/eq";
|
||||
import ChatChannelMetadata from "discourse/plugins/chat/discourse/components/chat-channel-metadata";
|
||||
|
||||
@@ -9,7 +9,7 @@ import DToggleSwitch from "discourse/components/d-toggle-switch";
|
||||
import categoryBadge from "discourse/helpers/category-badge";
|
||||
import replaceEmoji from "discourse/helpers/replace-emoji";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ComboBox from "select-kit/components/combo-box";
|
||||
import ChatForm from "discourse/plugins/chat/discourse/components/chat/form";
|
||||
import ChatModalArchiveChannel from "discourse/plugins/chat/discourse/components/chat/modal/archive-channel";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Component from "@glimmer/component";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import {
|
||||
CHANNEL_STATUSES,
|
||||
channelStatusIcon,
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
} from "discourse/lib/user-status-on-autocomplete";
|
||||
import { cloneJSON } from "discourse-common/lib/object";
|
||||
import { findRawTemplate } from "discourse-common/lib/raw-templates";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatModalChannelSummary from "discourse/plugins/chat/discourse/components/chat/modal/channel-summary";
|
||||
import { chatComposerButtons } from "discourse/plugins/chat/discourse/lib/chat-composer-buttons";
|
||||
import ChatMessageInteractor from "discourse/plugins/chat/discourse/lib/chat-message-interactor";
|
||||
|
||||
@@ -2,7 +2,7 @@ import Component from "@glimmer/component";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatMentionWarnings extends Component {
|
||||
@service siteSettings;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { inject as service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import domFromString from "discourse-common/lib/dom-from-string";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatMessageCollapser extends Component {
|
||||
@service siteSettings;
|
||||
|
||||
@@ -17,7 +17,7 @@ import { updateUserStatusOnMention } from "discourse/lib/update-user-status-on-m
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import eq from "truth-helpers/helpers/eq";
|
||||
import not from "truth-helpers/helpers/not";
|
||||
import ChatMessageAvatar from "discourse/plugins/chat/discourse/components/chat/message/avatar";
|
||||
|
||||
@@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatReplyingIndicator extends Component {
|
||||
@service currentUser;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Component from "@glimmer/component";
|
||||
import { inject as service } from "@ember/service";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatRetentionReminderText extends Component {
|
||||
@service siteSettings;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { modifier } from "ember-modifier";
|
||||
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
|
||||
import isElementInViewport from "discourse/lib/is-element-in-viewport";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import eq from "truth-helpers/helpers/eq";
|
||||
import ChatThreadListHeader from "discourse/plugins/chat/discourse/components/chat/thread-list/header";
|
||||
import ChatThreadListItem from "discourse/plugins/chat/discourse/components/chat/thread-list/item";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Component from "@glimmer/component";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatUserAvatar from "discourse/plugins/chat/discourse/components/chat-user-avatar";
|
||||
|
||||
export default class ChatThreadParticipants extends Component {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Component from "@glimmer/component";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatThread from "discourse/plugins/chat/discourse/models/chat-thread";
|
||||
|
||||
export default class ChatUploadDropZone extends Component {
|
||||
|
||||
@@ -2,7 +2,7 @@ import Component from "@glimmer/component";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatAdminExportMessages extends Component {
|
||||
@service chatAdminApi;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatComposer from "../../chat-composer";
|
||||
|
||||
export default class ChatComposerChannel extends ChatComposer {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatComposer from "../../chat-composer";
|
||||
|
||||
export default class ChatComposerThread extends ChatComposer {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { inject as service } from "@ember/service";
|
||||
import concatClass from "discourse/helpers/concat-class";
|
||||
import icon from "discourse-common/helpers/d-icon";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatHeaderIconUnreadIndicator from "discourse/plugins/chat/discourse/components/chat/header/icon/unread-indicator";
|
||||
import { getUserChatSeparateSidebarMode } from "discourse/plugins/chat/discourse/lib/get-user-chat-separate-sidebar-mode";
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import { TrackedArray } from "@ember-compat/tracked-built-ins";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatChatable from "discourse/plugins/chat/discourse/models/chat-chatable";
|
||||
|
||||
const MAX_RESULTS = 10;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Component from "@glimmer/component";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatMessageCreatorChannelRow extends Component {
|
||||
@service site;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Component from "@glimmer/component";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatMessageCreatorUserRow extends Component {
|
||||
@service currentUser;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { htmlSafe } from "@ember/template";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import {
|
||||
EXISTING_TOPIC_SELECTION,
|
||||
NEW_TOPIC_SELECTION,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatModalChannelSummary extends Component {
|
||||
@service chatApi;
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ajax } from "discourse/lib/ajax";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const DEFAULT_HINT = htmlSafe(
|
||||
I18n.t("chat.create_channel.choose_category.default_hint", {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { htmlSafe } from "@ember/template";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatModalDeleteChannel extends Component {
|
||||
@service chatApi;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { inject as service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { isBlank } from "@ember/utils";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatModalMoveMessageToChannel extends Component {
|
||||
@service chat;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { CHANNEL_STATUSES } from "discourse/plugins/chat/discourse/models/chat-channel";
|
||||
|
||||
export default class ChatModalToggleChannelStatus extends Component {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { clipboardCopyAsync } from "discourse/lib/utilities";
|
||||
import { isTesting } from "discourse-common/config/environment";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import not from "truth-helpers/helpers/not";
|
||||
import ChatModalMoveMessageToChannel from "discourse/plugins/chat/discourse/components/chat/modal/move-message-to-channel";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
export default class ToggleChannelMembershipButton extends Component {
|
||||
@service chat;
|
||||
@tracked isLoading = false;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { and } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminPluginsChatController extends Controller {
|
||||
@service dialog;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { inject as service } from "@ember/service";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { isTesting } from "discourse-common/config/environment";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { CHAT_SOUNDS } from "discourse/plugins/chat/discourse/services/chat-audio-manager";
|
||||
|
||||
const CHAT_ATTRS = [
|
||||
|
||||
@@ -2,7 +2,7 @@ import { htmlSafe } from "@ember/template";
|
||||
import User from "discourse/models/user";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import { registerUnbound } from "discourse-common/lib/helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
registerUnbound("format-chat-date", function (message, mode) {
|
||||
const currentUser = User.current();
|
||||
|
||||
@@ -6,7 +6,7 @@ import loadScript from "discourse/lib/load-script";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import { samePrefix } from "discourse-common/lib/get-url";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default {
|
||||
name: "chat-decorators",
|
||||
|
||||
@@ -2,7 +2,7 @@ import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { getOwnerWithFallback } from "discourse-common/lib/get-owner";
|
||||
import { replaceIcon } from "discourse-common/lib/icon-library";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { MENTION_KEYWORDS } from "discourse/plugins/chat/discourse/components/chat-message";
|
||||
import { clearChatComposerButtons } from "discourse/plugins/chat/discourse/lib/chat-composer-buttons";
|
||||
import ChannelHashtagType from "discourse/plugins/chat/discourse/lib/hashtag-types/channel";
|
||||
|
||||
@@ -9,7 +9,7 @@ import { escapeExpression } from "discourse/lib/utilities";
|
||||
import { avatarUrl } from "discourse-common/lib/avatar-utils";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatModalNewMessage from "discourse/plugins/chat/discourse/components/chat/modal/new-message";
|
||||
import { initSidebarState } from "discourse/plugins/chat/discourse/lib/init-sidebar-state";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import slugifyChannel from "discourse/plugins/chat/discourse/lib/slugify-channel";
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
let _chatComposerButtons = {};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ChatMessageFlag {
|
||||
title() {
|
||||
|
||||
@@ -10,7 +10,7 @@ import { clipboardCopy } from "discourse/lib/utilities";
|
||||
import Bookmark from "discourse/models/bookmark";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { MESSAGE_CONTEXT_THREAD } from "discourse/plugins/chat/discourse/components/chat-message";
|
||||
import ChatMessageFlag from "discourse/plugins/chat/discourse/lib/chat-message-flag";
|
||||
import ChatMessage from "discourse/plugins/chat/discourse/models/chat-message";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export const MAX_DISPLAYED_USERNAMES = 15;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import Bookmark from "discourse/models/bookmark";
|
||||
import User from "discourse/models/user";
|
||||
import { getOwnerWithFallback } from "discourse-common/lib/get-owner";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import transformAutolinks from "discourse/plugins/chat/discourse/lib/transform-auto-links";
|
||||
import ChatMessageReaction from "discourse/plugins/chat/discourse/models/chat-message-reaction";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { defaultHomepage } from "discourse/lib/utilities";
|
||||
import { scrollTop } from "discourse/mixins/scroll-top";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { getUserChatSeparateSidebarMode } from "discourse/plugins/chat/discourse/lib/get-user-chat-separate-sidebar-mode";
|
||||
import { initSidebarState } from "discourse/plugins/chat/discourse/lib/init-sidebar-state";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Service, { inject as service } from "@ember/service";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { CHANNEL_STATUSES } from "discourse/plugins/chat/discourse/models/chat-channel";
|
||||
import ChatChannelArchive from "../models/chat-channel-archive";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { DefaultNotificationItem } from "discourse/widgets/default-notification-
|
||||
import RawHtml from "discourse/widgets/raw-html";
|
||||
import { createWidgetFrom } from "discourse/widgets/widget";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import slugifyChannel from "discourse/plugins/chat/discourse/lib/slugify-channel";
|
||||
|
||||
createWidgetFrom(DefaultNotificationItem, "chat-invitation-notification-item", {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { DefaultNotificationItem } from "discourse/widgets/default-notification-
|
||||
import RawHtml from "discourse/widgets/raw-html";
|
||||
import { createWidgetFrom } from "discourse/widgets/widget";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import slugifyChannel from "discourse/plugins/chat/discourse/lib/slugify-channel";
|
||||
|
||||
const chatNotificationItem = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { performEmojiUnescape } from "pretty-text/emoji";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
let customMarkdownCookFn;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { exists, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import fabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||
|
||||
module("Discourse Chat | Component | chat-channel-card", function (hooks) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import pretender from "discourse/tests/helpers/create-pretender";
|
||||
import { exists, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import fabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||
|
||||
module("Discourse Chat | Component | chat-channel-leave-btn", function (hooks) {
|
||||
|
||||
@@ -2,7 +2,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 "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import fabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||
import {
|
||||
CHANNEL_STATUSES,
|
||||
|
||||
@@ -3,7 +3,7 @@ import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { exists, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
module("Discourse Chat | Component | chat-composer-upload", function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
import sinon from "sinon";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { HEADER_INDICATOR_PREFERENCE_ALL_NEW } from "discourse/plugins/chat/discourse/controllers/preferences-chat";
|
||||
|
||||
module("Discourse Chat | Component | chat-header-icon", function (hooks) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { module, test } from "qunit";
|
||||
import Bookmark from "discourse/models/bookmark";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { exists, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import fabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||
import ChatMessage from "discourse/plugins/chat/discourse/models/chat-message";
|
||||
|
||||
|
||||
@@ -2,7 +2,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 "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import fabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||
|
||||
module(
|
||||
|
||||
@@ -3,7 +3,7 @@ import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
module(
|
||||
"Discourse Chat | Component | chat-message-separator-new",
|
||||
|
||||
@@ -4,7 +4,7 @@ import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import pretender from "discourse/tests/helpers/create-pretender";
|
||||
import { query, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import fabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||
|
||||
module("Discourse Chat | Component | chat-notice", function (hooks) {
|
||||
|
||||
@@ -2,7 +2,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 "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
||||
|
||||
module(
|
||||
|
||||
@@ -2,7 +2,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 "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import fabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||
|
||||
module(
|
||||
|
||||
@@ -4,7 +4,7 @@ import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import pretender, { response } from "discourse/tests/helpers/create-pretender";
|
||||
import { exists, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
module(
|
||||
"Integration | Component | user-menu | chat-notifications-list",
|
||||
|
||||
@@ -6,7 +6,7 @@ import { NOTIFICATION_TYPES } from "discourse/tests/fixtures/concerns/notificati
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { deepMerge } from "discourse-common/lib/object";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import slugifyChannel from "discourse/plugins/chat/discourse/lib/slugify-channel";
|
||||
|
||||
function getNotification(overrides = {}) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
function initializePlugin(api) {
|
||||
const siteSettings = api.container.lookup("site-settings:main");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
function initializeDetails(api) {
|
||||
api.decorateCooked(($elem) => $("details", $elem), {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { click, fillIn, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
acceptance("Details Button", function (needs) {
|
||||
needs.user();
|
||||
|
||||
@@ -10,7 +10,7 @@ import computed, {
|
||||
debounce,
|
||||
observes,
|
||||
} from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import generateDateMarkup from "discourse/plugins/discourse-local-dates/lib/local-date-markup-generator";
|
||||
|
||||
export default Component.extend({
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from "discourse/lib/to-markdown";
|
||||
import { renderIcon } from "discourse-common/lib/icon-library";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import generateDateMarkup from "discourse/plugins/discourse-local-dates/lib/local-date-markup-generator";
|
||||
import LocalDatesCreateModal from "../discourse/components/modal/local-dates-create";
|
||||
import LocalDateBuilder from "../lib/local-date-builder";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { renderIcon } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import DateWithZoneHelper from "./date-with-zone-helper";
|
||||
|
||||
const DATETIME_FORMAT = "LLL";
|
||||
|
||||
@@ -4,7 +4,7 @@ import sinon from "sinon";
|
||||
import { fixturesByUrl } from "discourse/tests/helpers/create-pretender";
|
||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { cloneJSON } from "discourse-common/lib/object";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
acceptance(
|
||||
"Local Dates - Download calendar without default calendar option set",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QUnit, { module, test } from "qunit";
|
||||
import sinon from "sinon";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import LocalDateBuilder from "../lib/local-date-builder";
|
||||
|
||||
const UTC = "Etc/UTC";
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class PollBreakdownModal extends Component {
|
||||
@service dialog;
|
||||
|
||||
@@ -3,7 +3,7 @@ import EmberObject, { action } from "@ember/object";
|
||||
import { gt, or } from "@ember/object/computed";
|
||||
import { observes } from "@ember-decorators/object";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export const BAR_CHART_TYPE = "bar";
|
||||
export const PIE_CHART_TYPE = "pie";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { next } from "@ember/runloop";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
import { PIE_CHART_TYPE } from "../components/modal/poll-ui-builder";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { htmlSafe } from "@ember/template";
|
||||
import { tagName } from "@ember-decorators/component";
|
||||
import { propertyEqual } from "discourse/lib/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
|
||||
@tagName("")
|
||||
|
||||
@@ -11,7 +11,7 @@ import { avatarFor } from "discourse/widgets/post";
|
||||
import RawHtml from "discourse/widgets/raw-html";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { iconHTML, iconNode } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { getColors } from "discourse/plugins/poll/lib/chart-colors";
|
||||
import evenRound from "discourse/plugins/poll/lib/even-round";
|
||||
import PollBreakdownModal from "../components/modal/poll-breakdown";
|
||||
@@ -541,7 +541,7 @@ createWidget("discourse-poll-info", {
|
||||
instructions.push(
|
||||
new RawHtml({
|
||||
html: `<li>
|
||||
${iconHTML("far-eye")}
|
||||
${iconHTML("far-eye")}
|
||||
<span>${I18n.t("poll.public.title")}</span>
|
||||
</li>`,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*eslint no-bitwise:0 */
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const DATA_PREFIX = "data-poll-";
|
||||
const DEFAULT_POLL_NAME = "poll";
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
exists,
|
||||
updateCurrentUser,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button";
|
||||
|
||||
acceptance("Poll Builder - polls are enabled", function (needs) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
query,
|
||||
queryAll,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
let requests = 0;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import StyleguideExample from "../../styleguide-example";
|
||||
|
||||
const t = I18n.t.bind(I18n);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class extends Component {
|
||||
@tracked inline = true;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Helper from "@ember/component/helper";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default Helper.helper(function (params) {
|
||||
return I18n.t(`styleguide.sections.${params[0].replace(/\-/g, "_")}.title`);
|
||||
|
||||
Reference in New Issue
Block a user