Skip to content
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

[OMP] ONIX extract reports different authorship metadata depending on the user's language #9784

Closed
asmecher opened this issue Mar 8, 2024 · 9 comments
Assignees
Milestone

Comments

@asmecher
Copy link
Member

asmecher commented Mar 8, 2024

Describe the bug
The ONIX extract from OMP detects author roles in a way that's dependent on the exporting user's language selection.

It uses the user group abbreviation (typically AU for Author, for example) to determine the mapping to ONIX's role codes (e.g. A01 for author). However, it looks up the abbreviation based on the current locale; if that's not English, the abbreviation is not likely to be AU.

It would be better still to use something that's not dependent on localized data or defaults, but that may have to wait for another mechanism (e.g. CRediT) to be integrated.

To Reproduce
Steps to reproduce the behavior:

  1. Set up the Masthead settings in order to get ONIX exports working
  2. Set up the press with at least two UI languages
  3. Switch the UI to English
  4. Go to Tools > ONIX 3.0 Monograph Export Plugin and export a single submission
  5. Check the generated XML for the contributor role in the XML: <ContributorRole>A01</ContributorRole>
  6. Switch the UI to another language and re-generate the XML as per step 4
  7. Check the generated XML for the contributor role in the XML: <ContributorRole>Z99</ContributorRole>

The two extracts should not differ depending on the UI locale.

What application are you using?
OMP 3.3.0-x and 3.4.0-x

@kaitlinnewson kaitlinnewson moved this to In Progress in DOAB / OMP Data Exchange Jun 18, 2024
@asmecher
Copy link
Member Author

Thanks, @kaitlinnewson! Actually, I'll pass this over to @bozana for review. Bozana, could you have a look?

@asmecher
Copy link
Member Author

@kaitlinnewson, rather than keep you waiting -- the change you've proposed doesn't resolve the issue, which is that we're hard-coding tests against user-entered (localized) data. The English-language abbreviation for the Author role might be Au, but the press might not even have English installed, or may have customized the values using the setup fields.

It's not a perfect solution, but you could try using the user group setting called nameLocaleKey, which you'll see stored in the user_group_settings table; for authors, for example, it'll be default.groups.name.author. These are installed based on registry/userGroups.xml, if you're wondering where they come from.

@kaitlinnewson
Copy link
Member

Thanks @asmecher, ready for a second look now

@kaitlinnewson
Copy link
Member

Ready for another review @bozana. If everything looks good, I'll work on PRs to 3.4/main.

bozana added a commit to pkp/omp that referenced this issue Jun 25, 2024
pkp/pkp-lib#9784 get unlocalized authorship metadata in onix export
@bozana
Copy link
Collaborator

bozana commented Jun 25, 2024

Hi @kaitlinnewson, great! I have merged the PR for stable-3_3_0 and you can proceed with other branches.
Thanks a lot!

@kaitlinnewson
Copy link
Member

@bozana the other branch PRs are listed above and ready for review

@bozana
Copy link
Collaborator

bozana commented Jun 26, 2024

Hi @kaitlinnewson, this looks good to me, I am just waiting to see if that one MariaDB test will pass...

bozana added a commit to pkp/omp that referenced this issue Jun 26, 2024
pkp/pkp-lib#9784 get unlocalized authorship metadata in onix export
bozana added a commit to pkp/omp that referenced this issue Jun 27, 2024
pkp/pkp-lib#9784 get unlocalized authorship metadata in onix export
@bozana
Copy link
Collaborator

bozana commented Jun 27, 2024

Thanks a lot @kaitlinnewson!
All merged, thus closing the issue...

@bozana bozana closed this as completed Jun 27, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in DOAB / OMP Data Exchange Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants