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

Add translator for Public Record Office Victoria #3233

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wragge
Copy link
Contributor

@wragge wragge commented Jan 21, 2024

New translator for checking. I think it's pretty straightforward as the metadata is all coming from their public API. Thanks!

Copy link
Collaborator

@adam3smith adam3smith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of nits, one question for you, one for @AbeJellinek ; otherwise this does look straightforward, yes.

Public Record Office Victoria.js Outdated Show resolved Hide resolved
Public Record Office Victoria.js Outdated Show resolved Hide resolved
Public Record Office Victoria.js Outdated Show resolved Hide resolved
item.date = startDate;
}
else {
item.issued = startDate + "/" + endDate;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AbeJellinek -- could you weigh in on this. This will work (i.e. write the string to Extra), but I'm not sure how comfortable we are using this behavior in translators.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going on what has been recommended in the forums for date ranges. Eg: https://forums.zotero.org/discussion/63073/date-year-range and https://forums.zotero.org/discussion/105949/date-range

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will work everywhere? But it's safer (and more indicative of the final result) to do

item.extra = (item.extra ? item.extra + "\n" : "") + "Issued: " + startDate + "/" + endDate;

Even though that is definitely more verbose.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we should use that for archive-place as well. ("Archive Place: " should work.)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I was referring to using item.issued to putting this into Extra -- the approach to date ranges using Extra is definitely right.

I kind of like the less verbose version using item.issued -- is there actually a reason not to do this? will also be much faster to convert if we do get a better date field.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I guess not, assuming that actually works everywhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to, although it translates archive-place to Archive-place, which is a little uglier than if we added it to Extra manually as Archive Place. That's arguably a client bug, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed all the extra additions to use the more verbose form. I also changed series to Archive Collection to be in line with CSL.

Public Record Office Victoria.js Outdated Show resolved Hide resolved
@wragge
Copy link
Contributor Author

wragge commented Jan 31, 2024

I think this is ready to go now?

@AbeJellinek
Copy link
Member

OK, made a couple nitpicky formatting/regex changes.

A few remaining things:

  1. I'm not sure we want to set the Library Catalog to something containing "API" - that field isn't really used in most citation styles, but it's still a little confusing and not really relevant. The default (the translator label) is fine.
  2. "Download file as PDF" - "Full Text PDF"? For consistency.
  3. Is the manifest useful? We don't normally attach machine-readable-only files in translators. We could put it behind a hidden pref, but it seems to me like the sort of thing that you'd attach manually if you wanted it.

@AbeJellinek
Copy link
Member

Oh, and

  1. If we're attaching the PDF, why attach the image? Are the PDFs often very large? (I'm not confident that snapshot: false will prevent a non-text/html attachment from being attached...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants