-
Notifications
You must be signed in to change notification settings - Fork 183
[dictionary] Translate dictionary module #9938
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
1d6075a
to
966b7e7
Compare
966b7e7
to
1e042ae
Compare
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.
A lot of these are ambiguous which namespace they should be in because many dictionary terms are shared with the dataquery module, but I commented on the ones that should almost certainly be moved.
if (this.state.error) { | ||
return <h3>An error occured while loading the page.</h3>; | ||
return <h3>{t('An error occured while loading the page.', |
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.
This is in in the loris namespace
@@ -224,7 +231,7 @@ class DataDictIndex extends Component { | |||
let options = this.state.data.fieldOptions; | |||
let fields = [ | |||
{ | |||
label: 'Module', | |||
label: t('Module', {ns: 'dictionary'}), |
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.
This should probably be in the loris namespace instead of the dictionary namespace as it's a common loris term but is currently not there.
'session': 'Session', | ||
'project': 'Project', | ||
'candidate': t('Candidate', {ns: 'dictionary'}), | ||
'session': t('Session', {ns: 'dictionary'}), |
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.
Session
should also probably be in the loris namespace but is currently missing. Candidate
is currently there.
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.
Should I change the namespace now and remove it from the .po and .pot file right now and later add them as part of loris.pot in a new PR?
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.
Yes, or just move them in this PR.
@@ -317,7 +324,7 @@ class DataDictIndex extends Component { | |||
}, | |||
}, | |||
{ | |||
label: 'Cohorts', | |||
label: t('Cohorts', {ns: 'dictionary'}), |
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
}, | ||
}, | ||
}, | ||
{ | ||
label: 'Visits', | ||
label: t('Visits', {ns: 'dictionary'}), |
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 don't see this in the loris namespace currently but I'd be surprised if it wasn't in other modules as well.
38ef29c
to
52173be
Compare
locale/loris.pot
Outdated
msgid "Visits" | ||
msgstr "" | ||
|
||
msgid "Cohorts" |
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.
since we have already Cohort
in singular, I would move the plural version just right after the singular one.
|
||
msgid "Many" | ||
msgstr "" | ||
|
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 don't think we need this extra empty lines at the end of this file.
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.
This PR is responsible for translating the module dictionary to different languages. Currently only 'Hindi' language is supported but other languages can be added as required.
Testing instructions (if applicable)