From ee85eb961a36b13effec8d2d23373c14a0f2d2d3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 25 May 2017 11:39:56 +0100 Subject: [PATCH] Bulk change counterpart imports to use react-sdk wrapper function, rather than using counterpart directly. --- src/components/structures/BottomLeftMenu.js | 2 +- src/components/structures/RightPanel.js | 2 +- src/components/structures/RoomDirectory.js | 2 +- src/components/structures/RoomSubList.js | 2 +- src/components/structures/SearchBox.js | 2 +- src/components/views/context_menus/MessageContextMenu.js | 2 +- src/components/views/context_menus/RoomTileContextMenu.js | 2 +- src/components/views/elements/ImageView.js | 2 +- src/components/views/globals/MatrixToolbar.js | 2 +- src/components/views/login/VectorCustomServerDialog.js | 2 +- src/components/views/login/VectorLoginFooter.js | 2 +- src/components/views/messages/DateSeparator.js | 2 +- src/components/views/rooms/DNDRoomTile.js | 2 +- src/components/views/settings/Notifications.js | 2 +- src/notifications/VectorPushRulesDefinitions.js | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/components/structures/BottomLeftMenu.js b/src/components/structures/BottomLeftMenu.js index 57da85eb..c8c7ba2c 100644 --- a/src/components/structures/BottomLeftMenu.js +++ b/src/components/structures/BottomLeftMenu.js @@ -19,7 +19,7 @@ limitations under the License. var React = require('react'); var ReactDOM = require('react-dom'); var sdk = require('matrix-react-sdk'); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; var dis = require('matrix-react-sdk/lib/dispatcher'); var AccessibleButton = require('matrix-react-sdk/lib/components/views/elements/AccessibleButton'); diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 6a099bf3..c12952fb 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -17,7 +17,7 @@ limitations under the License. 'use strict'; import React from 'react'; -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; import sdk from 'matrix-react-sdk'; import Matrix from "matrix-js-sdk"; import dis from 'matrix-react-sdk/lib/dispatcher'; diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index efd61ef9..e9350847 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -30,7 +30,7 @@ var linkifyMatrix = require('matrix-react-sdk/lib/linkify-matrix'); var sanitizeHtml = require('sanitize-html'); var q = require('q'); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; import {instanceForInstanceId, protocolNameForInstanceId} from '../../utils/DirectoryUtils'; diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 2dec274e..b368948c 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -21,7 +21,7 @@ var ReactDOM = require('react-dom'); var classNames = require('classnames'); var DropTarget = require('react-dnd').DropTarget; var sdk = require('matrix-react-sdk'); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; var dis = require('matrix-react-sdk/lib/dispatcher'); var Unread = require('matrix-react-sdk/lib/Unread'); var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); diff --git a/src/components/structures/SearchBox.js b/src/components/structures/SearchBox.js index 42777ed0..faee0b5f 100644 --- a/src/components/structures/SearchBox.js +++ b/src/components/structures/SearchBox.js @@ -17,7 +17,7 @@ limitations under the License. 'use strict'; var React = require('react'); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; var sdk = require('matrix-react-sdk') var dis = require('matrix-react-sdk/lib/dispatcher'); var rate_limited_func = require('matrix-react-sdk/lib/ratelimitedfunc'); diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 73934cab..227cee10 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -21,7 +21,7 @@ var React = require('react'); var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var dis = require('matrix-react-sdk/lib/dispatcher'); var sdk = require('matrix-react-sdk'); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; var Modal = require('matrix-react-sdk/lib/Modal'); var Resend = require("matrix-react-sdk/lib/Resend"); import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; diff --git a/src/components/views/context_menus/RoomTileContextMenu.js b/src/components/views/context_menus/RoomTileContextMenu.js index 4401e264..a7b19689 100644 --- a/src/components/views/context_menus/RoomTileContextMenu.js +++ b/src/components/views/context_menus/RoomTileContextMenu.js @@ -21,7 +21,7 @@ import q from 'q'; import React from 'react'; import classNames from 'classnames'; import sdk from 'matrix-react-sdk'; -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg'; import dis from 'matrix-react-sdk/lib/dispatcher'; import DMRoomMap from 'matrix-react-sdk/lib/utils/DMRoomMap'; diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index 187a7bfc..dd0490ac 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -25,7 +25,7 @@ var filesize = require('filesize'); var AccessibleButton = require('matrix-react-sdk/lib/components/views/elements/AccessibleButton'); const Modal = require('matrix-react-sdk/lib/Modal'); const sdk = require('matrix-react-sdk'); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; module.exports = React.createClass({ displayName: 'ImageView', diff --git a/src/components/views/globals/MatrixToolbar.js b/src/components/views/globals/MatrixToolbar.js index aef32d99..6d47ad1b 100644 --- a/src/components/views/globals/MatrixToolbar.js +++ b/src/components/views/globals/MatrixToolbar.js @@ -17,7 +17,7 @@ limitations under the License. 'use strict'; var React = require('react'); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; var Notifier = require("matrix-react-sdk/lib/Notifier"); var sdk = require('matrix-react-sdk') var AccessibleButton = require('matrix-react-sdk/lib/components/views/elements/AccessibleButton'); diff --git a/src/components/views/login/VectorCustomServerDialog.js b/src/components/views/login/VectorCustomServerDialog.js index 1190c69e..d7fe545a 100644 --- a/src/components/views/login/VectorCustomServerDialog.js +++ b/src/components/views/login/VectorCustomServerDialog.js @@ -15,7 +15,7 @@ limitations under the License. */ var React = require("react"); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; module.exports = React.createClass({ displayName: 'VectorCustomServerDialog', diff --git a/src/components/views/login/VectorLoginFooter.js b/src/components/views/login/VectorLoginFooter.js index 32929d43..e905afc1 100644 --- a/src/components/views/login/VectorLoginFooter.js +++ b/src/components/views/login/VectorLoginFooter.js @@ -17,7 +17,7 @@ limitations under the License. 'use strict'; var React = require('react'); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; module.exports = React.createClass({ displayName: 'VectorLoginFooter', diff --git a/src/components/views/messages/DateSeparator.js b/src/components/views/messages/DateSeparator.js index 0810b18b..f2ea3ffa 100644 --- a/src/components/views/messages/DateSeparator.js +++ b/src/components/views/messages/DateSeparator.js @@ -17,7 +17,7 @@ limitations under the License. // 'use strict'; import React from 'react'; -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; import DateUtils from 'matrix-react-sdk/lib/DateUtils'; function getdaysArray() { diff --git a/src/components/views/rooms/DNDRoomTile.js b/src/components/views/rooms/DNDRoomTile.js index 3180103e..6abb5bd0 100644 --- a/src/components/views/rooms/DNDRoomTile.js +++ b/src/components/views/rooms/DNDRoomTile.js @@ -23,7 +23,7 @@ import {DropTarget} from 'react-dnd'; import dis from 'matrix-react-sdk/lib/dispatcher'; import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg'; import sdk from 'matrix-react-sdk'; -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; import RoomTile from 'matrix-react-sdk/lib/components/views/rooms/RoomTile'; import * as Rooms from 'matrix-react-sdk/lib/Rooms'; import Modal from 'matrix-react-sdk/lib/Modal'; diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 2599cf18..cbffe279 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -16,7 +16,7 @@ limitations under the License. 'use strict'; var React = require('react'); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; var q = require("q"); var sdk = require('matrix-react-sdk'); var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); diff --git a/src/notifications/VectorPushRulesDefinitions.js b/src/notifications/VectorPushRulesDefinitions.js index 6aea7137..b9ec3321 100644 --- a/src/notifications/VectorPushRulesDefinitions.js +++ b/src/notifications/VectorPushRulesDefinitions.js @@ -18,7 +18,7 @@ limitations under the License. var StandardActions = require('./StandardActions'); var PushRuleVectorState = require('./PushRuleVectorState'); -import _t from 'counterpart-riot'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; class VectorPushRuleDefinition { constructor(opts) {