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:
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Icon, For } from 'components';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
|
||||
import footerLinks from 'config/footerLinks';
|
||||
import { useAuthActions, useAuthOrganizationId } from 'hooks/state';
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
import { DateInput } from '@blueprintjs/datetime';
|
||||
import classNames from 'classnames';
|
||||
import { TimezonePicker } from '@blueprintjs/timezone';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
|
||||
import { FieldRequiredHint, Col, Row, ListSelect } from 'components';
|
||||
import {
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
handleDateChange
|
||||
} from 'utils';
|
||||
|
||||
import fiscalYearOptions from 'common/fiscalYearOptions';
|
||||
import { getFiscalYearOptions } from 'common/fiscalYearOptions';
|
||||
import languages from 'common/languagesOptions';
|
||||
import currencies from 'common/currencies';
|
||||
|
||||
@@ -31,6 +31,8 @@ import currencies from 'common/currencies';
|
||||
* Setup organization form.
|
||||
*/
|
||||
export default function SetupOrganizationForm({ isSubmitting, values }) {
|
||||
const fiscalYearOptions = getFiscalYearOptions();
|
||||
|
||||
return (
|
||||
<Form>
|
||||
<h3>
|
||||
|
||||
@@ -2,7 +2,8 @@ import React from 'react';
|
||||
import * as Yup from 'yup';
|
||||
import { Formik } from 'formik';
|
||||
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 'style/pages/Setup/Organization.scss';
|
||||
|
||||
@@ -24,29 +25,29 @@ function SetupOrganizationPage({
|
||||
wizard,
|
||||
setOrganizationSetupCompleted,
|
||||
}) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
const { mutateAsync: organizationSetupMutate } = useOrganizationSetup();
|
||||
|
||||
// Validation schema.
|
||||
const validationSchema = Yup.object().shape({
|
||||
organization_name: Yup.string()
|
||||
.required()
|
||||
.label(formatMessage({ id: 'organization_name_' })),
|
||||
.label(intl.get('organization_name_')),
|
||||
financialDateStart: Yup.date()
|
||||
.required()
|
||||
.label(formatMessage({ id: 'date_start_' })),
|
||||
.label(intl.get('date_start_')),
|
||||
baseCurrency: Yup.string()
|
||||
.required()
|
||||
.label(formatMessage({ id: 'base_currency_' })),
|
||||
.label(intl.get('base_currency_')),
|
||||
language: Yup.string()
|
||||
.required()
|
||||
.label(formatMessage({ id: 'language' })),
|
||||
.label(intl.get('language')),
|
||||
fiscalYear: Yup.string()
|
||||
.required()
|
||||
.label(formatMessage({ id: 'fiscal_year_' })),
|
||||
.label(intl.get('fiscal_year_')),
|
||||
timeZone: Yup.string()
|
||||
.required()
|
||||
.label(formatMessage({ id: 'time_zone_' })),
|
||||
.label(intl.get('time_zone_')),
|
||||
});
|
||||
|
||||
// Initial values.
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Formik } from 'formik';
|
||||
import 'style/pages/Setup/Subscription.scss';
|
||||
|
||||
import SetupSubscriptionForm from './SetupSubscriptionForm';
|
||||
import { SubscriptionFormSchema } from './SubscriptionForm.schema';
|
||||
import { getSubscriptionFormSchema } from './SubscriptionForm.schema';
|
||||
|
||||
/**
|
||||
* Subscription step of wizard setup.
|
||||
@@ -20,6 +20,8 @@ export default function SetupSubscription() {
|
||||
// Handle form submit.
|
||||
const handleSubmit = () => {};
|
||||
|
||||
const SubscriptionFormSchema = getSubscriptionFormSchema();
|
||||
|
||||
return (
|
||||
<div className={'setup-subscription-form'}>
|
||||
<Formik
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as Yup from 'yup';
|
||||
import { formatMessage } from 'services/intl';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const SubscriptionFormSchema = Yup.object().shape({
|
||||
export const getSubscriptionFormSchema = () => Yup.object().shape({
|
||||
plan_slug: Yup.string()
|
||||
.required()
|
||||
.label(formatMessage({ id: 'plan_slug' })),
|
||||
.label(intl.get('plan_slug')),
|
||||
period: Yup.string().required(),
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { registerWizardSteps } from 'common/registerWizard';
|
||||
|
||||
function WizardSetupStep({ label, isActive = false }) {
|
||||
|
||||
Reference in New Issue
Block a user