mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 05:47:31 +08: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:
parent
0a6dfee0b9
commit
c34f8b65cb
|
@ -3,6 +3,7 @@
|
|||
"rules": {
|
||||
"discourse-ember/global-ember": "error",
|
||||
"eol-last": "error",
|
||||
"no-restricted-globals": "off"
|
||||
"no-restricted-globals": "off",
|
||||
"no-restricted-imports": ["error", { "paths": ["I18n"] }]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import $ from "jquery";
|
|||
import loadScript from "discourse/lib/load-script";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const COLOR_VARS_REGEX =
|
||||
/\$(primary|secondary|tertiary|quaternary|header_background|header_primary|highlight|danger|success|love)(\s|;|-(low|medium|high))/g;
|
||||
|
|
|
@ -3,7 +3,7 @@ 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 "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
@classNames("admin-backups-logs")
|
||||
export default class AdminBackupsLogs extends Component {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { equal } from "@ember/object/computed";
|
|||
import discourseComputed, {
|
||||
afterRender,
|
||||
} from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const ACTIONS = ["delete", "delete_replies", "edit", "none"];
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { action } from "@ember/object";
|
|||
import { equal } from "@ember/object/computed";
|
||||
import { tagName } from "@ember-decorators/component";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const CUSTOM_REASON_KEY = "custom";
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { alias } from "@ember/object/computed";
|
|||
import { classNames } from "@ember-decorators/component";
|
||||
import { setting } from "discourse/lib/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
@classNames("admin-report-storage-stats")
|
||||
export default class AdminReportStorageStats extends Component {
|
||||
|
|
|
@ -10,8 +10,8 @@ import ReportLoader from "discourse/lib/reports-loader";
|
|||
import { isTesting } from "discourse-common/config/environment";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import Report, { DAILY_LIMIT_DAYS, SCHEMA_VERSION } from "admin/models/report";
|
||||
import I18n from "I18n";
|
||||
|
||||
const TABLE_OPTIONS = {
|
||||
perPage: 8,
|
||||
|
|
|
@ -4,7 +4,7 @@ import { next } from "@ember/runloop";
|
|||
import { fmt } from "discourse/lib/computed";
|
||||
import { isDocumentRTL } from "discourse/lib/text-direction";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminThemeEditor extends Component {
|
||||
warning = null;
|
||||
|
|
|
@ -6,8 +6,8 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import { i18n, propertyEqual } from "discourse/lib/computed";
|
||||
import { bufferedProperty } from "discourse/mixins/buffered-content";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import UserField from "admin/models/user-field";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default Component.extend(bufferedProperty("userField"), {
|
||||
tagName: "",
|
||||
|
|
|
@ -4,7 +4,7 @@ import { alias, equal } from "@ember/object/computed";
|
|||
import { inject as service } from "@ember/service";
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
@classNames("watched-word")
|
||||
export default class AdminWatchedWord extends Component {
|
||||
|
|
|
@ -3,7 +3,7 @@ import { action, computed } from "@ember/object";
|
|||
import { reads } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class EmailStylesEditor extends Component {
|
||||
@service dialog;
|
||||
|
|
|
@ -8,7 +8,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import { bufferedProperty } from "discourse/mixins/buffered-content";
|
||||
import Category from "discourse/models/category";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
@tagName("tr")
|
||||
export default class EmbeddableHost extends Component.extend(
|
||||
|
|
|
@ -5,7 +5,7 @@ import { classNameBindings } from "@ember-decorators/component";
|
|||
import { emojiUrlFor } from "discourse/lib/text";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
@classNameBindings(":value-list", ":emoji-list")
|
||||
export default class EmojiValueList extends Component {
|
||||
|
|
|
@ -3,10 +3,10 @@ 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 "discourse-i18n";
|
||||
import FormTemplateValidationOptionsModal from "admin/components/modal/form-template-validation-options";
|
||||
import { templateFormFields } from "admin/lib/template-form-fields";
|
||||
import FormTemplate from "admin/models/form-template";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class FormTemplateForm extends Component {
|
||||
@service router;
|
||||
|
|
|
@ -3,7 +3,7 @@ import { action } from "@ember/object";
|
|||
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 FormTemplateRowItem extends Component {
|
||||
@service router;
|
||||
|
|
|
@ -8,8 +8,8 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import copyText from "discourse/lib/copy-text";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import AdminUser from "admin/models/admin-user";
|
||||
import I18n from "I18n";
|
||||
|
||||
@classNames("ip-lookup")
|
||||
export default class IpLookup extends Component {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class BadgePreview extends Component {
|
||||
get processedSample() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class DeletePostsConfirmation extends Component {
|
||||
@tracked value;
|
||||
|
|
|
@ -2,8 +2,8 @@ import Component from "@glimmer/component";
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import I18n from "discourse-i18n";
|
||||
import AdminUser from "admin/models/admin-user";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class DeleteUserPostsProgress extends Component {
|
||||
@tracked deletedPosts = 0;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { action } from "@ember/object";
|
|||
import { inject as service } from "@ember/service";
|
||||
import { TrackedArray } from "@ember-compat/tracked-built-ins";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class EditBadgeGroupings extends Component {
|
||||
@service dialog;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Component from "@glimmer/component";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const TABLE_HEADER_KEYS = ["key", "type", "description"];
|
||||
const VALIDATION_KEYS = ["required", "minimum", "maximum", "pattern", "type"];
|
||||
|
|
|
@ -5,8 +5,8 @@ import { inject as service } from "@ember/service";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { POPULAR_THEMES } from "discourse-common/lib/popular-themes";
|
||||
import I18n from "discourse-i18n";
|
||||
import { COMPONENTS, THEMES } from "admin/models/theme";
|
||||
import I18n from "I18n";
|
||||
|
||||
const MIN_NAME_LENGTH = 4;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class MergeUsersConfirmation extends Component {
|
||||
@tracked value;
|
||||
|
|
|
@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
|
|||
import { inject as service } from "@ember/service";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class MergeUsersProgress extends Component {
|
||||
@service messageBus;
|
||||
|
|
|
@ -4,7 +4,7 @@ import { action } from "@ember/object";
|
|||
import { inject as service } from "@ember/service";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class PenalizeUser extends Component {
|
||||
@service dialog;
|
||||
|
|
|
@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
|
|||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class Reseed extends Component {
|
||||
@service dialog;
|
||||
|
|
|
@ -2,7 +2,7 @@ import Component from "@glimmer/component";
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class StartBackup extends Component {
|
||||
@service siteSettings;
|
||||
|
|
|
@ -5,8 +5,8 @@ import { inject as 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 Permalink from "admin/models/permalink";
|
||||
import I18n from "I18n";
|
||||
|
||||
@tagName("")
|
||||
export default class PermalinkForm extends Component {
|
||||
|
|
|
@ -4,8 +4,8 @@ import { schedule } from "@ember/runloop";
|
|||
import { inject as service } from "@ember/service";
|
||||
import { classNames, tagName } from "@ember-decorators/component";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import ScreenedIpAddress from "admin/models/screened-ip-address";
|
||||
import I18n from "I18n";
|
||||
|
||||
/**
|
||||
A form to create an IP address that will be blocked or allowed.
|
||||
|
|
|
@ -3,7 +3,7 @@ import { action, set } from "@ember/object";
|
|||
import { isEmpty } from "@ember/utils";
|
||||
import { classNameBindings } from "@ember-decorators/component";
|
||||
import { on } from "@ember-decorators/object";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
@classNameBindings(":value-list", ":secret-value-list")
|
||||
export default class SecretValueList extends Component {
|
||||
|
|
|
@ -2,7 +2,7 @@ import Component from "@ember/component";
|
|||
import { alias } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import UppyUploadMixin from "discourse/mixins/uppy-upload";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class TagsUploader extends Component.extend(UppyUploadMixin) {
|
||||
@service dialog;
|
||||
|
|
|
@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
|
|||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ThemeSettingsEditor extends Component {
|
||||
@service dialog;
|
||||
|
|
|
@ -4,7 +4,7 @@ import { action } from "@ember/object";
|
|||
import { isEmpty } from "@ember/utils";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const THEME_FIELD_VARIABLE_TYPE_IDS = [2, 3, 4];
|
||||
const SCSS_VARIABLE_NAMES = [
|
||||
|
|
|
@ -7,8 +7,8 @@ import { isEmpty } from "@ember/utils";
|
|||
import { classNames, tagName } from "@ember-decorators/component";
|
||||
import { observes } from "@ember-decorators/object";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import WatchedWord from "admin/models/watched-word";
|
||||
import I18n from "I18n";
|
||||
|
||||
@tagName("form")
|
||||
@classNames("watched-word-form")
|
||||
|
|
|
@ -3,7 +3,7 @@ import { alias } from "@ember/object/computed";
|
|||
import { classNames } from "@ember-decorators/component";
|
||||
import { dialog } from "discourse/lib/uploads";
|
||||
import UppyUploadMixin from "discourse/mixins/uppy-upload";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
@classNames("watched-words-uploader")
|
||||
export default class WatchedWordUploader extends Component.extend(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Component from "@glimmer/component";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class WebhookEventChooser extends Component {
|
||||
get details() {
|
||||
|
|
|
@ -5,7 +5,7 @@ import { inject as service } from "@ember/service";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { ensureJSON, plainJSON, prettyJSON } from "discourse/lib/formatter";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class WebhookEvent extends Component {
|
||||
@service dialog;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Component from "@glimmer/component";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class WebhookStatus extends Component {
|
||||
iconNames = ["far-circle", "times-circle", "circle", "circle"];
|
||||
|
|
|
@ -6,7 +6,7 @@ import { isBlank } from "@ember/utils";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import ApiKeyUrlsModal from "../components/modal/api-key-urls";
|
||||
|
||||
export default class AdminApiKeysNewController extends Controller {
|
||||
|
|
|
@ -5,7 +5,7 @@ import { inject as service } from "@ember/service";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import { i18n, setting } from "discourse/lib/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminBackupsIndexController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -4,7 +4,7 @@ import { action } from "@ember/object";
|
|||
import { inject as service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminBadgesAwardController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -7,7 +7,7 @@ import { observes } from "@ember-decorators/object";
|
|||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { bufferedProperty } from "discourse/mixins/buffered-content";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const IMAGE = "image";
|
||||
const ICON = "icon";
|
||||
|
|
|
@ -3,7 +3,7 @@ import { action, computed } from "@ember/object";
|
|||
import { inject as service } from "@ember/service";
|
||||
import { clipboardCopy } from "discourse/lib/utilities";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminCustomizeColorsShowController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -2,8 +2,8 @@ import Controller from "@ember/controller";
|
|||
import EmberObject, { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import ColorSchemeSelectBaseModal from "admin/components/modal/color-scheme-select-base";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class AdminCustomizeColorsController extends Controller {
|
||||
@service router;
|
||||
|
|
|
@ -2,7 +2,7 @@ import Controller from "@ember/controller";
|
|||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminCustomizeEmailStyleEditController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -4,7 +4,7 @@ import { inject as service } from "@ember/service";
|
|||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { bufferedProperty } from "discourse/mixins/buffered-content";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminCustomizeEmailTemplatesEditController extends Controller.extend(
|
||||
bufferedProperty("emailTemplate")
|
||||
|
|
|
@ -3,7 +3,7 @@ import { action } from "@ember/object";
|
|||
import { inject as service } from "@ember/service";
|
||||
import { url } from "discourse/lib/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminCustomizeThemesEditController extends Controller {
|
||||
@service router;
|
||||
|
|
|
@ -12,10 +12,10 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import { url } from "discourse/lib/computed";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import ThemeSettingsEditor from "admin/components/theme-settings-editor";
|
||||
import { COMPONENTS, THEMES } from "admin/models/theme";
|
||||
import ThemeSettings from "admin/models/theme-settings";
|
||||
import I18n from "I18n";
|
||||
import ThemeUploadAddModal from "../components/theme-upload-add";
|
||||
|
||||
const THEME_UPLOAD_VAR = 2;
|
||||
|
|
|
@ -5,10 +5,10 @@ import { setting } from "discourse/lib/computed";
|
|||
import getURL from "discourse-common/lib/get-url";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import PeriodComputationMixin from "admin/mixins/period-computation";
|
||||
import AdminDashboard from "admin/models/admin-dashboard";
|
||||
import Report from "admin/models/report";
|
||||
import I18n from "I18n";
|
||||
import CustomDateRangeModal from "../components/modal/custom-date-range";
|
||||
|
||||
function staticReport(reportType) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import { htmlSafe } from "@ember/template";
|
|||
import { observes } from "@ember-decorators/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminEmailIndexController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -3,7 +3,7 @@ import EmberObject, { action, computed } from "@ember/object";
|
|||
import { sort } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const ALL_FILTER = "all";
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import { exportEntity } from "discourse/lib/export-csv";
|
|||
import { outputExportResult } from "discourse/lib/export-result";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import I18n from "discourse-i18n";
|
||||
import ScreenedIpAddress from "admin/models/screened-ip-address";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class AdminLogsScreenedIpAddressesController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { inject as service } from "@ember/service";
|
|||
import { exportEntity } from "discourse/lib/export-csv";
|
||||
import { outputExportResult } from "discourse/lib/export-result";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import StaffActionLogDetailsModal from "../components/modal/staff-action-log-details";
|
||||
import ThemeChangeModal from "../components/modal/theme-change";
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import { observes } from "@ember-decorators/object";
|
|||
import { clipboardCopy } from "discourse/lib/utilities";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import I18n from "discourse-i18n";
|
||||
import Permalink from "admin/models/permalink";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class AdminPermalinksController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Controller from "@ember/controller";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
export const DEFAULT_PERIOD = "yearly";
|
||||
|
||||
export default class AdminSearchLogsIndexController extends Controller {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Controller from "@ember/controller";
|
||||
import I18n from "discourse-i18n";
|
||||
import { DEFAULT_PERIOD } from "admin/controllers/admin-search-logs-index";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class AdminSearchLogsTermController extends Controller {
|
||||
loading = false;
|
||||
|
|
|
@ -6,7 +6,7 @@ import { isEmpty } from "@ember/utils";
|
|||
import { observes } from "@ember-decorators/object";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import { debounce } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminSiteSettingsController extends Controller {
|
||||
@service router;
|
||||
|
|
|
@ -4,7 +4,7 @@ import { inject as service } from "@ember/service";
|
|||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { bufferedProperty } from "discourse/mixins/buffered-content";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default Controller.extend(bufferedProperty("siteText"), {
|
||||
dialog: service(),
|
||||
|
|
|
@ -7,7 +7,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
import { grantableBadges } from "discourse/lib/grant-badge-utils";
|
||||
import UserBadge from "discourse/models/user-badge";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminUserBadgesController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -3,7 +3,7 @@ import { action } from "@ember/object";
|
|||
import { gte, sort } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const MAX_FIELDS = 30;
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ import DiscourseURL, { userPath } from "discourse/lib/url";
|
|||
import CanCheckEmails from "discourse/mixins/can-check-emails";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import AdminUser from "admin/models/admin-user";
|
||||
import I18n from "I18n";
|
||||
import DeletePostsConfirmationModal from "../components/modal/delete-posts-confirmation";
|
||||
import DeleteUserPostsProgressModal from "../components/modal/delete-user-posts-progress";
|
||||
import MergeUsersConfirmationModal from "../components/modal/merge-users-confirmation";
|
||||
|
|
|
@ -6,8 +6,8 @@ import CanCheckEmails from "discourse/mixins/can-check-emails";
|
|||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import AdminUser from "admin/models/admin-user";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class AdminUsersListShowController extends Controller.extend(
|
||||
CanCheckEmails
|
||||
|
|
|
@ -6,9 +6,9 @@ import { inject as service } from "@ember/service";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import { fmt } from "discourse/lib/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import WatchedWordTestModal from "admin/components/modal/watched-word-test";
|
||||
import WatchedWord from "admin/models/watched-word";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class AdminWatchedWordsActionController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { inject as service } from "@ember/service";
|
|||
import { isEmpty } from "@ember/utils";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminWebHooksEditController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -3,7 +3,7 @@ import { action } from "@ember/object";
|
|||
import { alias } from "@ember/object/computed";
|
||||
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 AdminWebHooksIndexController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -2,7 +2,7 @@ import Controller, { inject as controller } from "@ember/controller";
|
|||
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 AdminWebHooksShowController extends Controller {
|
||||
@service dialog;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { htmlHelper } from "discourse-common/lib/helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default htmlHelper((size) => I18n.toHumanSize(size));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Helper from "@ember/component/helper";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
function postActionTitle([id, nameKey]) {
|
||||
let title = I18n.t(`admin.flags.short_names.${nameKey}`, {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export const templateFormFields = [
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ import { ajax } from "discourse/lib/ajax";
|
|||
import { fmt, propertyNotEqual } from "discourse/lib/computed";
|
||||
import { splitString } from "discourse/lib/utilities";
|
||||
import discourseComputed, { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import SiteSettingDefaultCategoriesModal from "../components/modal/site-setting-default-categories";
|
||||
|
||||
const CUSTOM_TYPES = [
|
||||
|
|
|
@ -3,7 +3,7 @@ import { readOnly } from "@ember/object/computed";
|
|||
import Mixin from "@ember/object/mixin";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default Mixin.create({
|
||||
@discourseComputed("value", "default")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminPlugin {
|
||||
static create(args = {}) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import Group from "discourse/models/group";
|
|||
import User from "discourse/models/user";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminUser extends User {
|
||||
static find(user_id) {
|
||||
|
|
|
@ -2,7 +2,7 @@ import EmberObject from "@ember/object";
|
|||
import { observes, on } from "@ember-decorators/object";
|
||||
import { propertyNotEqual } from "discourse/lib/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ColorSchemeColor extends EmberObject {
|
||||
// Whether the current value is different than Discourse's default color scheme.
|
||||
|
|
|
@ -4,8 +4,8 @@ import EmberObject from "@ember/object";
|
|||
import { not } from "@ember/object/computed";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import ColorSchemeColor from "admin/models/color-scheme-color";
|
||||
import I18n from "I18n";
|
||||
|
||||
class ColorSchemes extends ArrayProxy {}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import RestModel from "discourse/models/rest";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class FlagType extends RestModel {
|
||||
@discourseComputed("id")
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
import getURL from "discourse-common/lib/get-url";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
// Change this line each time report format change
|
||||
// and you want to ensure cache is reset
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ScreenedEmail extends EmberObject {
|
||||
static findAll() {
|
||||
|
|
|
@ -2,7 +2,7 @@ import EmberObject from "@ember/object";
|
|||
import { equal } from "@ember/object/computed";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ScreenedIpAddress extends EmberObject {
|
||||
static findAll(filter) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class ScreenedUrl extends EmberObject {
|
||||
static findAll() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import Setting from "admin/mixins/setting-object";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class SiteSetting extends EmberObject.extend(Setting) {
|
||||
static findAll() {
|
||||
|
|
|
@ -2,8 +2,8 @@ import { ajax } from "discourse/lib/ajax";
|
|||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import RestModel from "discourse/models/rest";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import AdminUser from "admin/models/admin-user";
|
||||
import I18n from "I18n";
|
||||
|
||||
function format(label, value, escape = true) {
|
||||
return value
|
||||
|
|
|
@ -4,7 +4,7 @@ import { isBlank, isEmpty } from "@ember/utils";
|
|||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import RestModel from "discourse/models/rest";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const THEME_UPLOAD_VAR = 2;
|
||||
const FIELDS_IDS = [0, 1, 5];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class WatchedWord extends EmberObject {
|
||||
static findAll() {
|
||||
|
|
|
@ -7,10 +7,10 @@ import User from "discourse/models/user";
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import { bind } from "discourse-common/utils/decorators";
|
||||
import I18n from "discourse-i18n";
|
||||
import StartBackupModal from "admin/components/modal/start-backup";
|
||||
import Backup from "admin/models/backup";
|
||||
import BackupStatus from "admin/models/backup-status";
|
||||
import I18n from "I18n";
|
||||
|
||||
const LOG_CHANNEL = "/admin/backups/logs";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { ajax } from "discourse/lib/ajax";
|
|||
import Badge from "discourse/models/badge";
|
||||
import BadgeGrouping from "discourse/models/badge-grouping";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminBadgesRoute extends DiscourseRoute {
|
||||
_json = null;
|
||||
|
|
|
@ -3,7 +3,7 @@ import Route from "@ember/routing/route";
|
|||
import { inject as service } from "@ember/service";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import Badge from "discourse/models/badge";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import BadgePreviewModal from "../../components/modal/badge-preview";
|
||||
import EditBadgeGroupingsModal from "../../components/modal/edit-badge-groupings";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { action } from "@ember/object";
|
||||
import Route from "@ember/routing/route";
|
||||
import { inject as service } from "@ember/service";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminCustomizeEmailStyleEditRoute extends Route {
|
||||
@service dialog;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { action } from "@ember/object";
|
||||
import Route from "@ember/routing/route";
|
||||
import { inject as service } from "@ember/service";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminCustomizeThemesEditRoute extends Route {
|
||||
@service dialog;
|
||||
|
|
|
@ -2,8 +2,8 @@ import { action } from "@ember/object";
|
|||
import Route from "@ember/routing/route";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { scrollTop } from "discourse/mixins/scroll-top";
|
||||
import I18n from "discourse-i18n";
|
||||
import { COMPONENTS, THEMES } from "admin/models/theme";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class AdminCustomizeThemesShowRoute extends Route {
|
||||
@service dialog;
|
||||
|
|
|
@ -2,7 +2,7 @@ import { action } from "@ember/object";
|
|||
import Route from "@ember/routing/route";
|
||||
import { next } from "@ember/runloop";
|
||||
import { inject as service } from "@ember/service";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import InstallThemeModal from "../components/modal/install-theme";
|
||||
|
||||
export default class AdminCustomizeThemesRoute extends Route {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminSiteSettingsCategoryRoute extends DiscourseRoute {
|
||||
model(params) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminWatchedWordsActionRoute extends DiscourseRoute {
|
||||
model(params) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default class AdminRoute extends DiscourseRoute {
|
||||
titleToken() {
|
||||
|
|
|
@ -4,9 +4,9 @@ import Service, { inject as service } from "@ember/service";
|
|||
import { htmlSafe } from "@ember/template";
|
||||
import { Promise } from "rsvp";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import I18n from "discourse-i18n";
|
||||
import PenalizeUserModal from "admin/components/modal/penalize-user";
|
||||
import AdminUser from "admin/models/admin-user";
|
||||
import I18n from "I18n";
|
||||
|
||||
// A service that can act as a bridge between the front end Discourse application
|
||||
// and the admin application. Use this if you need front end code to access admin
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { htmlSafe } from "@ember/template";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default function boundI18n(key, options) {
|
||||
return htmlSafe(I18n.t(key, options));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { registerUnbound } from "discourse-common/lib/helpers";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default function i18n(key, params) {
|
||||
return I18n.t(key, params);
|
||||
|
|
|
@ -3,7 +3,7 @@ import { isDevelopment } from "discourse-common/config/environment";
|
|||
import attributeHook from "discourse-common/lib/attribute-hook";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
import escape from "discourse-common/lib/escape";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
||||
let _renderers = [];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { computed } from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
|
||||
|
||||
export default DropdownSelectBoxComponent.extend({
|
||||
|
|
|
@ -3,7 +3,7 @@ import { action } from "@ember/object";
|
|||
import { isBlank } from "@ember/utils";
|
||||
import UppyUploadMixin from "discourse/mixins/uppy-upload";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
export default Component.extend(UppyUploadMixin, {
|
||||
type: "avatar",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user