How do I get my new translator into Zotero standalone?
I just made a small change to a translator. I used Scaffold in Firefox which works nicely. Saved the new translator there (with a higher priority and a slightly changed name) and it is now available in Firefox.
However I do not use Firefox now. I use Chrome + Zotero standalone. How do I get the translator over there?
However I do not use Firefox now. I use Chrome + Zotero standalone. How do I get the translator over there?
I tried to find that information on the pages about web translators, but I did not. Is it just me, or? ;-)
I can't get it to work here now. In another post I told that the data directory in Firefox had been reset to the default. (I guess some update went bad.)
I changed it back in Firefox to the one I am using. And readded my web translator - which is just the Readability translator with some small changes. The translator works as expected in Firefox (both using Standalone and the plugin version), but in Chrome I get the old translator.
I set the new translator priority to 99. The old has priority 100. Since it works in Firefox that should not be the problem... ;-)
I have restarted both browsers and Zotero standalone. And I am a bit confused at the moment.
Obviously this isn't a general issue, I've done this many times.
Comparing the code in the "translators/" directory I see one difference beside my changes:
"browserSupport": "gcsibv",
The "v" is lacking in my version. I have no idea why and I have no idea at the moment what it stands for.
Can I just change the code of my version (with my editor), or?
Can't tell you why this isn't working - not a general issue, obviously. You can try what happens if you move the old translator out of the directory, you can try restarting the computer.
I am not sure I can reproduce it, but this is what I have seen so far.
- The problem above persisted after rebooting my PC. (Windows 7 pro)
- When i moved the old Readability.js out of the translators directory got my version was choosen (as expected).
- When I moved the old version back to the translators directory my version was still choosen (which is kind of correct since it has lower priority).
- Restarting both Chrome and Zotero standalone did not change this, i. e. my translator was still choosen.
Any suggestions?
Generally, I'd suggest using the term "bug" a little less liberally - it has a specific meaning and applying it to every situation where something isn't working for you is going to rub people the wrong way.
Frankly, it's a lot more likely that you did something odd - (I just tried this and it works as expected) - since otherwise, as I say above, new translators in Chrome wouldn't update more generally.
What you describe is exactly what would happen, though, with two translators with the same translatorID, so I still think it's that's the most likely thing that happened.
First my translator was not selected. Moving the old one out and restarting Chrome and Zotero made it select my translator. After moving the old back and restarting Chrome and Zotero my translator was still selected.
Yes, Chrome might be involved, of course, but as I said I emptied both the cache and site cookies there. I just do not know if Zotero standalone might do some caching. (I suppose it is written using the framework from Firefox, or?)
I do a lot of mistakes. It is kind of a habit ;-) (since I do a lot of things), but I can't explain what I saw above with my mistakes.
You have a good point when you say that the problems I have seen does not generally occur. Perhaps the problem has to do with my switching between Chrome and Firefox? If you are more used to developing translators than I am you probably do not do that switching to Firefox+Scaffold.
Please post both of your translators to gist.github.com
https://gist.github.com/lborgman/9711515
(It is not ready. I just installed Readability and is exploring it.)
All I did was closing Zotero Standalone and opened Firefox+Scaffold. Opened my new version of the translator there. Run a test on a new site where it did not work.
Closed Firefox+Scaffold. Restarted Chrome and started Zotero Standalone.
I will test again to see if I can make it reproducible, but I do not have time right now.
Switched back to the first page where old translator was selected (after restarting, see above). Reloaded the page and clicked the Readability button. Now my new translator was selected.
Note: The pages were on different tabs in Chrome.
Wonder what happens. I use the Clear Cache plugin in Chrome to emtpy cache. It can clear a lot more things, but I have just selected "Cache" - since I do not understand what most of the other options are for.
There are "App cache", "Cache", "Cookies", "Downloads", "File Systems", "Form Data", "History", "Indexed DB", "Local Storage", "Plugin Data", "Passwords", and "WebSQL". Maybe those are involved? But how is Firefox+Scaffold involved then.
I will keep an eye on this. Some more info is welcome if anyone knows or have a good guess.