Skip to content

Commit edb674c

Browse files
Merge branch 'main' into TranslateDataquery
2 parents e29c3a0 + 3b41a38 commit edb674c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3758
-1037
lines changed

Makefile

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ locales:
104104
msgfmt -o modules/configuration/locale/ja/LC_MESSAGES/configuration.mo modules/configuration/locale/ja/LC_MESSAGES/configuration.po
105105
msgfmt -o modules/configuration/locale/ja/LC_MESSAGES/configuration.mo modules/configuration/locale/ja/LC_MESSAGES/configuration.po
106106
msgfmt -o modules/conflict_resolver/locale/ja/LC_MESSAGES/conflict_resolver.mo modules/conflict_resolver/locale/ja/LC_MESSAGES/conflict_resolver.po
107+
msgfmt -o modules/conflict_resolver/locale/hi/LC_MESSAGES/conflict_resolver.mo modules/conflict_resolver/locale/hi/LC_MESSAGES/conflict_resolver.po
108+
npx i18next-conv -l hi -s modules/conflict_resolver/locale/hi/LC_MESSAGES/conflict_resolver.po -t modules/conflict_resolver/locale/hi/LC_MESSAGES/conflict_resolver.json
107109
npx i18next-conv -l ja -s modules/conflict_resolver/locale/ja/LC_MESSAGES/conflict_resolver.po -t modules/conflict_resolver/locale/ja/LC_MESSAGES/conflict_resolver.json
108110
msgfmt -o modules/create_timepoint/locale/ja/LC_MESSAGES/create_timepoint.mo modules/create_timepoint/locale/ja/LC_MESSAGES/create_timepoint.po
109111
npx i18next-conv -l ja -s modules/create_timepoint/locale/ja/LC_MESSAGES/create_timepoint.po -t modules/create_timepoint/locale/ja/LC_MESSAGES/create_timepoint.json
@@ -122,6 +124,8 @@ locales:
122124
msgfmt -o modules/data_release/locale/hi/LC_MESSAGES/data_release.mo modules/data_release/locale/hi/LC_MESSAGES/data_release.po
123125
npx i18next-conv -l hi -s modules/data_release/locale/hi/LC_MESSAGES/data_release.po -t modules/data_release/locale/hi/LC_MESSAGES/data_release.json
124126
msgfmt -o modules/dicom_archive/locale/ja/LC_MESSAGES/dicom_archive.mo modules/dicom_archive/locale/ja/LC_MESSAGES/dicom_archive.po
127+
msgfmt -o modules/dicom_archive/locale/hi/LC_MESSAGES/dicom_archive.mo modules/dicom_archive/locale/hi/LC_MESSAGES/dicom_archive.po
128+
npx i18next-conv -l hi -s modules/dicom_archive/locale/hi/LC_MESSAGES/dicom_archive.po -t modules/dicom_archive/locale/hi/LC_MESSAGES/dicom_archive.json
125129
msgfmt -o modules/dictionary/locale/ja/LC_MESSAGES/dictionary.mo modules/dictionary/locale/ja/LC_MESSAGES/dictionary.po
126130
npx i18next-conv -l ja -s modules/dictionary/locale/ja/LC_MESSAGES/dictionary.po -t modules/dictionary/locale/ja/LC_MESSAGES/dictionary.json
127131
msgfmt -o modules/dictionary/locale/hi/LC_MESSAGES/dictionary.mo modules/dictionary/locale/hi/LC_MESSAGES/dictionary.po
@@ -135,11 +139,14 @@ locales:
135139
msgfmt -o modules/help_editor/locale/ja/LC_MESSAGES/help_editor.mo modules/help_editor/locale/ja/LC_MESSAGES/help_editor.po
136140
msgfmt -o modules/help_editor/locale/hi/LC_MESSAGES/help_editor.mo modules/help_editor/locale/hi/LC_MESSAGES/help_editor.po
137141
npx i18next-conv -l hi -s modules/help_editor/locale/hi/LC_MESSAGES/help_editor.po -t modules/help_editor/locale/hi/LC_MESSAGES/help_editor.json
142+
npx i18next-conv -l ja -s modules/help_editor/locale/ja/LC_MESSAGES/help_editor.po -t modules/help_editor/locale/ja/LC_MESSAGES/help_editor.json
138143
msgfmt -o modules/imaging_browser/locale/ja/LC_MESSAGES/imaging_browser.mo modules/imaging_browser/locale/ja/LC_MESSAGES/imaging_browser.po
139144
npx i18next-conv -l ja -s modules/imaging_browser/locale/ja/LC_MESSAGES/imaging_browser.po -t modules/imaging_browser/locale/ja/LC_MESSAGES/imaging_browser.json --compatibilityJSON v4
140145
msgfmt -o modules/imaging_qc/locale/ja/LC_MESSAGES/imaging_qc.mo modules/imaging_qc/locale/ja/LC_MESSAGES/imaging_qc.po
141146
msgfmt -o modules/imaging_uploader/locale/ja/LC_MESSAGES/imaging_uploader.mo modules/imaging_uploader/locale/ja/LC_MESSAGES/imaging_uploader.po
142147
msgfmt -o modules/instrument_builder/locale/ja/LC_MESSAGES/instrument_builder.mo modules/instrument_builder/locale/ja/LC_MESSAGES/instrument_builder.po
148+
msgfmt -o modules/instrument_builder/locale/hi/LC_MESSAGES/instrument_builder.mo modules/instrument_builder/locale/hi/LC_MESSAGES/instrument_builder.po
149+
npx i18next-conv -l hi -s modules/instrument_builder/locale/hi/LC_MESSAGES/instrument_builder.po -t modules/instrument_builder/locale/hi/LC_MESSAGES/instrument_builder.json --compatibilityJSON v4
143150
msgfmt -o modules/instrument_list/locale/ja/LC_MESSAGES/instrument_list.mo modules/instrument_list/locale/ja/LC_MESSAGES/instrument_list.po
144151
msgfmt -o modules/instrument_list/locale/es/LC_MESSAGES/instrument_list.mo modules/instrument_list/locale/es/LC_MESSAGES/instrument_list.po
145152
msgfmt -o modules/instrument_list/locale/fr/LC_MESSAGES/instrument_list.mo modules/instrument_list/locale/fr/LC_MESSAGES/instrument_list.po
@@ -148,10 +155,14 @@ locales:
148155
npx i18next-conv -l ja -s modules/instruments/locale/ja/LC_MESSAGES/instruments.po -t modules/instruments/locale/ja/LC_MESSAGES/instruments.json --compatibilityJSON v4
149156
msgfmt -o modules/instruments/locale/es/LC_MESSAGES/instruments.mo modules/instruments/locale/es/LC_MESSAGES/instruments.po
150157
msgfmt -o modules/issue_tracker/locale/ja/LC_MESSAGES/issue_tracker.mo modules/issue_tracker/locale/ja/LC_MESSAGES/issue_tracker.po
158+
msgfmt -o modules/issue_tracker/locale/hi/LC_MESSAGES/issue_tracker.mo modules/issue_tracker/locale/hi/LC_MESSAGES/issue_tracker.po
159+
npx i18next-conv -l hi -s modules/issue_tracker/locale/hi/LC_MESSAGES/issue_tracker.po -t modules/issue_tracker/locale/hi/LC_MESSAGES/issue_tracker.json --compatibilityJSON v4
151160
npx i18next-conv -l ja -s modules/issue_tracker/locale/ja/LC_MESSAGES/issue_tracker.po -t modules/issue_tracker/locale/ja/LC_MESSAGES/issue_tracker.json --compatibilityJSON v4
152161
msgfmt -o modules/login/locale/ja/LC_MESSAGES/login.mo modules/login/locale/ja/LC_MESSAGES/login.po
153162
msgfmt -o modules/media/locale/ja/LC_MESSAGES/media.mo modules/media/locale/ja/LC_MESSAGES/media.po
154163
msgfmt -o modules/module_manager/locale/ja/LC_MESSAGES/module_manager.mo modules/module_manager/locale/ja/LC_MESSAGES/module_manager.po
164+
msgfmt -o modules/module_manager/locale/hi/LC_MESSAGES/module_manager.mo modules/module_manager/locale/hi/LC_MESSAGES/module_manager.po
165+
npx i18next-conv -l hi -s modules/module_manager/locale/hi/LC_MESSAGES/module_manager.po -t modules/module_manager/locale/hi/LC_MESSAGES/module_manager.json
155166
msgfmt -o modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.mo modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.po
156167
msgfmt -o modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.mo modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.po
157168
npx i18next-conv -l ja -s modules/my_preferences/locale/ja/LC_MESSAGES/my_preferences.po -t modules/my_preferences/locale/ja/LC_MESSAGES/my_preferences.json --compatibilityJSON v4
@@ -161,7 +172,11 @@ locales:
161172
msgfmt -o modules/next_stage/locale/es/LC_MESSAGES/next_stage.mo modules/next_stage/locale/es/LC_MESSAGES/next_stage.po
162173
msgfmt -o modules/oidc/locale/ja/LC_MESSAGES/oidc.mo modules/oidc/locale/ja/LC_MESSAGES/oidc.po
163174
msgfmt -o modules/publication/locale/ja/LC_MESSAGES/publication.mo modules/publication/locale/ja/LC_MESSAGES/publication.po
175+
msgfmt -o modules/publication/locale/hi/LC_MESSAGES/publication.mo modules/publication/locale/hi/LC_MESSAGES/publication.po
176+
npx i18next-conv -l hi -s modules/publication/locale/hi/LC_MESSAGES/publication.po -t modules/publication/locale/hi/LC_MESSAGES/publication.json
164177
msgfmt -o modules/schedule_module/locale/ja/LC_MESSAGES/schedule_module.mo modules/schedule_module/locale/ja/LC_MESSAGES/schedule_module.po
178+
msgfmt -o modules/schedule_module/locale/hi/LC_MESSAGES/schedule_module.mo modules/schedule_module/locale/hi/LC_MESSAGES/schedule_module.po
179+
npx i18next-conv -l hi -s modules/schedule_module/locale/hi/LC_MESSAGES/schedule_module.po -t modules/schedule_module/locale/hi/LC_MESSAGES/schedule_module.json
165180
msgfmt -o modules/server_processes_manager/locale/ja/LC_MESSAGES/server_processes_manager.mo modules/server_processes_manager/locale/ja/LC_MESSAGES/server_processes_manager.po
166181
msgfmt -o modules/statistics/locale/ja/LC_MESSAGES/statistics.mo modules/statistics/locale/ja/LC_MESSAGES/statistics.po
167182
npx i18next-conv -l ja -s modules/statistics/locale/ja/LC_MESSAGES/statistics.po -t modules/statistics/locale/ja/LC_MESSAGES/statistics.json
@@ -181,8 +196,8 @@ create_timepoint:
181196
target=data_release npm run compile
182197

