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:
@@ -9,7 +9,7 @@ import {
|
||||
Position,
|
||||
} from '@blueprintjs/core';
|
||||
import classNames from 'classnames';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
|
||||
import { Icon } from 'components';
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React from 'react';
|
||||
import * as Yup from 'yup';
|
||||
import moment from 'moment';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import intl from 'react-intl-universal';
|
||||
import { Formik, Form } from 'formik';
|
||||
import { Tabs, Tab, Button, Intent } from '@blueprintjs/core';
|
||||
|
||||
@@ -26,7 +27,7 @@ function InventoryValuationHeader({
|
||||
// #withInventoryValuationActions
|
||||
toggleInventoryValuationFilterDrawer,
|
||||
}) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
|
||||
// Form validation schema.
|
||||
const validationSchema = Yup.object().shape({
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { FastField } from 'formik';
|
||||
import { DateInput } from '@blueprintjs/datetime';
|
||||
import { FormGroup, Position } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Row, Col, FieldHint } from 'components';
|
||||
import {
|
||||
momentFormatter,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import FinancialSheet from 'components/FinancialSheet';
|
||||
import { DataTable } from 'components';
|
||||
@@ -14,7 +14,7 @@ export default function InventoryValuationTable({
|
||||
//#ownProps
|
||||
companyName,
|
||||
}) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
|
||||
// inventory valuation context.
|
||||
const {
|
||||
@@ -43,7 +43,7 @@ export default function InventoryValuationTable({
|
||||
<FinancialSheet
|
||||
companyName={companyName}
|
||||
name="inventory-valuation"
|
||||
sheetType={formatMessage({ id: 'inventory_valuation' })}
|
||||
sheetType={intl.get('inventory_valuation')}
|
||||
asDate={new Date()}
|
||||
loading={isLoading}
|
||||
>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import intl from 'react-intl-universal';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import { If } from 'components';
|
||||
import { CellTextSpan } from 'components/Datatable/Cells';
|
||||
@@ -11,7 +11,7 @@ import FinancialLoadingBar from '../FinancialLoadingBar';
|
||||
*/
|
||||
|
||||
export const useInventoryValuationTableColumns = () => {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
|
||||
// inventory valuation context
|
||||
const {
|
||||
@@ -21,14 +21,14 @@ export const useInventoryValuationTableColumns = () => {
|
||||
return useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: formatMessage({ id: 'item_name' }),
|
||||
Header: intl.get('item_name'),
|
||||
accessor: (row) => (row.code ? `${row.name} - ${row.code}` : row.name),
|
||||
className: 'name',
|
||||
width: 240,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'quantity' }),
|
||||
Header: intl.get('quantity'),
|
||||
accessor: 'quantity_formatted',
|
||||
Cell: CellTextSpan,
|
||||
className: 'quantity_formatted',
|
||||
@@ -38,7 +38,7 @@ export const useInventoryValuationTableColumns = () => {
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'asset_value' }),
|
||||
Header: intl.get('asset_value'),
|
||||
accessor: 'valuation_formatted',
|
||||
Cell: CellTextSpan,
|
||||
className: 'valuation',
|
||||
@@ -48,7 +48,7 @@ export const useInventoryValuationTableColumns = () => {
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: formatMessage({ id: 'average' }),
|
||||
Header: intl.get('average'),
|
||||
accessor: 'average_formatted',
|
||||
Cell: CellTextSpan,
|
||||
className: 'average_formatted',
|
||||
@@ -58,7 +58,7 @@ export const useInventoryValuationTableColumns = () => {
|
||||
textOverview: true,
|
||||
},
|
||||
],
|
||||
[tableRows, formatMessage],
|
||||
[tableRows],
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user