Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Allow translator lazy-loading #1

Open
cprecioso opened this issue May 24, 2019 · 1 comment
Open

Allow translator lazy-loading #1

cprecioso opened this issue May 24, 2019 · 1 comment

Comments

@cprecioso
Copy link
Owner

cprecioso commented May 24, 2019

Currently, a preval-ed file gives Zotero access to all the translator files, directly loaded at launch. It'd be great to allow Zotero to request and load them when needed, instead of eagerly.

@cprecioso
Copy link
Owner Author

cprecioso commented May 24, 2019

Ideas:

  • Bring translators.js from translation-server into this module, and rewrite it to use requires instead of the fs module. This would mean managing more code in this project, which is originally intended as a thin shim on top of translation-server.

  • Write an accessor for the code property of the returned translator JSON, that dynamically requires the code of the translator. This means less work, but might not be as compatible or effective.

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

No branches or pull requests

1 participant