{"action":"created","issue":{"url":"https://api.github.com/repos/zotero/translators/issues/865","labels_url":"https://api.github.com/repos/zotero/translators/issues/865/labels{/name}","comments_url":"https://api.github.com/repos/zotero/translators/issues/865/comments","events_url":"https://api.github.com/repos/zotero/translators/issues/865/events","html_url":"https://github.com/zotero/translators/pull/865","id":61837773,"number":865,"title":"Split CTX translator into seperate web and import translator","user":{"login":"zuphilip","id":5199995,"avatar_url":"https://avatars.githubusercontent.com/u/5199995?v=3","gravatar_id":"","url":"https://api.github.com/users/zuphilip","html_url":"https://github.com/zuphilip","followers_url":"https://api.github.com/users/zuphilip/followers","following_url":"https://api.github.com/users/zuphilip/following{/other_user}","gists_url":"https://api.github.com/users/zuphilip/gists{/gist_id}","starred_url":"https://api.github.com/users/zuphilip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zuphilip/subscriptions","organizations_url":"https://api.github.com/users/zuphilip/orgs","repos_url":"https://api.github.com/users/zuphilip/repos","events_url":"https://api.github.com/users/zuphilip/events{/privacy}","received_events_url":"https://api.github.com/users/zuphilip/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-15T15:14:34Z","updated_at":"2015-03-15T18:46:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zotero/translators/pulls/865","html_url":"https://github.com/zotero/translators/pull/865","diff_url":"https://github.com/zotero/translators/pull/865.diff","patch_url":"https://github.com/zotero/translators/pull/865.patch"},"body":"I would like to ask for an opinion, whether this direction would be okay to go. Splitting web and import translator is an issue I have read about here.\r\n\r\nFor CTX it seems the easiest that the import translator is calling the web translator. I tried first the other way around, but became some problems with `selectItems` function call in the called translator.\r\n\r\nThe approach here (import translator calls web translator) solves the naming problem on import and looks easy to complete. However, I feel that ideally we would have it the other way (web translator calls import translator). Is it worth to spend (much) more time into CTX?"},"comment":{"url":"https://api.github.com/repos/zotero/translators/issues/comments/81193986","html_url":"https://github.com/zotero/translators/pull/865#issuecomment-81193986","issue_url":"https://api.github.com/repos/zotero/translators/issues/865","id":81193986,"user":{"login":"zuphilip","id":5199995,"avatar_url":"https://avatars.githubusercontent.com/u/5199995?v=3","gravatar_id":"","url":"https://api.github.com/users/zuphilip","html_url":"https://github.com/zuphilip","followers_url":"https://api.github.com/users/zuphilip/followers","following_url":"https://api.github.com/users/zuphilip/following{/other_user}","gists_url":"https://api.github.com/users/zuphilip/gists{/gist_id}","starred_url":"https://api.github.com/users/zuphilip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zuphilip/subscriptions","organizations_url":"https://api.github.com/users/zuphilip/orgs","repos_url":"https://api.github.com/users/zuphilip/repos","events_url":"https://api.github.com/users/zuphilip/events{/privacy}","received_events_url":"https://api.github.com/users/zuphilip/received_events","type":"User","site_admin":false},"created_at":"2015-03-15T18:46:19Z","updated_at":"2015-03-15T18:46:19Z","body":"Yes to your first question. The naming and some other stuff still would need more work.\r\n\r\nWhen the web translator is calling the import translator then we need to switch the second argument to be true, i.e `trans.doImportFromText(text, true);` in similar code. This will give the following error message in Scaffold:\r\n```\r\n19:40:16 Translation using CTX Import Translator failed: \r\n         string => TypeError: Zotero.selectItems is not a function\r\n         stack => doImportFromText@C:\\Users\\zumstein\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\1imy4lix.default\\zotero\\translators\\CTX.js:226:12\r\n         doWeb/<@CTX Import Translator:46:3\r\n         @chrome://zotero/content/xpcom/translation/translate_firefox.js:433:66\r\n         doWeb@CTX Import Translator:45:2\r\n         \r\n         url => http://freecite.library.brown.edu/citations/create\r\n         downloadAssociatedFiles => true\r\n         automaticSnapshots => true\r\n```"}}