mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
WIP: Arabic localization.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { useState, useCallback, useEffect, useMemo } from 'react';
|
||||
import { MenuItem } from '@blueprintjs/core';
|
||||
import { Suggest } from '@blueprintjs/select';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import classNames from 'classnames';
|
||||
import { CLASSES } from 'common/classes';
|
||||
@@ -15,7 +16,7 @@ export default function AccountsSuggestField({
|
||||
accounts,
|
||||
initialAccountId,
|
||||
selectedAccountId,
|
||||
defaultSelectText = 'Select account',
|
||||
defaultSelectText = intl.formatMessage({ id: 'select_account' }),
|
||||
popoverFill = false,
|
||||
onAccountSelected,
|
||||
|
||||
@@ -32,7 +33,7 @@ export default function AccountsSuggestField({
|
||||
filterByRootTypes,
|
||||
filterByParentTypes,
|
||||
filterByTypes,
|
||||
filterByNormal,
|
||||
filterByNormal,
|
||||
});
|
||||
return filteredAccounts;
|
||||
}, [
|
||||
|
||||
@@ -5,6 +5,8 @@ import { QueryClientProvider, QueryClient } from 'react-query';
|
||||
import { ReactQueryDevtools } from 'react-query/devtools';
|
||||
|
||||
import 'style/App.scss';
|
||||
import 'moment/locale/ar-ly';
|
||||
import 'moment/locale/es-us'
|
||||
|
||||
import AppIntlLoader from './AppIntlLoader';
|
||||
import PrivateRoute from 'components/Guards/PrivateRoute';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import moment from 'moment';
|
||||
import intl from 'react-intl-universal';
|
||||
import { find } from 'lodash';
|
||||
import rtlDetect from 'rtl-detect';
|
||||
@@ -68,6 +69,7 @@ export default function AppIntlLoader({
|
||||
},
|
||||
});
|
||||
}).then(() => {
|
||||
moment.locale('ar-ly');
|
||||
setIsLoading(false);
|
||||
});
|
||||
}, [currentLocale, setIsLoading]);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React, { useRef, useCallback, useMemo } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { useCellAutoFocus } from 'hooks';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import AccountsSuggestField from 'components/AccountsSuggestField';
|
||||
|
||||
@@ -61,6 +62,7 @@ export default function AccountCellRenderer({
|
||||
filterByTypes={filterAccountsByTypes}
|
||||
inputProps={{
|
||||
inputRef: (ref) => (accountRef.current = ref),
|
||||
placeholder: intl.get('search'),
|
||||
}}
|
||||
openOnKeyDown={true}
|
||||
blurOnSelectClose={false}
|
||||
|
||||
@@ -4,7 +4,13 @@ import intl from 'react-intl-universal';
|
||||
import { ListSelect } from 'components';
|
||||
|
||||
export default function SalutationList({ ...restProps }) {
|
||||
const saluations = ['Mr.', 'Mrs.', 'Ms.', 'Miss', 'Dr.'];
|
||||
const saluations = [
|
||||
intl.get('mr'),
|
||||
intl.get('mrs'),
|
||||
intl.get('ms'),
|
||||
intl.get('miss'),
|
||||
intl.get('dr'),
|
||||
];
|
||||
const items = saluations.map((saluation) => ({
|
||||
key: saluation,
|
||||
label: saluation,
|
||||
|
||||
Reference in New Issue
Block a user