Skip to content

Commit 14575a7

Browse files
author
Saket Hatwar
committed
fix
1 parent f9b5e0c commit 14575a7

File tree

7 files changed

+35
-12
lines changed

7 files changed

+35
-12
lines changed

locale/hi/LC_MESSAGES/loris.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ msgstr "रद्द करें"
154154

155155
msgid "Success!"
156156
msgstr "सफलता!"
157+
msgid "Close"
158+
msgstr "बंद करें"
157159

158160
# Common candidate terms
159161
msgid "PSCID"

locale/loris.pot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ msgid "Cancel"
155155
msgstr ""
156156

157157
msgid "Success!"
158+
msgid "Close"
158159
msgstr ""
159160

160161
# Common candidate terms

modules/help_editor/jsx/helpEditorForm.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ const HelpEditorForm = (props) => {
7676
method: 'POST',
7777
body: formData,
7878
}).then((response) => {
79-
console.log(response);
80-
8179
if (response.status !== 200) {
8280
swal.fire({
83-
title: 'Content update unsuccessful.',
84-
text: 'Help content cannot be added to an instrument '
81+
title: t('Content update unsuccessful.',
82+
{ns: 'help_editor'}),
83+
text: t('Help content cannot be added to an instrument '
8584
+ 'that has already been registered.',
85+
{ns: 'help_editor'}),
8686
type: 'error',
87-
confirmButtonText: 'Try again',
87+
confirmButtonText: t('Try again', {ns: 'help_editor'}),
8888
});
8989
console.error(response.status);
9090
return;
@@ -93,7 +93,7 @@ const HelpEditorForm = (props) => {
9393
title: t('Content update successful!',
9494
{ns: 'help_editor'}),
9595
type: 'success',
96-
confirmButtonText: t('Close', {ns: 'help_editor'}),
96+
confirmButtonText: t('Close', {ns: 'loris'}),
9797
});
9898
}).catch((error) => {
9999
console.error(error);
@@ -120,7 +120,7 @@ const HelpEditorForm = (props) => {
120120

121121
<SelectElement
122122
name='instrument'
123-
label='Instrument'
123+
label={t('Instrument', {ns: 'help_editor'})}
124124
emptyOption={true}
125125
options={props.instrumentslist}
126126
onUserInput={onUserInput}

modules/help_editor/jsx/help_editor.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ class HelpEditor extends React.Component {
111111
);
112112
};
113113
const actions = [
114-
{label: 'Adding help content for a specific instrument', action: addHelp},
114+
{label: t('Adding help content for a specific instrument',
115+
{ns: 'help_editor'}), action: addHelp},
115116
];
116117
const fields = [
117118
{label: t('Help ID', {ns: 'help_editor'}), show: false},
@@ -123,7 +124,7 @@ class HelpEditor extends React.Component {
123124
name: 'content',
124125
type: 'text',
125126
}},
126-
{label: 'Instrument', show: true},
127+
{label: t('Instrument', {ns: 'loris'}), show: true},
127128
];
128129

129130
return (

modules/help_editor/locale/help_editor.pot

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ msgstr ""
2121
msgid "Help Editor"
2222
msgstr ""
2323

24+
msgid "Edit Help Content"
25+
msgstr ""
26+
2427
msgid "Help ID"
2528
msgstr ""
2629

@@ -39,14 +42,17 @@ msgstr ""
3942
msgid "Content update successful!"
4043
msgstr ""
4144

42-
msgid "Close"
43-
msgstr ""
44-
4545
msgid "Content update unsuccessful."
4646
msgstr ""
4747

4848
msgid "Something went wrong"
4949
msgstr ""
5050

5151
msgid "Try again"
52+
msgstr ""
53+
54+
msgid "Help content cannot be added to an instrument that has already been registered."
55+
msgstr ""
56+
57+
msgid "Adding help content for a specific instrument"
5258
msgstr ""

modules/help_editor/locale/hi/LC_MESSAGES/help_editor.po

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ msgstr ""
2121
msgid "Help Editor"
2222
msgstr "सहायता संपादक"
2323

24+
msgid "Edit Help Content"
25+
msgstr "सहायता सामग्री संपादित करें"
26+
2427
msgid "Help ID"
2528
msgstr "सहायता आईडी"
2629

@@ -50,3 +53,9 @@ msgstr "कुछ गलत हो गया"
5053

5154
msgid "Try again"
5255
msgstr "पुनः प्रयास करें"
56+
57+
msgid "Help content cannot be added to an instrument that has already been registered."
58+
msgstr "एक ऐसे इंस्ट्रूमेंट में हेल्प कंटेंट नहीं जोड़ा जा सकता है जो पहले से पंजीकृत हो चुका है।"
59+
60+
msgid "Adding help content for a specific instrument"
61+
msgstr "किसी विशिष्ट उपकरण के लिए सहायता सामग्री जोड़ना"

modules/help_editor/php/edit_help_content.class.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ class Edit_Help_Content extends \NDB_Form
158158
}
159159
}
160160

161+
$data['edit_help_text'] = dgettext('help_editor', 'Edit Help Content');
162+
$data['display_title'] = !empty($data['title']) ? $data['title'] :
163+
$data['edit_help_text'];
164+
161165
$this->tpl_data = $data;
162166
return (new \LORIS\Http\Response())
163167
->withBody(new \LORIS\Http\StringStream($this->display() ?? ""));

0 commit comments

Comments
 (0)