mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
Merge branch 'feature/i18n-arabic' of https://github.com/abouolia/Ratteb into feature/i18n-arabic
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
import React from 'react';
|
||||
import Icon from 'components/Icon';
|
||||
import moment from 'moment';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export default function AuthCopyright() {
|
||||
return (
|
||||
<div class="auth-copyright">
|
||||
<div class="auth-copyright__text">
|
||||
© 2001–2020 All Rights Reserved.
|
||||
{intl.get('all_rights_reserved', {
|
||||
pre: moment().subtract(1, 'years').year(),
|
||||
current: moment().get('year'),
|
||||
})}
|
||||
</div>
|
||||
|
||||
<Icon width={122} height={22} icon={'bigcapital'} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,15 +13,10 @@ import InviteAcceptFormContent from './InviteAcceptFormContent';
|
||||
|
||||
export default function InviteAcceptForm() {
|
||||
const history = useHistory();
|
||||
|
||||
|
||||
// Invite accept context.
|
||||
const {
|
||||
inviteAcceptMutate,
|
||||
inviteMeta,
|
||||
token,
|
||||
} = useInviteAcceptContext();
|
||||
|
||||
const { inviteAcceptMutate, inviteMeta, token } = useInviteAcceptContext();
|
||||
|
||||
// Invite value.
|
||||
const inviteValue = {
|
||||
organization_name: '',
|
||||
@@ -39,8 +34,13 @@ export default function InviteAcceptForm() {
|
||||
inviteAcceptMutate([values, token])
|
||||
.then((response) => {
|
||||
AppToaster.show({
|
||||
message: `Congrats! Your account has been created and invited to
|
||||
<strong>${inviteValue.organization_name}</strong> organization successfully.`,
|
||||
message: intl.getHTML(
|
||||
'congrats_your_account_has_been_created_and_invited',
|
||||
{
|
||||
organization_name: inviteValue.organization_name,
|
||||
},
|
||||
),
|
||||
|
||||
intent: Intent.SUCCESS,
|
||||
});
|
||||
history.push('/auth/login');
|
||||
@@ -67,7 +67,7 @@ export default function InviteAcceptForm() {
|
||||
}
|
||||
if (errors.find((e) => e.type === 'INVITE.TOKEN.NOT.FOUND')) {
|
||||
AppToaster.show({
|
||||
message: 'An unexpected error occurred',
|
||||
message: intl.get('an_unexpected_error_occurred'),
|
||||
intent: Intent.DANGER,
|
||||
position: Position.BOTTOM,
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ export default function InviteUserFormContent() {
|
||||
<FastField name={'first_name'}>
|
||||
{({ form, field, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={<T id={'First Name'} />}
|
||||
label={<T id={'first_name'} />}
|
||||
className={'form-group--first_name'}
|
||||
intent={inputIntent({ error, touched })}
|
||||
helperText={<ErrorMessage name={'first_name'} />}
|
||||
@@ -54,7 +54,7 @@ export default function InviteUserFormContent() {
|
||||
<FastField name={'last_name'}>
|
||||
{({ form, field, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={<T id={'Last Name'} />}
|
||||
label={<T id={'last_name'} />}
|
||||
className={'form-group--last_name'}
|
||||
intent={inputIntent({ error, touched })}
|
||||
helperText={<ErrorMessage name={'last_name'} />}
|
||||
@@ -72,7 +72,7 @@ export default function InviteUserFormContent() {
|
||||
<FastField name={'phone_number'}>
|
||||
{({ form, field, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={<T id={'Phone Number'} />}
|
||||
label={<T id={'phone_number'} />}
|
||||
className={'form-group--phone_number'}
|
||||
intent={inputIntent({ error, touched })}
|
||||
helperText={<ErrorMessage name={'phone_number'} />}
|
||||
@@ -105,7 +105,7 @@ export default function InviteUserFormContent() {
|
||||
|
||||
<div className={'invite-form__statement-section'}>
|
||||
<p>
|
||||
<T id={'You email address is'} /> <b>{inviteMeta.email},</b> <br />
|
||||
<T id={'you_email_address_is'} /> <b>{inviteMeta.email},</b> <br />
|
||||
<T id={'you_will_use_this_address_to_sign_in_to_bigcapital'} />
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import React from 'react';
|
||||
import {
|
||||
Button,
|
||||
InputGroup,
|
||||
Intent,
|
||||
FormGroup,
|
||||
} from '@blueprintjs/core';
|
||||
import { Button, InputGroup, Intent, FormGroup } from '@blueprintjs/core';
|
||||
import { Form, ErrorMessage, FastField } from 'formik';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { inputIntent } from 'utils';
|
||||
@@ -12,15 +7,13 @@ import { inputIntent } from 'utils';
|
||||
/**
|
||||
* Send reset password form.
|
||||
*/
|
||||
export default function SendResetPasswordForm({
|
||||
isSubmitting
|
||||
}) {
|
||||
export default function SendResetPasswordForm({ isSubmitting }) {
|
||||
return (
|
||||
<Form className={'send-reset-password'}>
|
||||
<FastField name={'crediential'}>
|
||||
{({ form, field, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={'Email or Phone Number'}
|
||||
label={<T id={'email_or_phone_number'} />}
|
||||
intent={inputIntent({ error, touched })}
|
||||
helperText={<ErrorMessage name={'crediential'} />}
|
||||
className={'form-group--crediential'}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { transformToForm } from 'utils';
|
||||
import {
|
||||
CreateItemCategoryFormSchema,
|
||||
EditItemCategoryFormSchema,
|
||||
} from './ItemCategoryForm.schema';
|
||||
} from './itemCategoryForm.schema';
|
||||
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import ItemCategoryFormContent from './ItemCategoryFormContent'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import intl, { init } from 'react-intl-universal';
|
||||
|
||||
import FinancialSheet from 'components/FinancialSheet';
|
||||
import { DataTable } from 'components';
|
||||
@@ -14,8 +14,6 @@ export default function InventoryValuationTable({
|
||||
//#ownProps
|
||||
companyName,
|
||||
}) {
|
||||
|
||||
|
||||
// inventory valuation context.
|
||||
const {
|
||||
inventoryValuation: { tableRows },
|
||||
@@ -56,7 +54,9 @@ export default function InventoryValuationTable({
|
||||
expandColumnSpace={1}
|
||||
sticky={true}
|
||||
rowClassNames={rowClassNames}
|
||||
noResults={'There were no inventory transactions during the selected date range.'}
|
||||
noResults={intl.get(
|
||||
'there_were_no_inventory_transactions_during_the_selected_date_range',
|
||||
)}
|
||||
/>
|
||||
</FinancialSheet>
|
||||
);
|
||||
|
||||
@@ -12,8 +12,6 @@ import { usePurchasesByItemsTableColumns } from './components';
|
||||
* purchases by items data table.
|
||||
*/
|
||||
export default function PurchasesByItemsTable({ companyName }) {
|
||||
|
||||
|
||||
// Purchases by items context.
|
||||
const {
|
||||
purchaseByItems: { tableRows, query },
|
||||
@@ -55,7 +53,9 @@ export default function PurchasesByItemsTable({ companyName }) {
|
||||
expandColumnSpace={1}
|
||||
sticky={true}
|
||||
rowClassNames={rowClassNames}
|
||||
noResults={'There were no purchases during the selected date range.'}
|
||||
noResults={intl.get(
|
||||
'there_were_no_purchases_during_the_selected_date_range',
|
||||
)}
|
||||
/>
|
||||
</FinancialSheet>
|
||||
);
|
||||
|
||||
@@ -10,8 +10,6 @@ import { useSalesByItemsTableColumns } from './components';
|
||||
* Sales by items data table.
|
||||
*/
|
||||
export default function SalesByItemsTable({ companyName }) {
|
||||
|
||||
|
||||
// Sales by items context.
|
||||
const {
|
||||
salesByItems: { tableRows, query },
|
||||
@@ -53,7 +51,9 @@ export default function SalesByItemsTable({ companyName }) {
|
||||
expandColumnSpace={1}
|
||||
sticky={true}
|
||||
rowClassNames={rowClassNames}
|
||||
noResults={'There were no sales during the selected date range.'}
|
||||
noResults={intl.get(
|
||||
'there_were_no_sales_during_the_selected_date_range',
|
||||
)}
|
||||
/>
|
||||
</FinancialSheet>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Omnibar } from '@blueprintjs/select';
|
||||
import { MenuItem } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { compose } from 'utils';
|
||||
import withSearch from 'containers/GeneralSearch/withSearch';
|
||||
|
||||
@@ -30,7 +31,7 @@ function Search({
|
||||
<Omnibar
|
||||
className={'navbar-omnibar'}
|
||||
isOpen={globalSearchShow}
|
||||
noResults={<MenuItem disabled={true} text="No results." />}
|
||||
noResults={<MenuItem disabled={true} text={<T id={'no_results'} />} />}
|
||||
onClose={() => closeGlobalSearch(false)}
|
||||
resetOnSelect={true}
|
||||
itemRenderer={renderSearch}
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useCallback } from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import WorkflowIcon from './WorkflowIcon';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import withOrganizationActions from 'containers/Organization/withOrganizationActions';
|
||||
|
||||
import 'style/pages/Setup/Congrats.scss';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { ProgressBar, Intent } from '@blueprintjs/core';
|
||||
import { useBuildTenant } from 'hooks/query';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
|
||||
import 'style/pages/Setup/Initializing.scss';
|
||||
|
||||
@@ -25,22 +26,34 @@ export default function SetupInitializingForm() {
|
||||
<div className={'setup-initializing-form__title'}>
|
||||
{isLoading ? (
|
||||
<>
|
||||
<h1>It's time to make your accounting really simple!</h1>
|
||||
<h1>
|
||||
<T id={'it_s_time_to_make_your_accounting_really_simple'} />
|
||||
</h1>
|
||||
<p className={'paragraph'}>
|
||||
while we set up your account, please remember to verify your
|
||||
account by clicking on the link we sent to yout registered email
|
||||
address
|
||||
<T
|
||||
id={
|
||||
'while_we_set_up_your_account_please_remember_to_verify_your_account'
|
||||
}
|
||||
/>
|
||||
</p>
|
||||
</>
|
||||
) : isError ? (
|
||||
<>
|
||||
<h1>Something went wrong!</h1>
|
||||
<p class="paragraph">Please refresh the page</p>
|
||||
<h1>
|
||||
<T id={'something_went_wrong'} />
|
||||
</h1>
|
||||
<p class="paragraph">
|
||||
<T id={'please_refresh_the_page'} />
|
||||
</p>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<h1>Waiting to redirect</h1>
|
||||
<p class="paragraph">Refresh the page if redirect not worked.</p>
|
||||
<h1>
|
||||
<T id={'waiting_to_redirect'} />
|
||||
</h1>
|
||||
<p class="paragraph">
|
||||
<T id={'refresh_the_page_if_redirect_not_worked'} />
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -98,7 +98,7 @@ export default function SetupOrganizationForm({ isSubmitting, values }) {
|
||||
>
|
||||
<ListSelect
|
||||
items={currencies}
|
||||
noResults={<MenuItem disabled={true} text="No results." />}
|
||||
noResults={<MenuItem disabled={true} text={<T id={'no_results'} />} />}
|
||||
popoverProps={{ minimal: true }}
|
||||
onItemSelect={(item) => {
|
||||
setFieldValue('baseCurrency', item.code);
|
||||
@@ -133,7 +133,7 @@ export default function SetupOrganizationForm({ isSubmitting, values }) {
|
||||
>
|
||||
<ListSelect
|
||||
items={languages}
|
||||
noResults={<MenuItem disabled={true} text="No results." />}
|
||||
noResults={<MenuItem disabled={true} text={<T id={'no_results'} />} />}
|
||||
onItemSelect={(item) => {
|
||||
setFieldValue('language', item.value);
|
||||
}}
|
||||
@@ -165,7 +165,7 @@ export default function SetupOrganizationForm({ isSubmitting, values }) {
|
||||
>
|
||||
<ListSelect
|
||||
items={fiscalYearOptions}
|
||||
noResults={<MenuItem disabled={true} text="No results." />}
|
||||
noResults={<MenuItem disabled={true} text={<T id={'no_results'} />} />}
|
||||
selectedItem={value}
|
||||
selectedItemProp={'value'}
|
||||
textProp={'name'}
|
||||
|
||||
Reference in New Issue
Block a user