183198
data_release: modules/data_release/locale/hi/LC_MESSAGES/data_release.mo modules/data_release/locale/ja/LC_MESSAGES/data_release.mo
184-
npx i18next-conv -l hi -s modules/data_release/locale/hi/LC_MESSAGES/data_release.po -t modules/data_release/locale/hi/LC_MESSAGES/data_release.json
185-
npx i18next-conv -l ja -s modules/data_release/locale/ja/LC_MESSAGES/data_release.po -t modules/data_release/locale/ja/LC_MESSAGES/data_release.json
199+
npx i18next-conv -l hi -s modules/data_release/locale/hi/LC_MESSAGES/data_release.po -t modules/data_release/locale/hi/LC_MESSAGES/data_release.json
200+
npx i18next-conv -l ja -s modules/data_release/locale/ja/LC_MESSAGES/data_release.po -t modules/data_release/locale/ja/LC_MESSAGES/data_release.json
186201
target=data_release npm run compile
187202

188203
instrument_manager: modules/instrument_manager/locale/ja/LC_MESSAGES/instrument_manager.mo
@@ -191,18 +206,23 @@ instrument_manager: modules/instrument_manager/locale/ja/LC_MESSAGES/instrument_
191206
dataquery:
192207
msgfmt -o modules/dataquery/locale/hi/LC_MESSAGES/dataquery.mo modules/dataquery/locale/hi/LC_MESSAGES/dataquery.po
193208
npx i18next-conv -l hi -s modules/dataquery/locale/hi/LC_MESSAGES/dataquery.po -t modules/dataquery/locale/hi/LC_MESSAGES/dataquery.json
194-
target=dataquery npm run compile
209+
210+
instrument_builder: modules/instrument_builder/locale/ja/LC_MESSAGES/instrument_builder.mo modules/instrument_builder/locale/hi/LC_MESSAGES/instrument_builder.mo
211+
npx i18next-conv -l hi -s modules/instrument_builder/locale/hi/LC_MESSAGES/instrument_builder.po -t modules/instrument_builder/locale/hi/LC_MESSAGES/instrument_builder.json --compatibilityJSON v4
212+
target=instrument_builder npm run compile
195213

