-
Notifications
You must be signed in to change notification settings - Fork 447
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
Submission and metadata languages separated from UI and form languages #9309
Conversation
jyhein
commented
Sep 18, 2023
- In Website Settings > Setup > Languages and in Administration > Hosted Journals > Settings Wizard > Journal Settings > Languages, separate Website Languages and Submission Languages settings. In the website languages are UI and Forms, and in the submission languages are submission and metadata.
- Submission metadata can be edited even if metadata isn't checked in that language in the settings.
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.
@jyhein, great work!
There are so many changes, so I am not sure I deeply understood/covered them all.
I would like to test it all, and then maybe take another look once you go over these comments.
Some questions might be also only for me to understand better, thus feel free to comment...
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 few more comments
@jyhein, you would also need to implement a migration script for the upgrade, that will consider the current/old site and journal submission language settings and save them using the new settings names. |
Hey @bozana, |
@jyhein, I will then take a new look at it all... Thanks a lot! |
b27a82c
to
ed48bba
Compare
classes/migration/upgrade/v3_5_0/I9425_SeparateUIAndSubmissionLocales.php
Outdated
Show resolved
Hide resolved
classes/migration/upgrade/v3_5_0/I9425_SeparateUIAndSubmissionLocales.php
Outdated
Show resolved
Hide resolved
controllers/wizard/fileUpload/form/SubmissionFilesMetadataForm.php
Outdated
Show resolved
Hide resolved
Hi @jyhein, I have tested a few cases and find out some cases we have not considered yet. I think that in the same way as you consider author languages in Publication::getLanguages() also other objects needs to be considered: Currently citations i.e. the DB table citation_settings seems not to be important. I think the same locales concept needs to be considered also for/in the submission wizard. I wanted to double check a few other things -- for example the new param publicationId for vocabs API -- but maybe I will leave it for later, once we solved these few comments. Thanks a lot, great work! 🙏 ❤️ |
One more case, I have just find out: |
2ad90cd
to
12f38c2
Compare
$primaryLocale = $request->getContext()->getPrimaryLocale(); | ||
$allowedLocales = $request->getContext()->getData('supportedSubmissionLocales'); | ||
$submissionLocale = $submission->getData('locale'); | ||
$allowedLocales = $request->getContext()->getSupportedSubmissionMetadataLocales(); |
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.
@jyhein, do you know where is this function used? -- I wanted to test, but I do not know...
EDIT: I am wondering why do we not need getPublicationLanguages() here...
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 left this comment for me, to investigate further... :-)
4876821
to
104d125
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.
Hi @jyhein,
I went through the code. Really good work!
I think here a I have only one question :-)
Thanks a lot!
Hi @jyhein, And: The fully new files created by you should now have 2024 instead of 2023 in copyright in header :-) |
6162eee
to
fa0dbc6
Compare
classes/migration/upgrade/v3_5_0/I9425_SeparateUIAndSubmissionLocales.php
Outdated
Show resolved
Hide resolved
Hi @jyhein, I went through the changes. All great! Just a few comments are left (FormValidatorCustom in OJS and OPS, and TABLE_SCHEMA in the upgrade script).
I have spoken with @ajnyga: Thanks a lot! |
d6c1acd
to
2dc8523
Compare
classes/migration/upgrade/v3_5_0/I9425_SeparateUIAndSubmissionLocales.php
Outdated
Show resolved
Hide resolved
…m website language settings