Skip to content

Commit

Permalink
Fixed localize() issue
Browse files Browse the repository at this point in the history
  • Loading branch information
msamprz committed Jul 3, 2019
1 parent 7ee6b60 commit c53b81a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 52 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { localize } from '_common/localize';
import { localize } from 'App/i18n';
import InputField from 'App/Components/Form/InputField/input-field.jsx';
import IconCalendar from 'Assets/Reports/icon-calendar.jsx';
import {
Expand Down
4 changes: 3 additions & 1 deletion src/Modules/Reports/Constants/data-table-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export const getProfitTableColumnsTemplate = (currency, items_count) => [
title : '',
col_index : 'action_type',
renderCellContent: ({ cell_value, row_obj, is_footer }) => {
if (is_footer) return localize('Profit/loss on the last [_1] contracts', items_count);
if (is_footer) {
return localize('Profit/loss on the last {{item_count}} contracts', { item_count: items_count });
}

return (
<MarketSymbolIconRow
Expand Down
2 changes: 1 addition & 1 deletion src/_common/base/client_base.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const moment = require('moment');
const isCryptocurrency = require('./currency_base').isCryptocurrency;
const SocketCache = require('./socket_cache');
const localize = require('../localize').localize;
const localize = require('../../App/i18n').localize;
const LocalStore = require('../storage').LocalStore;
const State = require('../storage').State;
const getPropertyValue = require('../utility').getPropertyValue;
Expand Down
2 changes: 1 addition & 1 deletion src/_common/base/currency_base.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const getLanguage = require('../language').get;
const localize = require('../localize').localize;
const localize = require('../../App/i18n').localize;
const getPropertyValue = require('../utility').getPropertyValue;

let currencies_config = {};
Expand Down
2 changes: 1 addition & 1 deletion src/_common/base/network_monitor_base.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const BinarySocket = require('./socket_base');
const localize = require('../localize').localize;
const localize = require('../../App/i18n').localize;

/*
* Monitors the network status and initialises the WebSocket connection
Expand Down
47 changes: 0 additions & 47 deletions src/_common/localize.js

This file was deleted.

0 comments on commit c53b81a

Please sign in to comment.