From 748d27d7c208b8854974a8e798b4bf1c8edfe0c0 Mon Sep 17 00:00:00 2001 From: rhahao Date: Sun, 16 Jan 2022 12:19:42 +0300 Subject: [PATCH] feat(help): add localize to the help form --- .../helpContent/HelpBrowserSupport.js | 59 +++--- src/components/helpContent/HelpInstallPwa.js | 31 +-- src/components/helpContent/HelpLiveClass.js | 27 ++- src/components/helpContent/HelpNoInternet.js | 27 ++- .../helpContent/HelpUpdateSource.js | 25 ++- src/locales/e.json | 22 ++ src/locales/mg.json | 22 ++ src/pages/Help.js | 197 ++++++++---------- 8 files changed, 227 insertions(+), 183 deletions(-) diff --git a/src/components/helpContent/HelpBrowserSupport.js b/src/components/helpContent/HelpBrowserSupport.js index 2fe10130..61317d1c 100644 --- a/src/components/helpContent/HelpBrowserSupport.js +++ b/src/components/helpContent/HelpBrowserSupport.js @@ -1,37 +1,40 @@ +import { useTranslation } from 'react-i18next'; import { styled } from '@mui/styles'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import ListItemText from '@mui/material/ListItemText'; -import Typography from "@mui/material/Typography"; +import Typography from '@mui/material/Typography'; const ListItemCustom = styled(ListItem)(() => ({ - paddingTop: '0px', - paddingBottom: '0px', + paddingTop: '0px', + paddingBottom: '0px', })); const HelpBrowserSupport = () => { - return ( -
- Afaka manokatra ny LMM-OA ny ankamaroan’ireo programa fijerena internet nivoaka farany, ohatra hoe: - - - - - - - - - - - - - - - - - -
- ); -} - -export default HelpBrowserSupport; \ No newline at end of file + const { t } = useTranslation(); + + return ( +
+ {t('help.aDeviceSupported')} + + + + + + + + + + + + + + + + + +
+ ); +}; + +export default HelpBrowserSupport; diff --git a/src/components/helpContent/HelpInstallPwa.js b/src/components/helpContent/HelpInstallPwa.js index 325218a9..b2600f0d 100644 --- a/src/components/helpContent/HelpInstallPwa.js +++ b/src/components/helpContent/HelpInstallPwa.js @@ -1,16 +1,19 @@ -import Typography from "@mui/material/Typography"; -import installBanner from "../../img/installBanner.png"; +import { useTranslation } from 'react-i18next'; +import Typography from '@mui/material/Typography'; +import installBanner from '../../img/installBanner.png'; const HelpInstallPwa = () => { - return ( -
- Azonao atao install ao amin’ny fitaovana ampiasainao ny LMM-OA, ka tsy voatery manokatra ny programa fijerenao internet ianao avy eo rehefa hampiasa azy ity. - Eo amin’ny farany ambony indrindra, amin’ny sisiny ankavanana no misy ny fanaovana install ny LMM-OA - Install Banner - Araho avy eo ny toromarika miseho manaraka mandra-pahavitan’ny fampidirana ny programa LMM-OA ao amin’ny fitaovana ampiasainao. - Raha tsy miseho io sary io amin’ny fitaovana ampiasainao, dia azonao karohina ao amin’ny internet ny fanaovana install ny programa PWA amin’ny fitaovana sy programa fijerena internet ampiasainao -
- ); -} - -export default HelpInstallPwa; \ No newline at end of file + const { t } = useTranslation(); + + return ( +
+ {t('help.aAlwaysBrowser1')} + {t('help.aAlwaysBrowser2')} + Install Banner + {t('help.aAlwaysBrowser3')} + {t('help.aAlwaysBrowser4')} +
+ ); +}; + +export default HelpInstallPwa; diff --git a/src/components/helpContent/HelpLiveClass.js b/src/components/helpContent/HelpLiveClass.js index 8cc95587..d3940750 100644 --- a/src/components/helpContent/HelpLiveClass.js +++ b/src/components/helpContent/HelpLiveClass.js @@ -1,12 +1,19 @@ -import Typography from "@mui/material/Typography"; +import { useTranslation } from 'react-i18next'; +import parse from 'html-react-parser'; +import Typography from '@mui/material/Typography'; const HelpLiveClass = () => { - return ( -
- Mandritra ny valan’aretina COVID-19, dia mety misy mpianatra sasany tsy afaka manatrika ny fivoriana alamina amin’ny Zoom, na KHConf, na programa fanaovana fivoriana miaraka hafa. - Misy safidy hoe Mpianatra afaka mandray anjara mivantana ihany ao amin’ny Fanamboarana. Raha asiana marika io, dia ireo mpianatra afaka manao anjara amin’ny fivoriana miaraka ihany no miseho rehefa hanao fanendrena ianao. Ao amin’ny mombamomba ny mpianatra dia misy safidy hoe Afaka manao anjara mivantana. Raha asiana marika io ho an’ny mpianatra iray, dia amin’izay ihany izy vao afaka tendrena hanao anjara. -
- ); -} - -export default HelpLiveClass; \ No newline at end of file + const { t } = useTranslation(); + return ( +
+ + {t('help.aCovidSchedule1')} + + + {parse(t('help.aCovidSchedule2'))} + +
+ ); +}; + +export default HelpLiveClass; diff --git a/src/components/helpContent/HelpNoInternet.js b/src/components/helpContent/HelpNoInternet.js index f8d4c058..33e0abf9 100644 --- a/src/components/helpContent/HelpNoInternet.js +++ b/src/components/helpContent/HelpNoInternet.js @@ -1,13 +1,18 @@ -import Typography from "@mui/material/Typography"; -import appNoInternet from "../../img/appNoInternet.png"; +import { useTranslation } from 'react-i18next'; +import Typography from '@mui/material/Typography'; +import appNoInternet from '../../img/appNoInternet.png'; const HelpNoInternet = () => { - return ( -
- Tsy mila fahana internet ianao rehefa mampiasa ny LMM-OA. Rehefa manokatra azy voalohany ihany ianao no mila manana fahana. Maka ny rakitra rehetra ilaina mba hampandeha ny LMM-OA rehefa tsy misy internet ny fitaovana ampiasainao aloha. Hisy filazana hiseho eo amin’ny efijery rehefa vita izany. - No internet banner -
- ); -} - -export default HelpNoInternet; \ No newline at end of file + const { t } = useTranslation(); + + return ( +
+ + {t('help.aAlwaysInternet')} + + No internet banner +
+ ); +}; + +export default HelpNoInternet; diff --git a/src/components/helpContent/HelpUpdateSource.js b/src/components/helpContent/HelpUpdateSource.js index a8f9815f..357bff3f 100644 --- a/src/components/helpContent/HelpUpdateSource.js +++ b/src/components/helpContent/HelpUpdateSource.js @@ -1,12 +1,17 @@ -import Typography from "@mui/material/Typography"; +import { useTranslation } from 'react-i18next'; +import parse from 'html-react-parser'; +import Typography from '@mui/material/Typography'; const HelpUpdateSource = () => { - return ( -
- Ho fanajana ny fifanekena amin’ny fampiasana ny JW.ORG, dia tsy manavao ny loharanon-kevitra amin’ny alalan’ny internet ny LMM-OA. - Afaka mampiditra herinandro vaovao ianao, eo amin’ilay hoe Herinandro vaovao. Azo ampidirina amin’ny alalan’ny EPUB nalaina mialoha avy tao amin’ny JW.ORG koa anefa izy io. Tsindrio ilay hoe Haka EPUB, ary safidio ilay rakitra EPUB ao amin’ny fitaovana ampiasainao. -
- ); -} - -export default HelpUpdateSource; \ No newline at end of file + const { t } = useTranslation(); + + return ( +
+ + {parse(t('help.aAddSourceMaterial'))} + +
+ ); +}; + +export default HelpUpdateSource; diff --git a/src/locales/e.json b/src/locales/e.json index 7e3936c7..37c4487e 100644 --- a/src/locales/e.json +++ b/src/locales/e.json @@ -204,5 +204,27 @@ "scheduleTemplate.studentsAssignment": "Students Assigments", "scheduleTemplate.studentAssistant": "Student/Assistant:", + "help.headDesc": "LMM-OA is an application to assist the Life and Ministry Meeting Overseer, to schedule the students assignment for the midweek meeting. Please find below some of the frequently asked questions about this application.", + "help.aboutApps": "ABOUT THIS APPLICATION", + "help.student": "STUDENTS", + "help.scheduling": "SCHEDULING", + "help.sourceMaterial": "SOURCE MATERIAL", + "help.qDeviceSupported": "What browsers support LMM-OA web application?", + "help.aDeviceSupported": "You may open and use LMM-OA with a modern and up to date browsers, such as:", + "help.qAlwaysBrowser": "Do I always need to use a browser to open LMM-OA?", + "help.aAlwaysBrowser1": "You may install LMM-OA to your device, so that you are no longer required to open the browser to use the application.", + "help.aAlwaysBrowser2": "The install button is on the top right of the screen", + "help.aAlwaysBrowser3": "Then follow the on-screen prompt to complete your installation", + "help.aAlwaysBrowser4": "If you do not find that icon in your browser, search on the internet on how to install a PWA apps into your specific device", + "help.qAlwaysInternet": "Do I always need to be connected to use LMM-OA?", + "help.aAlwaysInternet": "You do not need to have an internet connection to use LMM-OA. Internet is required only during its first load. LMM-OA downloads all the needed files to run the application when you are offline. A notification will appear on the screen when this first load is completed.", + "help.qStudentViewSchedule": "How students can view their assignments parts that are published online?", + "help.qCovidSchedule": "How to schedule the student parts during this COVID-19 pandemic?", + "help.aCovidSchedule1": "During this COVID-19 pandemic, it could be that there are some students which are temporarily available for assignments in live meeting using Zoom or KHConf or another applications.", + "help.aCovidSchedule2": "In the Settings page, there is an option called Students for live meeting only. If this setting is enabled, only students that meet this requirement only will be available for assignment. In the Student Details form, there is an option called Available for live meeting. If this option is enabled, only then the student will be available for assignment.", + "help.qAddSourceMaterial": "How to add source materials?", + "help.aAddSourceMaterial": "Click the Add new week, to add new week into the source material. But you may add weeks too using an EPUB file downloaded from JW.ORG. Click the Import EPUB, and browse to the location where you have downloaded the EPUB file.", + + "about.description": "LMM-OA (Life and Ministry Meeting Overseer Assistant) is an application to coordinate and manage students assignment schedule for Midweek Meeting." } \ No newline at end of file diff --git a/src/locales/mg.json b/src/locales/mg.json index e22bc757..5108949e 100644 --- a/src/locales/mg.json +++ b/src/locales/mg.json @@ -204,5 +204,27 @@ "scheduleTemplate.studentsAssignment": "Anjaran’ny Mpianatra", "scheduleTemplate.studentAssistant": "Mpianatra/Mpanampy:", + "help.headDesc": "Programa natao hanampiana ny Mpiandraikitra ny Fivoriana Momba ny Fiainantsika sy ny Fanompoana ny LMM-OA, mba handaminana ny anjaran’ny mpianatra amin’ny fivoriana andavanandro. Hitanao eto ambany ny valin’ny fanontaniana samihafa rehefa mampiasa ity programa ity.", + "help.aboutApps": "MOMBAMOMBA ILAY PROGRAMA", + "help.student": "MPIANATRA", + "help.scheduling": "FANDAMINANA ANJARA", + "help.sourceMaterial": "LOHARANON-KEVITRA", + "help.qDeviceSupported": "Inona avy ny fitaovana fijerena internet azo ampiasana ny LMM-OA?", + "help.aDeviceSupported": "Afaka manokatra ny LMM-OA ny ankamaroan’ireo programa fijerena internet nivoaka farany, ohatra hoe:", + "help.qAlwaysBrowser": "Tsy maintsy manokatra programa fijerena internet ve vao afaka mampiasa ny LMM-OA?", + "help.aAlwaysBrowser1": "Azonao atao ampidirina ao amin’ny fitaovana ampiasainao ny LMM-OA, ka tsy voatery manokatra ny programa fijerenao internet ianao avy eo rehefa hampiasa azy ity.", + "help.aAlwaysBrowser2": "Eo amin’ny farany ambony indrindra, amin’ny sisiny ankavanana no misy ny fampidirana ny LMM-OA", + "help.aAlwaysBrowser3": "Araho avy eo ny toromarika miseho manaraka mandra-pahavitan’ny fampidirana ny programa LMM-OA ao amin’ny fitaovana ampiasainao.", + "help.aAlwaysBrowser4": "Raha tsy miseho io sary io amin’ny fitaovana ampiasainao, dia azonao karohina ao amin’ny internet ny fanaovana install ny programa PWA amin’ny fitaovana sy programa fijerena internet ampiasainao", + "help.qAlwaysInternet": "Tsy maintsy misy fahana internet ve vao afaka mampiasa ny LMM-OA?", + "help.aAlwaysInternet": "Tsy mila fahana internet ianao rehefa mampiasa ny LMM-OA. Rehefa manokatra azy voalohany ihany ianao no mila manana fahana. Maka ny rakitra rehetra ilaina mba hampandeha ny LMM-OA rehefa tsy misy internet ny fitaovana ampiasainao aloha. Hisy filazana hiseho eo amin’ny efijery rehefa vita izany.", + "help.qStudentViewSchedule": "Ahoana no hahafahan’ny mpianatra mijery fandaharana avy amin’ny internet?", + "help.aStudentViewSchedule1": "Ahoana no hahafahan’ny mpianatra mijery fandaharana avy amin’ny internet?", + "help.qCovidSchedule": "Ahoana no fomba handaminana anjara mandritra izao COVID-19 izao?", + "help.aCovidSchedule1": "Mandritra ny valan’aretina COVID-19, dia mety misy mpianatra sasany tsy afaka manatrika ny fivoriana alamina amin’ny Zoom, na KHConf, na programa fanaovana fivoriana miaraka hafa.", + "help.aCovidSchedule2": "Misy safidy hoe Mpianatra afaka mandray anjara mivantana ihany ao amin’ny Fanamboarana. Raha asiana marika io, dia ireo mpianatra afaka manao anjara amin’ny fivoriana miaraka ihany no miseho rehefa hanao fanendrena ianao. Ao amin’ny mombamomba ny mpianatra dia misy safidy hoe Afaka manao anjara mivantana. Raha asiana marika io ho an’ny mpianatra iray, dia amin’izay ihany izy vao afaka tendrena hanao anjara.", + "help.qAddSourceMaterial": "Ahoana ny fomba fampidirina ireo loharanon-kevitra?", + "help.aAddSourceMaterial": "Afaka mampiditra herinandro vaovao ianao, eo amin’ilay hoe Herinandro vaovao. Azo ampidirina amin’ny alalan’ny EPUB nalaina mialoha avy tao amin’ny JW.ORG koa anefa izy io. Tsindrio ilay hoe Haka EPUB, ary safidio ilay rakitra EPUB ao amin’ny fitaovana ampiasainao.", + "about.description": "Programa fandaminana anjaran’ny mpianatra amin’ny fivoriana andavanandro ny LMM-OA (Life and Ministry Meeting Overseer Assistant)." } \ No newline at end of file diff --git a/src/pages/Help.js b/src/pages/Help.js index 539f6598..8ca45131 100644 --- a/src/pages/Help.js +++ b/src/pages/Help.js @@ -1,3 +1,4 @@ +import { useTranslation } from 'react-i18next'; import { styled } from '@mui/styles'; import Accordion from '@mui/material/Accordion'; import AccordionSummary from '@mui/material/AccordionSummary'; @@ -10,124 +11,100 @@ import HelpUpdateSource from '../components/helpContent/HelpUpdateSource'; import HelpLiveClass from '../components/helpContent/HelpLiveClass'; import HelpNoInternet from '../components/helpContent/HelpNoInternet'; import HelpInstallPwa from '../components/helpContent/HelpInstallPwa'; -import HelpStudentsAccessInternet from '../components/helpContent/HelpStudentsAccessInternet'; const sharedStyles = { - heading: { - fontWeight: 'bold', - }, + heading: { + fontWeight: 'bold', + }, }; const AccordingFaqItem = styled(Accordion)(() => ({ - marginBottom: '10px', + marginBottom: '10px', })); const TypographyFaqSubheading = styled(Typography)(() => ({ - marginBottom: '10px', - fontWeight: 'bold', - backgroundColor: '#2C3E50', - color: 'white', - padding: '5px', - borderRadius: '10px', + marginBottom: '10px', + fontWeight: 'bold', + backgroundColor: '#2C3E50', + color: 'white', + padding: '5px', + borderRadius: '10px', })); const Help = () => { - return ( - - - Life and Ministry Meeting - Overseer Assistant (LMM-OA) - - - Programa natao hanampiana ny Mpiandraikitra ny Fivoriana Momba ny Fiainantsika sy ny Fanompoana ny LMM-OA, mba handaminana ny anjaran’ny mpianatra amin’ny fivoriana andavanandro. Hitanao eto ambany ny valin’ny fanontaniana samihafa rehefa mampiasa ity programa ity. - - MOMBAMOMBA ILAY PROGRAMA - - } - > - - Inona avy ny fitaovana fijerena internet azo ampiasana ny LMM-OA? - - - - - - - - } - > - - Tsy maintsy manokatra programa fijerena internet ve vao afaka mampiasa ny LMM-OA? - - - - - - - - } - > - - Tsy maintsy misy fahana internet ve vao afaka mampiasa ny LMM-OA? - - - - - - - MPIANATRA - - } - > - - Ahoana no hahafahan’ny mpianatra mijery fandaharana avy amin’ny internet? - - - - - - - FANDAMINANA ANJARA - - } - > - - Ahoana no fomba handaminana anjara mandritra izao COVID-19 izao? - - - - - - - LOHARANON-KEVITRA - - } - > - - Ahoana ny fomba fampidirina ireo loharanon-kevitra? - - - - - - - - ); -} - -export default Help; \ No newline at end of file + const { t } = useTranslation(); + return ( + + + Life and Ministry Meeting - Overseer Assistant (LMM-OA) + + + {t('help.headDesc')} + + {t('help.aboutApps')} + + }> + + {t('help.qDeviceSupported')} + + + + + + + + }> + + {t('help.qAlwaysBrowser')} + + + + + + + + }> + + {t('help.qAlwaysInternet')} + + + + + + + {t('help.scheduling')} + + }> + + {t('help.qCovidSchedule')} + + + + + + + + {t('help.sourceMaterial')} + + + }> + + {t('help.qAddSourceMaterial')} + + + + + + + + ); +}; + +export default Help;