Integrate next-intl for internationalization support across the application. Updated configuration to include next-intl plugin and modified components to utilize translation hooks for dynamic text rendering. Enhanced user experience by localizing navigation labels and form messages in various views, including login and dashboard components.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
// React Imports
|
||||
import { useState } from 'react'
|
||||
import { useTranslations } from 'next-intl'
|
||||
|
||||
// MUI Imports
|
||||
import Grid from '@mui/material/Grid2'
|
||||
@@ -25,6 +26,7 @@ import FormSensorHub from '@views/sensorHub/FormSensorHub'
|
||||
const transitionTimeout = { enter: 300, exit: 200 }
|
||||
|
||||
const SensorHubTabContent = () => {
|
||||
const t = useTranslations('sensorHub')
|
||||
const [showAddForm, setShowAddForm] = useState(false)
|
||||
const { setSensorHub } = useSensorHub()
|
||||
|
||||
@@ -49,10 +51,10 @@ const SensorHubTabContent = () => {
|
||||
<div className='grid grid-cols-1 sm:grid-cols-[1fr_auto] items-center gap-4'>
|
||||
<div className='flex flex-col gap-0.5'>
|
||||
<Typography variant='h6' fontWeight={600}>
|
||||
انتخاب سنسور
|
||||
{t('selectSensor')}
|
||||
</Typography>
|
||||
<Typography variant='body2' color='text.secondary' sx={{ lineHeight: 1.5 }}>
|
||||
سنسور مورد نظر را انتخاب کنید یا سنسور جدید اضافه کنید
|
||||
{t('selectSensorDescription')}
|
||||
</Typography>
|
||||
</div>
|
||||
<Button
|
||||
@@ -61,7 +63,7 @@ const SensorHubTabContent = () => {
|
||||
startIcon={<i className='tabler-plus text-xl' />}
|
||||
onClick={() => setShowAddForm(true)}
|
||||
>
|
||||
اضافه کردن سنسور
|
||||
{t('addSensor')}
|
||||
</Button>
|
||||
</div>
|
||||
<OptionSensorHub onConfirm={handleConfirm} />
|
||||
|
||||
Reference in New Issue
Block a user