Please sync with Zotero's translator repo to apply https://github.com/zotero/translators/commit/11e78eaa8b290d3f9925593089a745aa9f1cf6c7.
Description
Details
| Subject | Author | Repo | Branch | Lines +/- | |
|---|---|---|---|---|---|
| Update translators from upstream to cd5557ae | Mvolz | mediawiki/services/zotero/translators | master | +5 K -2 K |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Sebastian_Berlin-WMSE | T187023 Create Zotero translator for sverigesradio.se | |||
| Resolved | Mvolz | T188893 Add translator for sverigesradio.se to MW translator repo |
Event Timeline
@Sebastian_Berlin-WMSE I don't work directly on Citoid, so I'm afraid I don't know. Hopefully @Mvolz can help you.
Change 421271 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/services/zotero/translators@master] Update translators from upstream to cd5557ae
I've submitted an update, @mobrovac from Services usually does deploy. FYI you can test translators locally: https://www.mediawiki.org/wiki/Citoid#Install_and_configure_Zotero's_translation_server. Just pop your translator in the translator folder to test. If it works with translation-server, it will work in production with citoid. It's really only sites that require log-in that it doesn't work with, or if you don't have the 'v' flag. Although sometimes weird cookie stuff happens too that makes it not work.
Thanks for developing translators! Did you use https://www.mediawiki.org/wiki/Citoid/Creating_Zotero_translators at all?
Thanks you, @Mvolz. Yes, I did use the instructions on MW-wiki, in combination with the Zotero documentation.
I initially tried the translation-server, but I had some trouble getting it to work (I don't recall what the issue was). I ended up using Scaffold for development and testing of translators.
Great, let me know if you have any suggestion on how to improve it! I have added some additional installation instructions at the bottom already).
Change 421271 merged by Mobrovac:
[mediawiki/services/zotero/translators@master] Update translators from upstream to cd5557ae
Mentioned in SAL (#wikimedia-operations) [2018-03-22T13:29:05Z] <mobrovac@tin> Started deploy [zotero/translators@1c30955]: Update translators - T188893
Mentioned in SAL (#wikimedia-operations) [2018-03-22T13:29:13Z] <mobrovac@tin> Finished deploy [zotero/translators@1c30955]: Update translators - T188893 (duration: 00m 08s)
Is there anything else that needs to be done for this change to take effect? The reference information is still wrong for e.g: https://sv.wikipedia.org/api/rest_v1/data/citation/zotero/https%3A%2F%2Fsverigesradio.se%2Fsida%2Fartikel.aspx%3Fprogramid%3D83%26artikel%3D6865752.
There are some (sporadic) failures due to timeout over at https://zotero-translator-tests.s3.amazonaws.com/index.html, but that seems to be the case for several translators.
It's in the repo and deployed, but yes, there does seem to be a problem with it.
When I query my local copy of translation-server I'm getting
[{"itemType":"webpage","creators":[{"firstName":"Sveriges","lastName":"Radio","creatorType":"author"}],"notes":[],"tags":[],"title":"H�r duschas de �ldre av en robot - Nyheter (Ekot)","url":"http://sverigesradio.se/sida/artikel.aspx?programid=83&artikel=6865752","abstractNote":"I Karlstad har �ldreomsorgen b�rjat anv�nda en duschrobot.","language":"sv","accessDate":"CURRENT_TIMESTAMP"}]
So translation-server *does* recognise it, but *isn't* setting the itemType correctly or getting the author.
Full output:
zotero(5)(+0788517): POST /web HTTP/1.1
content-type: application/json
host: 127.0.0.1:1969
content-length: 136
Connection: keep-alive
zotero(3)(+0000001): Translators: Looking for translators for https://sverigesradio.se/sida/artikel.aspx?programid=83&artikel=6865752
zotero(3)(+0000000): Loading https://sverigesradio.se/sida/artikel.aspx?programid=83&artikel=6865752
zotero(5)(+0000000): CookieSandbox: Managing cookies for sverigesradio.se
zotero(5)(+0000001): CookieSandbox: Added cookies for request to sverigesradio.se
zotero(5)(+0000161): CookieSandbox: Being paranoid about channel for ocsp.digicert.com
zotero(5)(+0000000): CookieSandbox: Cleared cookies to be sent to ocsp.digicert.com
zotero(5)(+0010008): CookieSandbox: Being paranoid about channel for crl4.digicert.com
zotero(5)(+0000000): CookieSandbox: Cleared cookies to be sent to crl4.digicert.com
zotero(5)(+0005090): CookieSandbox: Being paranoid about channel for crl4.digicert.com
zotero(5)(+0000120): CookieSandbox: Being paranoid about channel for crl3.digicert.com
zotero(5)(+0000000): CookieSandbox: Cleared cookies to be sent to crl3.digicert.com
zotero(5)(+0000076): CookieSandbox: Being paranoid about channel for crl3.digicert.com
zotero(5)(+0000061): CookieSandbox: Being paranoid about channel for ocsp.digicert.com
zotero(5)(+0000000): CookieSandbox: Cleared cookies to be sent to ocsp.digicert.com
zotero(5)(+0010094): CookieSandbox: Managing cookies for sverigesradio.se
zotero(3)(+0000006): Translators: Looking for translators for https://sverigesradio.se/sida/artikel.aspx?programid=83&artikel=6865752
zotero(4)(+0000000): Translate: Binding sandbox to https://sverigesradio.se/sida/artikel.aspx?programid=83&artikel=6865752
zotero(4)(+0000001): Translate: Parsing code for Library Catalog (InnoPAC)
zotero(4)(+0000001): Translate: Parsing code for unAPI
zotero(4)(+0000002): Translate: Parsing code for COinS
zotero(4)(+0000000): Translate: Parsing code for Embedded Metadata
zotero(3)(+0000006): Translate: Embedded Metadata: found 22 meta tags.
zotero(3)(+0000008): Translate: Creating translate instance of type import in sandbox
zotero(4)(+0000000): Translate: Binding sandbox to https://sverigesradio.se/sida/artikel.aspx?programid=83&artikel=6865752
zotero(4)(+0000002): Translate: Parsing code for RDF
zotero(3)(+0000001): Translate: Initializing RDF data store
zotero(3)(+0000003): Translate: All translator detect calls and RPC calls complete
zotero(5)(+0000000): Translate: Running handler 0 for translators
zotero(4)(+0000000): Translate: Parsing code for Embedded Metadata
zotero(3)(+0000003): Translate: Beginning translation with Embedded Metadata
zotero(3)(+0000003): Translate: Embedded Metadata: found 22 meta tags.
zotero(3)(+0000004): Translate: Creating translate instance of type import in sandbox
zotero(4)(+0000000): Translate: Binding sandbox to https://sverigesradio.se/sida/artikel.aspx?programid=83&artikel=6865752
zotero(4)(+0000001): Translate: Parsing code for RDF
zotero(3)(+0000002): Translate: Initializing RDF data store
zotero(5)(+0000005): Translate: Running handler 0 for itemDone
zotero(3)(+0000009): Translate: Translation successful
zotero(5)(+0000000): Translate: Running handler 0 for done
zotero(3)(+0000000): itemToServerJSON: Discarded field libraryCatalog: field not valid for type webpage
zotero(5)(+0000000): HTTP/1.0 200 OK
Content-Type: application/json
[{"itemType":"webpage","creators":[{"firstName":"Sveriges","lastName":"Radio","creatorType":"author"}],"notes":[],"tags":[],"title":"H�r duschas de �ldre av en robot - Nyheter (Ekot)","url":"http://sverigesradio.se/sida/artikel.aspx?programid=83&artikel=6865752","abstractNote":"I Karlstad har �ldreomsorgen b�rjat anv�nda en duschrobot.","language":"sv","accessDate":"CURRENT_TIMESTAMP"}]And you're correct, the live tests do appear to be working. I think it's plausible that the discrepancy is down to the outdated version of translation-server we're running :/.
Is this something that will be fixed soon? If not, could you tell me what version of the translation-server that is currently used by Citoid, so that I can make the translator compatible.
Unfortunately no :/ T140539
If not, could you tell me what version of the translation-server that is currently used by Citoid, so that I can make the translator compatible.
I've added a bit about it:
Unfortunately this is the first time I've heard of a translator not being compatible with older versions - it was a possibility but it hadn't come up yet. If so this means using the older version of translation-server will be increasingly problematic (as it is already!)
I think I've found the culprit: whatever Javascript that is running in the version that Citoid uses doesn't support String.includes (which is used in the Zotero template):
zotero(2)(+0000001): Translate: Detect using Sveriges radio failed: fileName => Sveriges radio lineNumber => 44 columnNumber => 0 string => TypeError: url.includes is not a function stack => detectWeb@Sveriges radio:44
This broke the detection; not sure why you didn't get that error, @Mvolz.
I've fixed this and made a pull request to Zotero's translator repo (https://github.com/zotero/translators/pull/1609). I'll reopen this task once that is done.