Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tapi18n t and isRtl functions from ui to utils #13005

Merged
merged 3 commits into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"globals" : true,
"isChrome" : false,
"isFirefox" : false,
"isRtl" : false,
"JitsiMeetExternalAPI" : false,
"jscolor" : false,
"KonchatNotification" : false,
Expand All @@ -56,7 +55,6 @@
"Settings" : false,
"SideNav" : false,
"TAPi18next" : false,
"t" : false,
"toolbarSearch" : false,
"TwitterConnect" : false,
"updateAvatarOfUsername" : false,
Expand Down
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,4 @@ rocketchat:bigbluebutton
rocketchat:mailmessages
juliancwirko:postcss
littledata:synced-cron
rocketchat:utils
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ rocketchat:ui-message@0.1.0
rocketchat:ui-sidenav@0.1.0
rocketchat:ui-vrecord@0.0.1
rocketchat:user-data-download@1.0.0
rocketchat:utils@0.0.1
rocketchat:version@1.0.0
rocketchat:version-check@0.0.1
rocketchat:videobridge@0.2.0
Expand Down
1 change: 1 addition & 0 deletions client/methods/updateMessage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { TimeSync } from 'meteor/mizzao:timesync';
import { t } from 'meteor/rocketchat:utils';
import _ from 'underscore';
import moment from 'moment';
import toastr from 'toastr';
Expand Down
2 changes: 1 addition & 1 deletion client/startup/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Tracker } from 'meteor/tracker';
import { TAPi18n } from 'meteor/tap:i18n';
import { isRtl } from 'meteor/rocketchat:ui';
import { isRtl } from 'meteor/rocketchat:utils';
import moment from 'moment';

const currentLanguage = new ReactiveVar();
Expand Down
2 changes: 2 additions & 0 deletions imports/message-read-receipt/client/room.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { t } from 'meteor/rocketchat:utils';