196214
login: modules/login/locale/ja/LC_MESSAGES/login.mo
197215
target=login npm run compile
198216

199-
module_manager: modules/module_manager/locale/ja/LC_MESSAGES/module_manager.mo
217+
module_manager: modules/module_manager/locale/ja/LC_MESSAGES/module_manager.mo modules/module_manager/locale/hi/LC_MESSAGES/module_manager.mo
200218
target=module_manager npm run compile
201219

202220
mri_violations: modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.mo
203221
target=mri_violations npm run compile
204222

205-
issue_tracker: modules/issue_tracker/locale/ja/LC_MESSAGES/issue_tracker.mo
223+
issue_tracker:
224+
msgfmt -o modules/issue_tracker/locale/hi/LC_MESSAGES/issue_tracker.mo modules/issue_tracker/locale/hi/LC_MESSAGES/issue_tracker.po
225+
npx i18next-conv -l hi -s modules/issue_tracker/locale/hi/LC_MESSAGES/issue_tracker.po -t modules/issue_tracker/locale/hi/LC_MESSAGES/issue_tracker.json
206226
target=issue_tracker npm run compile
207227

208228
candidate_list: modules/candidate_list/locale/ja/LC_MESSAGES/candidate_list.mo modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.mo
@@ -217,19 +237,30 @@ candidate_parameters: modules/candidate_parameters/locale/ja/LC_MESSAGES/candida
217237
dashboard: modules/dashboard/locale/ja/LC_MESSAGES/dashboard.mo
218238
target=dashboard npm run compile
219239

