translators icon indicating copy to clipboard operation
translators copied to clipboard

Add support for Kluwer Arbitration

Open thebluepotato opened this issue 9 months ago • 5 comments

Very alpha for now, but adds support for articles and books from Kluwer Arbitration. I should probably add blog posts at some point.

thebluepotato avatar Oct 16 '23 18:10 thebluepotato

The translator works for most documents found on Kluwer Arbitration, but not all options have been explored yet. In particular, I have not been able to run any tests within Scaffold because the JSON requests return null. I thought it was a VPN issues but the integrated browser follows redirections and displays the full document.

EDIT: apparently Scaffold does not use cookies correctly in Zotero 6, was able to use Zotero 7 to generate the test cases. Search is still WIP

thebluepotato avatar Oct 19 '23 23:10 thebluepotato

Ready for production IMO, however the linter seems to complain about the Nullish coalescing assignment (??=) on line 278...

thebluepotato avatar Oct 20 '23 13:10 thebluepotato

Hello, thank you for the contribution!

I'd be more than happy to test and review, but unfortunately I don't have access to the Kluwer Arbitration. So all I can do for now is to provide some comments about the coding itself.

Nullish coalescing assignment: This is an ES2020 feature, and the repo's ESLint config is set to ES2018. I don't think any other translator uses ?. and ?? yet, due to compatibility concerns.

zoe-translates avatar Oct 23 '23 07:10 zoe-translates

In fact, with the ?. and ?? in the code, ESLint fails to process the whole file at all. If you switch to the pre-ES2020 syntax, you'll find more lint warnings (missing semicolon etc.)

zoe-translates avatar Oct 23 '23 07:10 zoe-translates

Thank you so much @zoe-translates and @dstillman for your reviews! If all is ok now, when can we expect the PR to be merged?

thebluepotato avatar Oct 27 '23 01:10 thebluepotato