clean up i18n! stragglers
refs FOO-2696 flag = none jest needs to explicitly load the _core_en translation file since its i18nTransformer is no longer a thing (and it's what was doing that before) otherwise, this just cleans up the remaining references to i18n! in the code, aside of eslintrc which we'll address in FOO-2738 Change-Id: Ie0a74b46c4d0a48188ba86765b46b2793eed94d7 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286763 Tested-by: James Butters <jbutters@instructure.com> Reviewed-by: Charley Kline <ckline@instructure.com> QA-Review: Charley Kline <ckline@instructure.com> Product-Review: Charley Kline <ckline@instructure.com>
This commit is contained in:
parent
8c41cb0ff3
commit
677f0e06a2
|
@ -20,7 +20,6 @@ const {defaults} = require('jest-config')
|
|||
|
||||
module.exports = {
|
||||
moduleNameMapper: {
|
||||
'^i18n!(.*$)': '<rootDir>/jest/i18nTransformer.js',
|
||||
'\\.svg$': '<rootDir>/jest/imageMock.js',
|
||||
'node_modules-version-of-backbone': require.resolve('backbone'),
|
||||
'node_modules-version-of-react-modal': require.resolve('react-modal'),
|
||||
|
@ -65,7 +64,6 @@ module.exports = {
|
|||
testEnvironment: 'jest-environment-jsdom-fourteen',
|
||||
|
||||
transform: {
|
||||
'^i18n!': '<rootDir>/jest/i18nTransformer.js',
|
||||
'\\.coffee$': '<rootDir>/jest/coffeeTransformer.js',
|
||||
'\\.handlebars$': '<rootDir>/jest/handlebarsTransformer.js',
|
||||
'\\.graphql$': 'jest-raw-loader',
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2017 - present Instructure, Inc.
|
||||
*
|
||||
* This file is part of Canvas.
|
||||
*
|
||||
* Canvas is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License as published by the Free
|
||||
* Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const I18n = require('../ui/shared/i18n/i18nObj').default
|
||||
const core_translations = require('../public/javascripts/translations/_core_en.js')
|
||||
|
||||
module.exports = I18n.scoped('fakeScopeUsedForTestingInJest')
|
|
@ -16,13 +16,13 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import '../public/javascripts/translations/_core_en'
|
||||
import Enzyme from 'enzyme'
|
||||
import Adapter from 'enzyme-adapter-react-16'
|
||||
import {filterUselessConsoleMessages} from '@instructure/js-utils'
|
||||
import rceFormatMessage from '@instructure/canvas-rce/lib/format-message'
|
||||
import plannerFormatMessage from '@instructure/canvas-planner/lib/format-message'
|
||||
import {up as configureDateTime} from '../ui/boot/initializers/configureDateTime'
|
||||
|
||||
import {up as configureDateTimeMomentParser} from '../ui/boot/initializers/configureDateTimeMomentParser'
|
||||
|
||||
rceFormatMessage.setup({
|
||||
|
|
|
@ -22,7 +22,6 @@ import {HTMLElement, KeyboardEventHandler, MouseEventHandler} from 'react'
|
|||
// by default. Declaring them as wildcard modules allows TS to recognize them as
|
||||
// bare-bones interfaces with the `any` type.
|
||||
// See https://www.typescriptlang.org/docs/handbook/modules.html#wildcard-module-declarations
|
||||
declare module 'i18n!*'
|
||||
declare module '*.coffee'
|
||||
declare module '*.graphql'
|
||||
declare module '*.handlebars'
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// import I18n from 'i18n!user_search_selector_item'
|
||||
import React from 'react'
|
||||
|
||||
import {Text} from '@instructure/ui-text'
|
||||
|
|
Loading…
Reference in New Issue