220-
publication: modules/publication/locale/ja/LC_MESSAGES/publication.mo
240+
publication:
241+
msgfmt -o modules/publication/locale/hi/LC_MESSAGES/publication.mo modules/publication/locale/hi/LC_MESSAGES/publication.po
242+
npx i18next-conv -l hi -s modules/publication/locale/hi/LC_MESSAGES/publication.po -t modules/publication/locale/hi/LC_MESSAGES/publication.json
221243
target=publication npm run compile
222244

245+
schedule_module:
246+
msgfmt -o modules/schedule_module/locale/hi/LC_MESSAGES/schedule_module.mo modules/schedule_module/locale/hi/LC_MESSAGES/schedule_module.po
247+
npx i18next-conv -l hi -s modules/schedule_module/locale/hi/LC_MESSAGES/schedule_module.po -t modules/schedule_module/locale/hi/LC_MESSAGES/schedule_module.json
248+
target=schedule_module npm run compile
249+
223250
server_processes_manager: modules/server_processes_manager/locale/ja/LC_MESSAGES/server_processes_manager.mo
224251
target=server_processes_manager npm run compile
225252

226253
conflict_resolver:
254+
msgfmt -o modules/conflict_resolver/locale/hi/LC_MESSAGES/conflict_resolver.mo modules/conflict_resolver/locale/hi/LC_MESSAGES/conflict_resolver.po
255+
npx i18next-conv -l hi -s modules/conflict_resolver/locale/hi/LC_MESSAGES/conflict_resolver.po -t modules/conflict_resolver/locale/hi/LC_MESSAGES/conflict_resolver.json
256+
npx i18next-conv -l ja -s modules/conflict_resolver/locale/ja/LC_MESSAGES/conflict_resolver.po -t modules/conflict_resolver/locale/ja/LC_MESSAGES/conflict_resolver.json
227257
target=conflict_resolver npm run compile
228258

229259
behavioural_qc:
230260
msgfmt -o modules/behavioural_qc/locale/hi/LC_MESSAGES/behavioural_qc.mo modules/behavioural_qc/locale/hi/LC_MESSAGES/behavioural_qc.po
231261
npx i18next-conv -l hi -s modules/behavioural_qc/locale/hi/LC_MESSAGES/behavioural_qc.po -t modules/behavioural_qc/locale/hi/LC_MESSAGES/behavioural_qc.json
232262
target=behavioural_qc npm run compile
263+
233264
my_preferences: modules/my_preferences/locale/ja/LC_MESSAGES/my_preferences.mo modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.mo
234265
npx i18next-conv -l ja -s modules/my_preferences/locale/ja/LC_MESSAGES/my_preferences.po -t modules/my_preferences/locale/ja/LC_MESSAGES/my_preferences.json --compatibilityJSON v4
235266
npx i18next-conv -l hi -s modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.po -t modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.json --compatibilityJSON v4

