[SOLVED] TranslatorID for a custom translator

edited November 6, 2017
Hello,

I have just started using Zotero. I found a couple of translators, particularly one which works for me but I'd like to do small adjustments. Each translator has "translatorID" which is GUID.
First, I don't really know how developers obtain translatorID(s). Second, I am not sure if I really need it for my own custom translator. I noticed when I remove it, Zotero does not seem to detect it.

Can someone please give me a hand about it?

I could altered the original translator and overwrite it, keeping an original copy safe. The reason why I am asking about it is Zotero may overwrite changes, including translators and the one I have "tuned", if Zotero gets updated, which I would like to avoid.

English is not my first language. I hope my problem is clearly explained.

Thanks

  • Yes, it's needed. And yes, keeping the same ID will cause your translator to get overwritten.

    Developers generally generate the Translator IDs from Scaffold: https://github.com/zotero/scaffold
    Though I think any hexadecimal string which 8 - 4 -4 -4 - 12 digits will work. (Hexadecimal = 0-9a-f)
  • Thank you for your comment.

    I tried to add scaffold to zotero but it complains due to version problem. Since you have said translatorID is any hex string following random GUID format, I just used linux function "uuidgen -t" (i suppose built-in function) which simply generated a number based on current time.

    Now, both translators original and adjusted have different IDs so I understand I should not worry about something getting overwritten. Would you add anything else on that? I hope I have got everything right :)

    Thanks
  • no, that should be it.
  • I added solved to title because my question was answered but I realised I need to clarify one more issue.

    Hypothetically, someone has made a translator and created the same translatorID, what would happen? Would Zotero overwrite the addon? Is there any way to prevent from it?
  • Your chances of getting hit first by lightning and then by a meteorite are higher than the same UUID being generated & used for two Zotero translators.
  • edited November 6, 2017
    Right. That clarifies everything ;-)
    Thanks
  • edited November 6, 2017
    Much higher in fact: https://health.howstuffworks.com/diseases-conditions/death-dying/odds-of-death.htm would put lightning+meteorite at 0.000000014% lifetime chance (although https://news.nationalgeographic.com/news/2004/06/0623_040623_lightningfacts.html disagrees and increases your risk to 0.000000048%... better up your insurance), a 32-char guid would have a collision chance of approximately 0.00000000000000000000000000000000000029387358770557% (colloquially known as "really small").
  • (although it's not just Zotero fishing from this pool of course... but still...)
  • I can always rely on @emilianoeheyns to brighten my day ;-)
  • Framing that for proof. Many people do not believe a possible universe exists where that is plausibly true.
Sign In or Register to comment.