RocketChat.MessageAction.addButton({
id: 'receipt-detail',
icon: 'info-circled',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Mongo } from 'meteor/mongo';
import { ReactiveVar } from 'meteor/reactive-var';
import { Tracker } from 'meteor/tracker';
import { Template } from 'meteor/templating';
import { t } from 'meteor/rocketchat:utils';
import toastr from 'toastr';
import moment from 'moment';

Expand Down
2 changes: 1 addition & 1 deletion packages/chatpal-search/client/route.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';

FlowRouter.route('/admin/chatpal', {
name: 'chatpal-admin',
Expand Down
1 change: 1 addition & 0 deletions packages/chatpal-search/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Package.onUse(function(api) {
api.use([
'ecmascript',
'templating',
'rocketchat:utils',
]);
api.addAssets([
'server/asset/chatpal-enter.svg',
Expand Down
3 changes: 2 additions & 1 deletion packages/rocketchat-2fa/client/TOTPPassword.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import toastr from 'toastr';

function reportError(error, callback) {
Expand Down
3 changes: 2 additions & 1 deletion packages/rocketchat-2fa/client/accountSecurity.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { RocketChat } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:utils';
import toastr from 'toastr';
import qrcode from 'yaqrcode';

Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-2fa/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Package.onUse(function(api) {
'sha',
'random',
'rocketchat:ui',
'rocketchat:utils',
]);

api.mainModule('client/index.js', 'client');
Expand Down
3 changes: 2 additions & 1 deletion packages/rocketchat-apps/client/admin/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import toastr from 'toastr';
import { ReactiveVar } from 'meteor/reactive-var';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';

import { t } from 'meteor/rocketchat:utils';
import { AppEvents } from '../communication';

const ENABLED_STATUS = ['auto_enabled', 'manually_enabled'];
const HOST = 'https://marketplace.rocket.chat';
const enabled = ({ status }) => ENABLED_STATUS.includes(status);
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-apps/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Package.onUse(function(api) {
'ecmascript',
'rocketchat:lib',
'rocketchat:api',
'rocketchat:utils',
'templating',
]);

Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-authorization/client/route.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';

FlowRouter.route('/admin/permissions', {
name: 'admin-permissions',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { RocketChat, handleError } from 'meteor/rocketchat:lib';

import toastr from 'toastr';
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-authorization/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Package.onUse(function(api) {
'ecmascript',
'rocketchat:lib',
'mongo',
'rocketchat:utils',
]);
api.use([
'templating',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { ReactiveVar } from 'meteor/reactive-var';
import { Random } from 'meteor/random';
import { Template } from 'meteor/templating';
import { RocketChat } from 'meteor/rocketchat:lib';
import { ChatSubscription, t } from 'meteor/rocketchat:ui';
import { ChatSubscription } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import _ from 'underscore';
import toastr from 'toastr';

Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-autotranslate/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Package.onUse(function(api) {
'ddp-rate-limiter',
'rocketchat:lib',
'templating',
'rocketchat:utils',
]);
api.addFiles('client/stylesheets/autotranslate.css', 'client');
api.mainModule('client/index.js', 'client');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { Session } from 'meteor/session';
import { Template } from 'meteor/templating';
import { AutoComplete } from 'meteor/mizzao:autocomplete';
import { RocketChat, handleError } from 'meteor/rocketchat:lib';
import { t, ChatRoom } from 'meteor/rocketchat:ui';
import { ChatRoom } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { Deps } from 'meteor/deps';
import toastr from 'toastr';
import resetSelection from '../resetSelection';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Package.onUse(function(api) {
'rocketchat:channel-settings',
'mizzao:autocomplete',
'mongo',
'rocketchat:utils',
]);
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import s from 'underscore.string';

Meteor.startup(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';
import { TAPi18n } from 'meteor/tap:i18n';
import { popover } from 'meteor/rocketchat:ui';
import toastr from 'toastr';
import moment from 'moment';
import s from 'underscore.string';
import { call, erase, hide, leave, RocketChat, RoomSettingsEnum } from 'meteor/rocketchat:lib';
import { modal, t, ChatRoom } from 'meteor/rocketchat:ui';
import { modal, ChatRoom, popover } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';

const common = {
canLeaveRoom() {
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-channel-settings/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Package.onUse(function(api) {
'templating',
'rocketchat:lib',
'rocketchat:ui',
'rocketchat:utils',
]);
api.addFiles('client/stylesheets/channel-settings.css', 'client');
api.mainModule('client/index.js', 'client');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { TAPi18n } from 'meteor/tap:i18n';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { handleError } from 'meteor/rocketchat:lib';
import toastr from 'toastr';
import s from 'underscore.string';
Expand Down
3 changes: 2 additions & 1 deletion packages/rocketchat-custom-sounds/client/admin/soundInfo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { handleError } from 'meteor/rocketchat:lib';

Template.soundInfo.helpers({
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-custom-sounds/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Package.onUse(function(api) {
'ecmascript',
'rocketchat:file',
'rocketchat:lib',
'rocketchat:utils',
'templating',
'reactive-var',
'webapp',
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-e2e/client/accountEncryption.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import toastr from 'toastr';
import s from 'underscore.string';
import { RocketChat } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:utils';
import { e2e } from 'meteor/rocketchat:e2e';

Template.accountEncryption.helpers({
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-e2e/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Package.onUse(function(api) {
'less',
'mizzao:timesync',
'rocketchat:lib',
'rocketchat:utils',
'templating',
'sha',
]);
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-emoji-custom/client/admin/emojiEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { TAPi18n } from 'meteor/tap:i18n';
import { handleError } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import toastr from 'toastr';
import s from 'underscore.string';

Expand Down
3 changes: 2 additions & 1 deletion packages/rocketchat-emoji-custom/client/admin/emojiInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';
import { handleError } from 'meteor/rocketchat:lib';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';

Template.emojiInfo.helpers({
name() {
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-emoji-custom/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Package.onUse(function(api) {
'rocketchat:emoji',
'rocketchat:file',
'rocketchat:lib',
'rocketchat:utils',
'templating',
'webapp',
'kadira:flow-router',
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-grant/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Package.onUse(function(api) {
'mongo',
'check',
'ecmascript',
'rocketchat:utils',
'rocketchat:lib',
'rocketchat:accounts',
'rocketchat:ui',
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-grant/server/authenticate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Accounts } from 'meteor/accounts-base';
import { Meteor } from 'meteor/meteor';
import { GrantError } from './error';
import Providers from './providers';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';

const setAvatarFromUrl = (userId, url) => new Promise((resolve, reject) => {
Meteor.runAsUser(userId, () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-importer/client/admin/adminImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { TAPi18n } from 'meteor/tap:i18n';
import { RocketChat, handleError } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';

Template.adminImport.helpers({
isAdmin() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Importers } from 'meteor/rocketchat:importer';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { RocketChat, handleError } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import toastr from 'toastr';

Template.adminImportPrepare.helpers({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ReactiveVar } from 'meteor/reactive-var';
import { Importers, ImporterWebsocketReceiver, ProgressStep } from 'meteor/rocketchat:importer';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { handleError } from 'meteor/rocketchat:lib';
import toastr from 'toastr';

Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-importer/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Package.onUse(function(api) {
'ecmascript',
'templating',
'check',
'rocketchat:utils',
'rocketchat:lib',
'rocketchat:logger',
]);
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-integrations/client/route.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';

FlowRouter.route('/admin/integrations', {
name: 'admin-integrations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { TAPi18n } from 'meteor/tap:i18n';
import { RocketChat, handleError } from 'meteor/rocketchat:lib';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { ChatIntegrations } from '../collections';
import hljs from 'highlight.js';
import toastr from 'toastr';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { TAPi18n } from 'meteor/tap:i18n';
import { RocketChat, handleError } from 'meteor/rocketchat:lib';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { ChatIntegrations } from '../collections';
import hljs from 'highlight.js';
import toastr from 'toastr';
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-integrations/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Package.onUse(function(api) {
'rocketchat:authorization',
'rocketchat:theme',
'rocketchat:logger',
'rocketchat:utils',
'kadira:flow-router',
'kadira:blaze-layout',
'nimble:restivus',
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-irc/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Package.onUse(function(api) {
api.use([
'ecmascript',
'underscore',
'rocketchat:utils',
'rocketchat:lib',
'rocketchat:ui',
]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import Bridge from '../irc-bridge';

Meteor.methods({
Expand Down
Loading