mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: lang.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import React, { useMemo, useCallback } from 'react';
|
||||
import { Alignment, Navbar, NavbarGroup } from '@blueprintjs/core';
|
||||
import { pick } from 'lodash';
|
||||
import { formatMessage } from 'services/intl';
|
||||
|
||||
|
||||
import { DashboardViewsTabs } from 'components';
|
||||
import { useAccountsChartContext } from 'containers/Accounts/AccountsChartProvider';
|
||||
@@ -45,7 +47,7 @@ function AccountsViewsTabs({
|
||||
<Navbar className="navbar--dashboard-views">
|
||||
<NavbarGroup align={Alignment.LEFT}>
|
||||
<DashboardViewsTabs
|
||||
defaultTabText={'All Accounts'}
|
||||
defaultTabText={formatMessage({id:'all_accounts_'})}
|
||||
currentViewId={accountsCustomViewId}
|
||||
resourceName={'accounts'}
|
||||
onChange={handleTabChange}
|
||||
|
||||
@@ -44,7 +44,7 @@ export default function CustomerFormAfterPrimarySection({}) {
|
||||
{({ field, meta: { error, touched } }) => (
|
||||
<InputGroup
|
||||
intent={inputIntent({ error, touched })}
|
||||
placeholder={formatMessage({id:'Mobile'})}
|
||||
placeholder={formatMessage({ id: 'Mobile' })}
|
||||
{...field}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -39,7 +39,7 @@ export default function CurrencyFormFields() {
|
||||
meta: { error, touched },
|
||||
}) => (
|
||||
<FormGroup
|
||||
label={'Currency code'}
|
||||
label={<T id={'currency_code'} />}
|
||||
className={classNames(CLASSES.FILL, 'form-group--type')}
|
||||
>
|
||||
<ListSelect
|
||||
@@ -47,7 +47,7 @@ export default function CurrencyFormFields() {
|
||||
selectedItemProp={'currency_code'}
|
||||
selectedItem={value}
|
||||
textProp={'formatted_name'}
|
||||
defaultText={'Select currency code'}
|
||||
defaultText={<T id={'select_currency_code'} />}
|
||||
onItemSelect={(currency) => {
|
||||
setFieldValue('currency_code', currency.currency_code);
|
||||
setFieldValue('currency_name', currency.name);
|
||||
|
||||
@@ -57,7 +57,7 @@ export default function CustomersBalanceSummaryGeneralPanel() {
|
||||
inline={true}
|
||||
name={'percentage'}
|
||||
small={true}
|
||||
label={'Percentage Of Column'}
|
||||
label={<T id={'percentage_of_column'}/>}
|
||||
{...field}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
@@ -54,7 +54,7 @@ function InventoryValuationActionsBar({
|
||||
<NavbarGroup>
|
||||
<Button
|
||||
className={classNames(Classes.MINIMAL, 'button--gray-highlight')}
|
||||
text={'Re-calc Report'}
|
||||
text={<T id={'recalc_report'} />}
|
||||
onClick={handleRecalculateReport}
|
||||
icon={<Icon icon="refresh-16" iconSize={16} />}
|
||||
/>
|
||||
|
||||
@@ -68,7 +68,7 @@ function JournalHeader({
|
||||
<Tabs animate={true} vertical={true} renderActiveTabPanelOnly={true}>
|
||||
<Tab
|
||||
id="general"
|
||||
title={'General'}
|
||||
title={<T id={'general'} />}
|
||||
panel={<JournalSheetHeaderGeneral />}
|
||||
/>
|
||||
</Tabs>
|
||||
|
||||
@@ -53,7 +53,7 @@ function PurchasesByItemsActionsBar({
|
||||
<NavbarGroup>
|
||||
<Button
|
||||
className={classNames(Classes.MINIMAL, 'button--gray-highlight')}
|
||||
text={'Re-calc Report'}
|
||||
text={<T id={'recalc_report'} />}
|
||||
onClick={handleRecalculateReport}
|
||||
icon={<Icon icon="refresh-16" iconSize={16} />}
|
||||
/>
|
||||
|
||||
@@ -53,7 +53,7 @@ function SalesByItemsActionsBar({
|
||||
<NavbarGroup>
|
||||
<Button
|
||||
className={classNames(Classes.MINIMAL, 'button--gray-highlight')}
|
||||
text={'Re-calc Report'}
|
||||
text={<T id={'recalc_report'} />}
|
||||
onClick={handleRecalculateReport}
|
||||
icon={<Icon icon="refresh-16" iconSize={16} />}
|
||||
/>
|
||||
|
||||
@@ -53,7 +53,7 @@ function TrialBalanceActionsBar({
|
||||
<NavbarGroup>
|
||||
<Button
|
||||
className={classNames(Classes.MINIMAL, 'button--gray-highlight')}
|
||||
text={'Re-calc Report'}
|
||||
text={<T id={'recalc_report'} />}
|
||||
onClick={handleRecalcReport}
|
||||
icon={<Icon icon="refresh-16" iconSize={16} />}
|
||||
/>
|
||||
|
||||
@@ -50,7 +50,7 @@ export default function VendorsBalanceSummaryHeaderGeneral() {
|
||||
<Checkbox
|
||||
inline={true}
|
||||
small={true}
|
||||
label={'Percentage Of Column'}
|
||||
label={<T id={'percentage_of_column'} />}
|
||||
name={'percentage'}
|
||||
{...field}
|
||||
/>
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Radio,
|
||||
Position,
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T, FormattedHTMLMessage } from 'react-intl';
|
||||
import { ErrorMessage, FastField } from 'formik';
|
||||
import {
|
||||
CategoriesSelectList,
|
||||
@@ -41,18 +41,15 @@ export default function ItemFormPrimarySection() {
|
||||
const itemTypeHintContent = (
|
||||
<>
|
||||
<div class="mb1">
|
||||
<strong>{'Service: '}</strong>
|
||||
{'Services that you provide to customers. '}
|
||||
<FormattedHTMLMessage id={'services_that_you_provide_to_customers'} />
|
||||
</div>
|
||||
<div class="mb1">
|
||||
<strong>{'Inventory: '}</strong>
|
||||
{'Products you buy and/or sell and that you track quantities of.'}
|
||||
<FormattedHTMLMessage id={'products_you_buy_and_or_sell'} />
|
||||
</div>
|
||||
<div class="mb1">
|
||||
<strong>{'Non-Inventory: '}</strong>
|
||||
{
|
||||
'Products you buy and/or sell but don’t need to (or can’t) track quantities of, for example, nuts and bolts used in an installation.'
|
||||
}
|
||||
<FormattedHTMLMessage
|
||||
id={'products_you_buy_and_or_sell_but_don_t_need'}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
|
||||
import { DataTable } from 'components';
|
||||
|
||||
@@ -36,13 +37,8 @@ function ItemsDataTable({
|
||||
tableProps,
|
||||
}) {
|
||||
// Items list context.
|
||||
const {
|
||||
items,
|
||||
pagination,
|
||||
isItemsLoading,
|
||||
isEmptyStatus,
|
||||
isItemsFetching,
|
||||
} = useItemsListContext();
|
||||
const { items, pagination, isItemsLoading, isEmptyStatus, isItemsFetching } =
|
||||
useItemsListContext();
|
||||
|
||||
// Datatable columns.
|
||||
const columns = useItemsTableColumns();
|
||||
@@ -134,7 +130,7 @@ function ItemsDataTable({
|
||||
onMakeAdjustment: handleMakeAdjustment,
|
||||
onDuplicate: handleDuplicate,
|
||||
}}
|
||||
noResults={'There is no items in the table yet.'}
|
||||
noResults={<T id={'there_is_no_items_in_the_table_yet'} />}
|
||||
{...tableProps}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -102,7 +102,7 @@ export default function AccountantForm() {
|
||||
setFieldValue('accounting_basis', _value);
|
||||
})}
|
||||
>
|
||||
<Radio label={formatMessage({ id: 'Cash' })} value="cash" />
|
||||
<Radio label={formatMessage({ id: 'cash' })} value="cash" />
|
||||
<Radio label={formatMessage({ id: 'accrual' })} value="accrual" />
|
||||
</RadioGroup>
|
||||
</FormGroup>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import WorkflowIcon from './WorkflowIcon';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import withOrganizationActions from 'containers/Organization/withOrganizationActions';
|
||||
|
||||
import 'style/pages/Setup/Congrats.scss';
|
||||
@@ -11,18 +12,13 @@ import { compose } from 'utils';
|
||||
/**
|
||||
* Setup congrats page.
|
||||
*/
|
||||
function SetupCongratsPage({
|
||||
setOrganizationSetupCompleted,
|
||||
}) {
|
||||
function SetupCongratsPage({ setOrganizationSetupCompleted }) {
|
||||
const history = useHistory();
|
||||
|
||||
const handleBtnClick = useCallback(() => {
|
||||
setOrganizationSetupCompleted(false);
|
||||
history.push('/homepage');
|
||||
}, [
|
||||
setOrganizationSetupCompleted,
|
||||
history,
|
||||
]);
|
||||
}, [setOrganizationSetupCompleted, history]);
|
||||
|
||||
return (
|
||||
<div class="setup-congrats">
|
||||
@@ -31,24 +27,20 @@ function SetupCongratsPage({
|
||||
</div>
|
||||
|
||||
<div class="setup-congrats__text">
|
||||
<h1>Congrats! You are ready to go</h1>
|
||||
<h1>
|
||||
<T id={'congrats_you_are_ready_to_go'} />
|
||||
</h1>
|
||||
|
||||
<p class="paragraph">
|
||||
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.
|
||||
<T id={'it_is_a_long_established_fact_that_a_reader'} />
|
||||
</p>
|
||||
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
type="submit"
|
||||
onClick={handleBtnClick}
|
||||
>
|
||||
Go to dashboard
|
||||
<Button intent={Intent.PRIMARY} type="submit" onClick={handleBtnClick}>
|
||||
<T id={'go_to_dashboard'} />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(
|
||||
withOrganizationActions,
|
||||
)(SetupCongratsPage);
|
||||
export default compose(withOrganizationActions)(SetupCongratsPage);
|
||||
|
||||
Reference in New Issue
Block a user