mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
WIP: Arabic localization.|
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import { useFormik } from 'formik';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import {useHistory } from 'react-router-dom';
|
||||
import {
|
||||
@@ -339,7 +340,7 @@ function ViewForm({
|
||||
intent={hasError(`roles[${index}].value`) && Intent.DANGER}
|
||||
>
|
||||
<InputGroup
|
||||
placeholder={intl.formatMessage({ id: 'value' })}
|
||||
placeholder={intl.get('value')}
|
||||
{...getFieldProps(`roles[${index}].value`)}
|
||||
/>
|
||||
</FormGroup>
|
||||
@@ -370,7 +371,7 @@ function ViewForm({
|
||||
<Row>
|
||||
<Col sm={8}>
|
||||
<FormGroup
|
||||
label={intl.formatMessage({ id: 'Logic Expression' })}
|
||||
label={intl.get('Logic Expression')}
|
||||
className={'form-group--logic-expression'}
|
||||
intent={
|
||||
errors.logic_expression &&
|
||||
@@ -408,7 +409,7 @@ function ViewForm({
|
||||
<H6 className='dragable-columns__title'>Available Columns</H6>
|
||||
|
||||
<InputGroup
|
||||
placeholder={intl.formatMessage({ id: 'search' })}
|
||||
placeholder={intl.get('search')}
|
||||
leftIcon='search'
|
||||
/>
|
||||
|
||||
@@ -449,7 +450,7 @@ function ViewForm({
|
||||
<Col sm={4} className='dragable-columns__column'>
|
||||
<H6 className='dragable-columns__title'>Selected Columns</H6>
|
||||
<InputGroup
|
||||
placeholder={intl.formatMessage({ id: 'search' })}
|
||||
placeholder={intl.get('search')}
|
||||
leftIcon='search'
|
||||
/>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, {useEffect, useState, useCallback} from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { Intent, Alert } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T, FormattedHTMLMessage, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T, FormattedHTMLMessage } from 'react-intl';
|
||||
|
||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||
import DashboardPageContent from 'components/Dashboard/DashboardPageContent';
|
||||
@@ -33,7 +33,7 @@ function ViewFormPage({
|
||||
const { resource_slug: resourceSlug, view_id: viewId } = useParams();
|
||||
const [stateDeleteView, setStateDeleteView] = useState(null);
|
||||
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
|
||||
const fetchHook = useAsync(async () => {
|
||||
return Promise.all([
|
||||
@@ -51,14 +51,14 @@ function ViewFormPage({
|
||||
|
||||
useEffect(() => {
|
||||
if (viewId) {
|
||||
changePageTitle(formatMessage({id:'edit_custom_view'}));
|
||||
changePageTitle(intl.get('edit_custom_view'));
|
||||
} else {
|
||||
changePageTitle(formatMessage({id:'new_custom_view'}));
|
||||
changePageTitle(intl.get('new_custom_view'));
|
||||
}
|
||||
return () => {
|
||||
changePageTitle('');
|
||||
};
|
||||
}, [viewId, changePageTitle,formatMessage]);
|
||||
}, [viewId, changePageTitle]);
|
||||
|
||||
|
||||
// Handle delete view button click.
|
||||
@@ -76,9 +76,7 @@ function ViewFormPage({
|
||||
requestDeleteView(stateDeleteView.id).then((response) => {
|
||||
setStateDeleteView(null);
|
||||
AppToaster.show({
|
||||
message: formatMessage({
|
||||
id: 'the_custom_view_has_been_deleted_successfully',
|
||||
}),
|
||||
message: intl.get('the_custom_view_has_been_deleted_successfully'),
|
||||
intent: Intent.SUCCESS,
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user