Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
MTRNord committed May 16, 2017
1 parent c0bed33 commit 3d0b894
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/translating-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Adding new strings

1. Check if the import ``import _t from 'counterpart'`` is present. If not add it to the other import statements.
1. Check if the import ``import _t from 'counterpart-riot'`` is present. If not add it to the other import statements.
2. Add ``_t()`` to your string. (Don't forget curly braces when you assign an expression to JSX attributes in the render method)
3. Add the String to the ``en_EN.json`` file in ``src/i18n`` or if you are working in matrix-react-sdk you can find the json file in ``src/i18n/strings``

Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/RightPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
'use strict';

import React from 'react';
import _t from 'counterpart';
import _t from 'counterpart-riot';
import sdk from 'matrix-react-sdk';
import Matrix from "matrix-js-sdk";
import dis from 'matrix-react-sdk/lib/dispatcher';
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/RoomDirectory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
import _t from 'counterpart-riot';

import {instanceForInstanceId, protocolNameForInstanceId} from '../../utils/DirectoryUtils';

Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/RoomSubList.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import ReactDOM from 'react-dom';
import classNames from 'classnames';
import { DropTarget } from 'react-dnd';
import sdk from 'matrix-react-sdk';
import _t from 'counterpart';
import _t from 'counterpart-riot';
import dis from 'matrix-react-sdk/lib/dispatcher';
import Unread from 'matrix-react-sdk/lib/Unread';
import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/SearchBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
'use strict';

var React = require('react');
import _t from 'counterpart';
import _t from 'counterpart-riot';
var sdk = require('matrix-react-sdk')
var dis = require('matrix-react-sdk/lib/dispatcher');
var rate_limited_func = require('matrix-react-sdk/lib/ratelimitedfunc');
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/context_menus/MessageContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
import _t from 'counterpart-riot';
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';
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/context_menus/RoomTileContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
import _t from 'counterpart-riot';
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';
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/elements/ImageView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
import _t from 'counterpart-riot';

module.exports = React.createClass({
displayName: 'ImageView',
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/globals/MatrixToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
'use strict';

var React = require('react');
import _t from 'counterpart';
import _t from 'counterpart-riot';
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');
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/login/VectorCustomServerDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

var React = require("react");
import _t from 'counterpart';
import _t from 'counterpart-riot';

module.exports = React.createClass({
displayName: 'VectorCustomServerDialog',
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/login/VectorLoginFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
'use strict';

var React = require('react');
import _t from 'counterpart';
import _t from 'counterpart-riot';

module.exports = React.createClass({
displayName: 'VectorLoginFooter',
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/messages/DateSeparator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
// 'use strict';

import React from 'react';
import _t from 'counterpart';
import _t from 'counterpart-riot';

function getdaysArray() {
var days = [];
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/rooms/DNDRoomTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
import _t from 'counterpart-riot';
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';
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/settings/Notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

'use strict';
var React = require('react');
import _t from 'counterpart';
import _t from 'counterpart-riot';
var q = require("q");
var sdk = require('matrix-react-sdk');
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
Expand Down
2 changes: 1 addition & 1 deletion src/vector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if (process.env.NODE_ENV !== 'production') {
var RunModernizrTests = require("./modernizr"); // this side-effects a global
var ReactDOM = require("react-dom");
// Workaround for broken export
import * as counterpart from 'counterpart';
import * as counterpart from 'counterpart-riot';
var languageHandler = require("matrix-react-sdk/lib/languageHandler");
var sdk = require("matrix-react-sdk");
var PlatformPeg = require("matrix-react-sdk/lib/PlatformPeg");
Expand Down

0 comments on commit 3d0b894

Please sign in to comment.