mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
WIP: Arabic localization.|
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
PopoverInteractionKind,
|
||||
Position,
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import Icon from 'components/Icon';
|
||||
|
||||
@@ -3,7 +3,7 @@ import moment from 'moment';
|
||||
import * as Yup from 'yup';
|
||||
import { Formik, Form } from 'formik';
|
||||
import { Tabs, Tab, Button, Intent } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
|
||||
import FinancialStatementHeader from 'containers/FinancialStatements/FinancialStatementHeader';
|
||||
import GeneralLedgerHeaderGeneralPane from './GeneralLedgerHeaderGeneralPane';
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
FormGroup,
|
||||
Classes,
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { AccountsMultiSelect, Row, Col } from 'components';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
import { defaultExpanderReducer } from 'utils';
|
||||
import { useIntl } from 'react-intl';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import FinancialSheet from 'components/FinancialSheet';
|
||||
import DataTable from 'components/DataTable';
|
||||
@@ -15,7 +15,7 @@ import { useGeneralLedgerTableColumns } from './components';
|
||||
* General ledger table.
|
||||
*/
|
||||
export default function GeneralLedgerTable({ companyName }) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
|
||||
// General ledger context.
|
||||
const {
|
||||
@@ -36,7 +36,7 @@ export default function GeneralLedgerTable({ companyName }) {
|
||||
return (
|
||||
<FinancialSheet
|
||||
companyName={companyName}
|
||||
sheetType={formatMessage({ id: 'general_ledger_sheet' })}
|
||||
sheetType={intl.get('general_ledger_sheet')}
|
||||
fromDate={query.from_date}
|
||||
toDate={query.to_date}
|
||||
name="general-ledger"
|
||||
@@ -45,9 +45,7 @@ export default function GeneralLedgerTable({ companyName }) {
|
||||
>
|
||||
<DataTable
|
||||
className="bigcapital-datatable--financial-report"
|
||||
noResults={formatMessage({
|
||||
id: 'this_report_does_not_contain_any_data_between_date_period',
|
||||
})}
|
||||
noResults={intl.get('this_report_does_not_contain_any_data_between_date_period')}
|
||||
columns={columns}
|
||||
data={tableRows}
|
||||
rowClassNames={rowClassNames}
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
import { formatMessage } from 'services/intl';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const filterAccountsOptions = [
|
||||
{
|
||||
key: 'all-accounts',
|
||||
name: formatMessage({ id: 'all_accounts' }),
|
||||
hint: formatMessage({ id: 'all_accounts_including_with_zero_balance' }),
|
||||
name: intl.get('all_accounts'),
|
||||
hint: intl.get('all_accounts_including_with_zero_balance'),
|
||||
},
|
||||
{
|
||||
key: 'with-transactions',
|
||||
name: formatMessage({ id: 'accounts_with_transactions' }),
|
||||
hint: formatMessage({
|
||||
id: 'include_accounts_once_has_transactions_on_given_date_period',
|
||||
}),
|
||||
name: intl.get('accounts_with_transactions'),
|
||||
hint: intl.get('include_accounts_once_has_transactions_on_given_date_period'),
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import intl from 'react-intl-universal';
|
||||
import { Button } from '@blueprintjs/core';
|
||||
import { Icon, If } from 'components';
|
||||
import { getForceWidth, getColumnWidth } from 'utils';
|
||||
@@ -10,7 +10,7 @@ import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||
* Retrieve the general ledger table columns.
|
||||
*/
|
||||
export function useGeneralLedgerTableColumns() {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
|
||||
// General ledger context.
|
||||
const {
|
||||
@@ -20,7 +20,7 @@ export function useGeneralLedgerTableColumns() {
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: formatMessage({ id: 'date' }),
|
||||
Header: intl.get('date'),
|
||||
accessor: (row) => {
|
||||
if (row.rowType === 'ACCOUNT_ROW') {
|
||||
return (
|
||||
@@ -38,33 +38,33 @@ export function useGeneralLedgerTableColumns() {
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'account_name' }),
|
||||
Header: intl.get('account_name'),
|
||||
accessor: 'name',
|
||||
className: 'name',
|
||||
textOverview: true,
|
||||
// width: 200,
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'transaction_type' }),
|
||||
Header: intl.get('transaction_type'),
|
||||
accessor: 'reference_type_formatted',
|
||||
className: 'transaction_type',
|
||||
width: 125,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'transaction_number' }),
|
||||
Header: intl.get('transaction_number'),
|
||||
accessor: 'reference_id',
|
||||
className: 'transaction_number',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'description' }),
|
||||
Header: intl.get('description'),
|
||||
accessor: 'note',
|
||||
className: 'description',
|
||||
// width: 145,
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'credit' }),
|
||||
Header: intl.get('credit'),
|
||||
accessor: 'formatted_credit',
|
||||
className: 'credit',
|
||||
width: getColumnWidth(tableRows, 'formatted_credit', {
|
||||
@@ -74,7 +74,7 @@ export function useGeneralLedgerTableColumns() {
|
||||
}),
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'debit' }),
|
||||
Header: intl.get('debit'),
|
||||
accessor: 'formatted_debit',
|
||||
className: 'debit',
|
||||
width: getColumnWidth(tableRows, 'formatted_debit', {
|
||||
@@ -83,7 +83,7 @@ export function useGeneralLedgerTableColumns() {
|
||||
}),
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'amount' }),
|
||||
Header: intl.get('amount'),
|
||||
accessor: 'formatted_amount',
|
||||
className: 'amount',
|
||||
width: getColumnWidth(tableRows, 'formatted_amount', {
|
||||
@@ -92,7 +92,7 @@ export function useGeneralLedgerTableColumns() {
|
||||
}),
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'running_balance' }),
|
||||
Header: intl.get('running_balance'),
|
||||
accessor: 'formatted_running_balance',
|
||||
className: 'running_balance',
|
||||
width: getColumnWidth(tableRows, 'formatted_running_balance', {
|
||||
@@ -101,7 +101,7 @@ export function useGeneralLedgerTableColumns() {
|
||||
}),
|
||||
},
|
||||
],
|
||||
[formatMessage, tableRows],
|
||||
[tableRows],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user