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
base: master
Are you sure you want to change the base?
Conversation
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 couple of nits, one question for you, one for @AbeJellinek ; otherwise this does look straightforward, yes.
Public Record Office Victoria.js
Outdated
item.date = startDate; | ||
} | ||
else { | ||
item.issued = startDate + "/" + endDate; |
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.
@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.
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 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
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 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.
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.
And we should use that for archive-place
as well. ("Archive Place: "
should work.)
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.
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.
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.
No, I guess not, assuming that actually works everywhere.
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.
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.
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'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.
I think this is ready to go now? |
OK, made a couple nitpicky formatting/regex changes. A few remaining things:
|
Oh, and
|
New translator for checking. I think it's pretty straightforward as the metadata is all coming from their public API. Thanks!