Skip to content

Commit

Permalink
add new translate files
Browse files Browse the repository at this point in the history
  • Loading branch information
Janderson Souza Matias authored and Janderson Souza Matias committed Dec 22, 2023
1 parent d86028b commit a358faa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/i18n/langs/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const enTranslation = {
},

dashboard: {
goal: 'Goal: {{value}}',
of_teacher: 'Of teacher',
filters: {
region: 'Select region',
district: 'Select district',
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/langs/np.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ const npTranslation = {
schools: 'विद्यालयहरू',
},
dashboard: {
goal: 'लक्ष्य: {{value}}',
of_teacher: 'शिक्षकको',
filters: {
region: 'क्षेत्र चयन गर्नुहोस्',
district: 'जिल्ला चयन गर्नुहोस्',
Expand Down
4 changes: 3 additions & 1 deletion src/pages/Dashboard/components/SpeedometerGraph/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Center, Text, VStack } from '@chakra-ui/react';
import { ChartData } from 'chart.js';
import { Doughnut } from 'react-chartjs-2';
import { useTranslation } from 'react-i18next';

type Props = {
label: string;
Expand All @@ -9,6 +10,7 @@ type Props = {
};

export const SpeedometerGraph: React.FC<Props> = ({ maxValue, value, label }) => {
const { t } = useTranslation();
const coachingSessionPerTeacher: ChartData<'doughnut', number[], string> = {
datasets: [
{
Expand All @@ -35,7 +37,7 @@ export const SpeedometerGraph: React.FC<Props> = ({ maxValue, value, label }) =>
{value}
</Text>
<Text fontSize={16} color="#576375">
Goal: {maxValue}
{t('dashboard.goal', { value: maxValue })}
</Text>
</VStack>
</Center>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const DashboardPage: React.FC = () => {
: 0
).toFixed(0) + '%'
}
subTitle="Of teachers"
subTitle={t('dashboard.of_teacher') || ''}
/>
</HStack>
</VStack>
Expand Down

0 comments on commit a358faa

Please sign in to comment.