feat: lang.

This commit is contained in:
elforjani3
2021-06-09 14:31:33 +02:00
parent 9c02ec9c68
commit efdae463a1
20 changed files with 95 additions and 64 deletions

View File

@@ -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 dont need to (or cant) 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>
</>
);

View File

@@ -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}
/>
);