-
Notifications
You must be signed in to change notification settings - Fork 184
[document_repository] Translate document repository #9954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
1365ea0
to
dc2ff91
Compare
// Data loading error | ||
if (this.state.error) { | ||
return <h3>An error occured while loading the page.</h3>; | ||
return <h3>{t('An error occured while loading the page.', | ||
{ns: 'document_repository'})}</h3>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is in the loris namespace?
// If error occurs, return a message. | ||
// XXX: Replace this with a UI component for 500 errors. | ||
if (this.state.error) { | ||
return <h3>An error occured while loading the page.</h3>; | ||
return <h3>{t('An error occured while loading the page.', | ||
{ns: 'document_repository'})}</h3>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong namespace here too?
// Data loading error | ||
if (this.state.error) { | ||
return <h3>An error occured while loading the page.</h3>; | ||
return <h3>{t('An error occured while loading the page.', | ||
{ns: 'document_repository'})}</h3>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loris string
@@ -107,7 +112,7 @@ class DocEditForm extends React.Component { | |||
/> | |||
<SelectElement | |||
name="forSite" | |||
label="Site" | |||
label={t('Site', {ns: 'document_repository'})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loris namespace
@@ -116,35 +121,36 @@ class DocEditForm extends React.Component { | |||
/> | |||
<SelectElement | |||
name="instrument" | |||
label="Instrument" | |||
label={t('Instrument', {ns: 'document_repository'})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if it currently exists in the loris namespace but "Instrument" is a common loris term that should be in that namespace.
options={this.state.data.instruments} | ||
onUserInput={this.setFormData} | ||
value={this.state.docData.instrument} | ||
/> | ||
<TextboxElement | ||
name="pscid" | ||
label="PSCID" | ||
label={t('PSCID', {ns: 'document_repository'})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loris namespace
onUserInput={this.setFormData} | ||
disable = {true} | ||
value={this.state.docData.pscid} | ||
/> | ||
<TextboxElement | ||
name="visitLabel" | ||
label="Visit Label" | ||
label={t('Visit Label', {ns: 'document_repository'})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loris namespace
if (this.state.error) { | ||
return <h3>An error occured while loading the page.</h3>; | ||
return <h3>{t('An error occured while loading the page.', | ||
{ns: 'document_repository'})}</h3>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loris namespace
options={this.state.data.fieldOptions.fileCategories} | ||
onUserInput={this.setFormData} | ||
required={true} | ||
value={this.state.formData.category} | ||
/> | ||
<SearchableDropdown | ||
name="forSite" | ||
label="Site" | ||
placeHolder="Search for site" | ||
label={t('Site', {ns: 'document_repository'})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loris namespace
@@ -124,40 +129,41 @@ class DocUploadForm extends Component { | |||
/> | |||
<SelectElement | |||
name="instrument" | |||
label="Instrument" | |||
label={t('Instrument', {ns: 'document_repository'})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loris namespace
options={this.state.data.fieldOptions.instruments} | ||
onUserInput={this.setFormData} | ||
value={this.state.formData.instrument} | ||
/> | ||
<TextboxElement | ||
name="pscid" | ||
label="PSCID" | ||
label={t('PSCID', {ns: 'document_repository'})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loris namespace
onUserInput={this.setFormData} | ||
value={this.state.formData.pscid} | ||
/> | ||
<TextboxElement | ||
name="visitLabel" | ||
label="Visit Label" | ||
label={t('Visit Label', {ns: 'document_repository'})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loris namespace
Hi @SKADE2303, please address @driusan comments, This are the same issues we disused in #9941. Correct me if I'm wrong but I think to remember we also had a meeting about it. This namespace issue have to be addressed in most of all PRs sent. Please take a careful look to each one again. Thank you. |
This PR is responsible for translating the module document_repository to different languages. Currently only 'Hindi' language is supported but other languages can be added as required.
Testing instructions (if applicable)