mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
WIP: arabic localization.
This commit is contained in:
@@ -73,7 +73,6 @@
|
|||||||
"react-dropzone": "^11.0.1",
|
"react-dropzone": "^11.0.1",
|
||||||
"react-error-boundary": "^3.0.2",
|
"react-error-boundary": "^3.0.2",
|
||||||
"react-hotkeys-hook": "^3.0.3",
|
"react-hotkeys-hook": "^3.0.3",
|
||||||
"react-intl": "^3.12.0",
|
|
||||||
"react-intl-universal": "^2.4.7",
|
"react-intl-universal": "^2.4.7",
|
||||||
"react-loadable": "^5.5.0",
|
"react-loadable": "^5.5.0",
|
||||||
"react-query": "^3.6.0",
|
"react-query": "^3.6.0",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import { Button } from '@blueprintjs/core';
|
import { Button } from '@blueprintjs/core';
|
||||||
import { Icon, If } from 'components';
|
import { Icon, If } from 'components';
|
||||||
import { useBalanceSheetContext } from './BalanceSheetProvider';
|
import { useBalanceSheetContext } from './BalanceSheetProvider';
|
||||||
import { FormattedMessage as T } from 'react-intl';
|
import { FormattedMessage as T } from 'components';
|
||||||
import FinancialLoadingBar from '../FinancialLoadingBar';
|
import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Button } from '@blueprintjs/core';
|
import { Button } from '@blueprintjs/core';
|
||||||
import { Icon, If } from 'components';
|
import { Icon, If } from 'components';
|
||||||
import { FormattedMessage as T } from 'react-intl';
|
import { FormattedMessage as T } from 'components';
|
||||||
|
|
||||||
import { dynamicColumns } from './utils';
|
import { dynamicColumns } from './utils';
|
||||||
import { useCashFlowStatementContext } from './CashFlowStatementProvider';
|
import { useCashFlowStatementContext } from './CashFlowStatementProvider';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import { Button } from '@blueprintjs/core';
|
import { Button } from '@blueprintjs/core';
|
||||||
import { Icon, If } from 'components';
|
import { Icon, If } from 'components';
|
||||||
import { FormattedMessage as T } from 'react-intl';
|
import { FormattedMessage as T } from 'components';
|
||||||
|
|
||||||
import { getForceWidth, getColumnWidth } from 'utils';
|
import { getForceWidth, getColumnWidth } from 'utils';
|
||||||
import { useGeneralLedgerContext } from './GeneralLedgerProvider';
|
import { useGeneralLedgerContext } from './GeneralLedgerProvider';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Button } from '@blueprintjs/core';
|
import { Button } from '@blueprintjs/core';
|
||||||
import { Icon, If } from 'components';
|
import { Icon, If } from 'components';
|
||||||
import { FormattedMessage as T } from 'react-intl';
|
import { FormattedMessage as T } from 'components';
|
||||||
|
|
||||||
import { dynamicColumns } from './utils';
|
import { dynamicColumns } from './utils';
|
||||||
import FinancialLoadingBar from '../FinancialLoadingBar';
|
import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Button } from '@blueprintjs/core';
|
import { Button } from '@blueprintjs/core';
|
||||||
import { Icon, If } from 'components';
|
import { Icon, If } from 'components';
|
||||||
import { FormattedMessage as T } from 'react-intl';
|
import { FormattedMessage as T } from 'components';
|
||||||
|
|
||||||
import { useProfitLossSheetContext } from './ProfitLossProvider';
|
import { useProfitLossSheetContext } from './ProfitLossProvider';
|
||||||
import FinancialLoadingBar from '../FinancialLoadingBar';
|
import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { chain } from 'lodash';
|
import { chain } from 'lodash';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { FormattedMessage as T } from 'react-intl';
|
import { FormattedMessage as T } from 'components';
|
||||||
|
|
||||||
export const balanceSheetRowsReducer = (accounts) => {
|
export const balanceSheetRowsReducer = (accounts) => {
|
||||||
return accounts.map((account) => {
|
return accounts.map((account) => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
import { FormattedMessage as T } from 'react-intl';
|
import { FormattedMessage as T } from 'components';
|
||||||
|
|
||||||
import { DataTable } from 'components';
|
import { DataTable } from 'components';
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, {useEffect, useState, useCallback} from 'react';
|
|||||||
import { useAsync } from 'react-use';
|
import { useAsync } from 'react-use';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { Intent, Alert } from '@blueprintjs/core';
|
import { Intent, Alert } from '@blueprintjs/core';
|
||||||
import { FormattedMessage as T, FormattedHTMLMessage } from 'react-intl';
|
import { FormattedMessage as T, FormattedHTMLMessage } from 'components';
|
||||||
|
|
||||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||||
import DashboardPageContent from 'components/Dashboard/DashboardPageContent';
|
import DashboardPageContent from 'components/Dashboard/DashboardPageContent';
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
import { createIntl, createIntlCache } from 'react-intl';
|
|
||||||
// import messages from 'lang/en/index.json';
|
|
||||||
import arabicMessages from 'lang/ar/index.json';
|
|
||||||
import englishMessages from 'lang/en/index.json';
|
|
||||||
|
|
||||||
import { setLocale } from 'yup';
|
|
||||||
import { locale } from 'lang/en/locale';
|
|
||||||
|
|
||||||
// This is optional but highly recommended since it prevents memory leak
|
|
||||||
const cache = createIntlCache();
|
|
||||||
|
|
||||||
// Creates globa intl instance.
|
|
||||||
const intl = createIntl(
|
|
||||||
{
|
|
||||||
locale: 'en',
|
|
||||||
messages,
|
|
||||||
},
|
|
||||||
cache,
|
|
||||||
);
|
|
||||||
|
|
||||||
setLocale(locale);
|
|
||||||
|
|
||||||
const { formatMessage } = intl;
|
|
||||||
|
|
||||||
export { formatMessage };
|
|
||||||
|
|
||||||
export default intl;
|
|
||||||
Reference in New Issue
Block a user