Skip to content

Commit 8b0cbdc

Browse files
author
Saket Hatwar
committed
fixes
1 parent c815d86 commit 8b0cbdc

File tree

6 files changed

+54
-14
lines changed

6 files changed

+54
-14
lines changed

jsx/Modal.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {useState, PropsWithChildren, CSSProperties, ReactNode} from 'react';
2+
import {useTranslation} from 'react-i18next';
23
import Swal from 'sweetalert2';
34
import Loader from './Loader';
45
import {
@@ -38,20 +39,22 @@ const Modal = ({
3839
}: ModalProps) => {
3940
const [loading, setLoading] = useState(false); // Tracks loading during submit
4041
const [success, setSuccess] = useState(false); // Tracks success after submit
42+
const {t} = useTranslation('loris');
4143

4244
/**
4345
* Handles modal close event. Shows a confirmation if `throwWarning` is true.
4446
*/
4547
const handleClose = () => {
4648
if (throwWarning) { // Display warning if enabled
4749
Swal.fire({
48-
title: 'Are You Sure?',
49-
text: 'Leaving the form will result in the loss of any information ' +
50-
'entered.',
50+
title: t('Are You Sure?', {ns: 'loris'}),
51+
text: t('Leaving the form will result in the loss '
52+
+'of any information entered.',
53+
{ns: 'loris'}),
5154
type: 'warning',
5255
showCancelButton: true,
53-
confirmButtonText: 'Proceed',
54-
cancelButtonText: 'Cancel',
56+
confirmButtonText: t('Proceed', {ns: 'loris'}),
57+
cancelButtonText: t('Cancel', {ns: 'loris'}),
5558
}).then((result) => result.value && onClose());
5659
} else {
5760
onClose(); // Close immediately if no warning
@@ -175,7 +178,7 @@ const Modal = ({
175178
const loader = loading && (
176179
<div style={processStyle}>
177180
<Loader size={20}/>
178-
<h5 className='animate-flicker'>Saving</h5>
181+
<h5 className='animate-flicker'>{t('Saving', {ns: 'loris'})}</h5>
179182
</div>
180183
);
181184

@@ -188,7 +191,7 @@ const Modal = ({
188191
style={{color: 'green', marginBottom: '2px'}}
189192
className='glyphicon glyphicon-ok-circle'
190193
/>
191-
<h5>Success!</h5>
194+
<h5>{t('Success!', {ns: 'loris'})}</h5>
192195
</div>
193196
);
194197

locale/hi/LC_MESSAGES/loris.po

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,15 @@ msgstr "रद्द करें"
130130
msgid "Success!"
131131
msgstr "सफलता!"
132132

133+
msgid "Saving"
134+
msgstr "सहेजा जा रहा है"
135+
136+
msgid "Are You Sure?"
137+
msgstr "क्या आप सुनिश्चित हैं?"
138+
139+
msgid "Leaving the form will result in the loss of any information entered."
140+
msgstr "फॉर्म छोड़ने पर दर्ज की गई सभी जानकारी खो जाएगी।"
141+
133142
# Common candidate terms
134143
msgid "PSCID"
135144
msgstr "पीएससीआईडी"

locale/loris.pot

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@ msgstr ""
129129
msgid "Success!"
130130
msgstr ""
131131

132+
msgid "Saving"
133+
msgstr ""
134+
135+
msgid "Are You Sure?"
136+
msgstr ""
137+
138+
msgid "Leaving the form will result in the loss of any information entered."
139+
msgstr ""
140+
132141
# Common candidate terms
133142
msgid "PSCID"
134143
msgstr ""

modules/dataquery/jsx/welcome.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,8 +1018,9 @@ function QueryRunList(props:{
10181018
function LoadIcon(props: {
10191019
onClick?: () => void,
10201020
}) {
1021+
const {t} = useTranslation('dataquery');
10211022
return <span onClick={props.onClick}
1022-
title="Reload query"
1023+
title={t('Reload query', {ns: 'dataquery'})}
10231024
style={{cursor: 'pointer'}}
10241025
className="fa-stack">
10251026
<i className="fas fa-sync fa-stack-1x"></i>

modules/dataquery/locale/dataquery.pot

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,15 @@ msgstr ""
405405
msgid "Filters"
406406
msgstr ""
407407

408+
msgid "Define Filters"
409+
msgstr ""
410+
411+
msgid "Define Fields"
412+
msgstr ""
413+
414+
msgid "Reload query"
415+
msgstr ""
416+
408417
msgid "Continue to Define Fields"
409418
msgstr ""
410419

modules/dataquery/locale/hi/LC_MESSAGES/dataquery.po

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,16 @@ msgid "Show Advanced"
130130
msgstr "उन्नत विकल्प दिखाएँ"
131131

132132
msgid "The \"nested groups\" options are advanced options for queries that do not have any specific condition at the base of the query. Use Add nested \"or\" condition groups if you need to build a query of the form. (a or b) and (c or d) [or (e and f)..]"
133-
msgstr "\"नेस्टेड समूह\" विकल्प उन क्वेरीज़ के लिए उन्नत विकल्प हैं जिनके आधार में कोई विशिष्ट शर्त नहीं होती। Add nested \"or\" condition groups का उपयोग करें यदि आपको (a या b) और (c या d) [या (e और f)..] जैसी क्वेरी बनानी हो।"
133+
msgstr "\"नेस्टेड समूह\" विकल्प उन क्वेरीज़ के लिए उन्नत विकल्प हैं जिनके आधार में कोई विशिष्ट शर्त नहीं होती। नेस्टेड \"या\" शर्त समूह जोड़ें का उपयोग करें यदि आपको (a या b) और (c या d) [या (e और f)..] जैसी क्वेरी बनानी हो।"
134134

135135
msgid "Add nested \"or\" condition groups"
136-
msgstr "नेस्टेड \"or\" शर्त समूह जोड़ें"
136+
msgstr "नेस्टेड \"या\" शर्त समूह जोड़ें"
137137

138138
msgid "Use Add nested \"and\" condition groups if you need to build a query of the form (a and b) or (c and d) [or (e and f)..]"
139-
msgstr "यदि आपको (a और b) या (c और d) [या (e और f)..] जैसी क्वेरी बनानी है तो Add nested \"and\" condition groups का उपयोग करें।"
139+
msgstr "यदि आपको (a और b) या (c और d) [या (e और f)..] जैसी क्वेरी बनानी है तो नेस्टेड \"और\" शर्त समूह जोड़ें का उपयोग करें।"
140140

141141
msgid "Add nested \"and\" condition groups"
142-
msgstr "नेस्टेड \"and\" शर्त समूह जोड़ें"
142+
msgstr "नेस्टेड \"और\" शर्त समूह जोड़ें"
143143

144144
msgid "Currently querying for ALL candidates."
145145
msgstr "वर्तमान में सभी उम्मीदवारों के लिए क्वेरी की जा रही है।"
@@ -148,10 +148,10 @@ msgid "You can add conditions by clicking one of the buttons below."
148148
msgstr "आप नीचे दिए गए बटनों में से किसी पर क्लिक करके शर्तें जोड़ सकते हैं।"
149149

150150
msgid "Click Add Condition to add one or more conditions to your filters (ie. \"Date Of Birth < 2015-02-15\"). This is most likely where you want to start your filters."
151-
msgstr "फ़िल्टर में एक या अधिक शर्तें जोड़ने के लिए Add Condition पर क्लिक करें (जैसे \"जन्म तिथि < 2015-02-15\")। संभवतः यही वह जगह है जहाँ से आप अपने फ़िल्टर शुरू करना चाहेंगे।"
151+
msgstr "फ़िल्टर में एक या अधिक शर्तें जोड़ने के लिए 'शर्त जोड़ें' पर क्लिक करें (जैसे \"जन्म तिथि < 2015-02-15\")। संभवतः यही वह जगह है जहाँ से आप अपने फ़िल्टर शुरू करना चाहेंगे।"
152152

153153
msgid "You can also import a population from a CSV by clicking the Import from CSV button."
154-
msgstr "आप Import from CSV बटन पर क्लिक करके CSV से जनसंख्या भी आयात कर सकते हैं।"
154+
msgstr "आप 'CSV से आयात करें' बटन पर क्लिक करके CSV से जनसंख्या भी आयात कर सकते हैं।"
155155

156156
msgid "The advanced options are for queries that do not have a condition to add at the base of the query."
157157
msgstr "उन्नत विकल्प उन क्वेरीज़ के लिए हैं जिनके आधार में कोई शर्त जोड़ने के लिए नहीं है।"
@@ -396,6 +396,15 @@ msgstr "फ़ील्ड्स"
396396
msgid "Filters"
397397
msgstr "फ़िल्टर्स"
398398

399+
msgid "Define Filters"
400+
msgstr "फ़िल्टर निर्धारित करें"
401+
402+
msgid "Define Fields"
403+
msgstr "फ़ील्ड निर्धारित करें"
404+
405+
msgid "Reload query"
406+
msgstr "क्वेरी पुनः लोड करें"
407+
399408
msgid "Continue to Define Fields"
400409
msgstr "फ़ील्ड परिभाषित करना जारी रखें"
401410

0 commit comments

Comments
 (0)