jsx/Filter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function Filter(props) {
146146
data-toggle='dropdown'
147147
role='button'
148148
>
149-
Load Filter Preset <span className='caret'/>
149+
{props.t('Load Filter Preset')} <span className='caret'/>
150150
</a>
151151
<ul className='dropdown-menu' role='menu'>
152152
{presets}

locale/hi/LC_MESSAGES/loris.po

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ msgstr "बनाएँ"
152152
msgid "Selection Filter"
153153
msgstr "चयन फ़िल्टर"
154154

155+
msgid "Filters"
156+
msgstr "फ़िल्टर"
157+
155158
msgid "Show Filters"
156159
msgstr "फ़िल्टर दिखाएँ"
157160

@@ -161,6 +164,9 @@ msgstr "फ़िल्टर छिपाएँ"
161164
msgid "Clear Filters"
162165
msgstr "फ़िल्टर साफ़ करें"
163166

167+
msgid "Load Filter Preset"
168+
msgstr "फ़िल्टर प्रीसेट लोड करें"
169+
164170
msgid "Show Advanced Filters"
165171
msgstr "उन्नत फ़िल्टर दिखाएँ"
166172

@@ -205,6 +211,12 @@ msgstr "डीसीसीआईडी"
205211
msgid "Visit Label"
206212
msgstr "दौरे का लेबल"
207213

214+
msgid "Status"
215+
msgstr "स्थिति"
216+
217+
msgid "No."
218+
msgstr "संख्या"
219+
208220
msgid "Email"
209221
msgstr "ईमेल"
210222

@@ -383,6 +395,9 @@ msgstr "कुल"
383395
msgid "Error!"
384396
msgstr "त्रुटि!"
385397

398+
msgid "Date"
399+
msgstr "दिनांक"
400+
386401
# Common timepoint and visit terms
387402
msgid "Not Started"
388403
msgstr "शुरू नहीं हुआ"
@@ -456,3 +471,6 @@ msgstr "{{years}} वर्ष का"
456471
# Other generic terms
457472
msgid "Loading..."
458473
msgstr "लोड हो रहा है..."
474+
475+
msgid "Permission denied"
476+
msgstr "अनुमति अस्वीकृत"

locale/ja/LC_MESSAGES/loris.po

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ msgstr "取り消す"
155155
msgid "Success!"
156156
msgstr "成功!"
157157

158+
msgid "Close"
159+
msgstr "近い"
160+
158161
# Common candidate terms
159162
msgid "PSCID"
160163
msgstr "プロジェクト識別子"

locale/loris.pot

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ msgstr ""
5757
#: modules/user_accounts/php/module.class.inc:53
5858
msgid "Admin"
5959
msgstr ""
60+
6061
#: modules/acknowledgements/php/module.class.inc:54
6162
#: modules/api_docs/php/module.class.inc:66
6263
#: modules/battery_manager/php/module.class.inc:55
@@ -108,7 +109,7 @@ msgstr ""
108109
msgid "Reports"
109110
msgstr ""
110111

111-
# Common loris terms. Consider moving these to their own textdomain?
112+
# Common loris terms.
112113
msgid "TimePoint"
113114
msgstr ""
114115

@@ -170,13 +171,19 @@ msgid "Leaving the form will result in the loss of any information entered."
170171
msgid "Close"
171172
msgstr ""
172173

174+
msgid "Close"
175+
msgstr ""
176+
173177
# Common candidate terms
174178
msgid "PSCID"
175179
msgstr ""
176180

177181
msgid "DCCID"
178182
msgstr ""
179183

184+
msgid "Visit"
185+
msgstr ""
186+
180187
msgid "Visit Label"
181188
msgstr ""
182189

@@ -203,7 +210,7 @@ msgstr ""
203210
msgid "Cohort"
204211
msgid_plural "Cohorts"
205212
msgstr[0] ""
206-
213+
207214
msgid "Session"
208215
msgstr ""
209216

@@ -228,6 +235,12 @@ msgstr ""
228235
msgid "Scans"
229236
msgstr ""
230237

238+
msgid "Date"
239+
msgstr ""
240+
241+
msgid "Time"
242+
msgstr ""
243+
231244
msgid "Stage"
232245
msgstr ""
233246

@@ -371,9 +384,6 @@ msgstr ""
371384
msgid "Status"
372385
msgstr ""
373386

374-
msgid "Date"
375-
msgstr ""
376-
377387
# Common timepoint and vist terms
378388
msgid "Not Started"
379389
msgstr ""
@@ -453,3 +463,5 @@ msgstr ""
453463
msgid "Loading..."
454464
msgstr ""
455465

466+
msgid "Permission denied"
467+
msgstr ""

modules/conflict_resolver/jsx/conflict_resolver.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ import React, {Component} from 'react';
33
import {Tabs, TabPane} from 'Tabs';
44
import i18n from 'I18nSetup';
55
import {withTranslation} from 'react-i18next';
6+
import PropTypes from 'prop-types';
67

78
import UnresolvedFilterableDataTable from './unresolved_filterabledatatable';
89
import ResolvedFilterableDataTable from './resolved_filterabledatatable';
10+
import hiStrings from '../locale/hi/LC_MESSAGES/conflict_resolver.json';
911

1012
/**
1113
* Conflict Resolver class.
@@ -41,9 +43,10 @@ class ConflictResolver extends Component {
4143
* @return {JSX}
4244
*/
4345
render() {
46+
const {t} = this.props;
4447
const tabs = [
45-
{id: 'unresolved', label: 'Unresolved'},
46-
{id: 'resolved', label: 'Resolved'},
48+
{id: 'unresolved', label: t('Unresolved', {ns: 'conflict_resolver'})},
49+
{id: 'resolved', label: t('Resolved', {ns: 'conflict_resolver'})},
4750
];
4851

4952
let filtertable;
@@ -76,6 +79,7 @@ class ConflictResolver extends Component {
7679

7780
window.addEventListener('load', () => {
7881
i18n.addResourceBundle('ja', 'conflict_resolver', {});
82+
i18n.addResourceBundle('hi', 'conflict_resolver', hiStrings);
7983
const Index = withTranslation(
8084
['conflict_resolver', 'loris']
8185
)(ConflictResolver);
@@ -84,3 +88,10 @@ window.addEventListener('load', () => {
8488
).render(<Index />);
8589
});
8690

91+
ConflictResolver.propTypes = {
92+
t: PropTypes.func,
93+
};
94+
95+
export default withTranslation(
96+
['conflict_resolver', 'loris'])(ConflictResolver);
97+

modules/conflict_resolver/jsx/fix_conflict_form.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import {Component} from 'react';
66
import PropTypes from 'prop-types';
77
import {SelectElement} from 'jsx/Form';
8+
import {withTranslation} from 'react-i18next';
89

910
/**
1011
* The fix FixConflictForm renders a <form> within a <td>. The form as a select
@@ -53,6 +54,7 @@ class FixConflictForm extends Component {
5354
* @param {string} value
5455
*/
5556
resolveConflict(name, value) {
57+
const {t} = this.props;
5658
fetch(loris.BaseURL.concat('/conflict_resolver/unresolved'), {
5759
method: 'POST',
5860
credentials: 'same-origin',
@@ -71,7 +73,7 @@ class FixConflictForm extends Component {
7173
this.setState({success: true, error: null, emptyOption: false, value});
7274
})
7375
.catch((error) => {
74-
swal('Error!', error, 'error');
76+
swal(t('Error!', {ns: 'loris'}), error, 'error');
7577
this.setState({error, success: false, emptyOption: true});
7678
});
7779
}
@@ -106,6 +108,7 @@ class FixConflictForm extends Component {
106108
FixConflictForm.propTypes = {
107109
conflictId: PropTypes.string.isRequired,
108110
options: PropTypes.object.isRequired,
111+
t: PropTypes.func,
109112
};
110113

111-
export default FixConflictForm;
114+
export default withTranslation(['conflict_resolver', 'loris'])(FixConflictForm);

0 commit comments

Comments
 (0)