Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
dev:translators [2017/11/12 19:53] – external edit 127.0.0.1dev:translators [2017/12/07 13:47] – [Zotero Translators] bwiernik
Line 1: Line 1:
-<html><p id="zotero-5-update-warning" style="color: red; font-weight: bold">We’re 
-in the process of updating the documentation for 
-<a href="https://www.zotero.org/blog/zotero-5-0">Zotero 5.0</a>. Some documentation 
-may be outdated in the meantime. Thanks for your understanding.</p></html> 
- 
- 
 ====== Zotero Translators ====== ====== Zotero Translators ======
  
Line 13: Line 7:
 **Note:** Before writing a translator for a site, look at the [[dev:exposing_metadata|documentation on exposing metadata]]; website authors should try embedding the necessary metadata before attempting to write a translator. **Note:** Before writing a translator for a site, look at the [[dev:exposing_metadata|documentation on exposing metadata]]; website authors should try embedding the necessary metadata before attempting to write a translator.
  
-If you're looking for a broken translator to fix, see the [[https://repo.zotero.org/errors|recent translator errors]] and check on one of the top reported errors. You can also check the status of many translators by reviewing the [[dev:translators:testing#running_tests|translator test overview]].+If you're looking for a broken translator to fix, see the [[/errors|recent translator errors]] and check on one of the top reported errors. You can also check the status of many translators by reviewing the [[dev:translators:testing#running_tests|translator test overview]].
 ===== Translator Types - Web, Import, Export and Search ===== ===== Translator Types - Web, Import, Export and Search =====
  
Line 81: Line 75:
  
   * **[[dev:translators:coding#web_translators|Web translators]]**   * **[[dev:translators:coding#web_translators|Web translators]]**
-    * //detectWeb// \\ After a web translator has been selected based by its matching target and its priority ranking, ''detectWeb'' is run to determine whether item metadata can indeed be retrieved from the webpage. Should return the detected item type (e.g. "journalArticle", see the [[http://gsl-nagoya-u.net/http/pub/csl-fields/index.html|overview of Zotero item types]]), or, if multiple items are found, "multiple". If ''detectWeb'' does not return a value, the translator with the next-highest priority is selected, until all translators with a matching target have been exhausted.+    * //detectWeb// \\ After a web translator has been selected based by its matching target and its priority ranking, ''detectWeb'' is run to determine whether item metadata can indeed be retrieved from the webpage. Should return the detected item type (e.g. "journalArticle", see the [[https://aurimasv.github.io/z2csl/typeMap.xml|overview of Zotero item types]]), or, if multiple items are found, "multiple". If ''detectWeb'' does not return a value, the translator with the next-highest priority is selected, until all translators with a matching target have been exhausted.
     * //doWeb// \\ Performs the actual item metadata retrieval.     * //doWeb// \\ Performs the actual item metadata retrieval.
   * **[[dev:translators:coding#import_translators|Import translators]]**   * **[[dev:translators:coding#import_translators|Import translators]]**
Line 104: Line 98:
 ===== Contributing Translators ===== ===== Contributing Translators =====
  
-If you created or modified a translator and wish to have it added to Zotero, or are looking for support on writing translators, please drop note on the [[http://groups.google.com/group/zotero-dev|Zotero development mailing list]]. It is often best to post the source on a code sharing site like [[https://gist.github.com|Github]], so that it can be accessed easily. +If you created or modified a translator and wish to have it added to Zotero, or are looking for support on writing translators, please submit pull request to the [[https://github.com/zotero/translators/|Zotero Translators GitHub repo]]. You can also ask questions about translator development on [[http://groups.google.com/group/zotero-dev|Zotero development mailing list]].
- +
-There are two ways to submit translators for inclusion in Zotero: +
- +
-==== Submitting for Casual Coders ==== +
- +
-The easiest way to submit translators is post a link to your code on the [[http://groups.google.com/group/zotero-dev|Zotero development mailing list]] (do not paste the code directly into your message), using a code sharing website like http://gist.github.com. +
- +
-=== Using gist.github.com === +
- +
-Go to https://gist.github.com/ and copy and paste your translator code into the large text box. Enter the file name of the translator in the "name this file..." text box, and click the "Create Public Gist" button at the bottom of the page. Note that if you are using [[dev:translators:scaffold|Scaffold]] to develop translators, it is not sufficient to just copy the contents of the "Code" pane -- you will need to open the translator file, which you can find in the translators directory of your [[:zotero_data|Zotero data directory]]. +
- +
-Send a message to the [[http://groups.google.com/group/zotero-dev|Zotero development mailing list]]. In your message, ask for your translator to be uploaded to the repository, and provide the link to the Gist (copy the URL from the address bar, which should be in the form of ''<nowiki>https://gist.github.com/766801</nowiki>''. One of the Zotero developers or community members will review the code and add it to the repository. If you don't hear back within a week, feel free to post a reminder to the list.+
  
-==== Submitting for Frequent Contributors ====+To submit a pull request, fork the [[https://github.com/zotero/translators|Zotero Translator GitHub repository]], commit your changes (i.e., adding or modifying translator files), and create a [[http://help.github.com/pull-requests/|pull request]]. You can use your Git client of choice, but for new users we recommend [[http://www.syntevo.com/smartgit/index.html|SmartGit]], which is free for non-commercial purposes.
  
-While the process is slightly more complicated, you can also submit translators directly to the [[https://github.com/zotero/translators|Zotero translator repository]]. Fork the GitHub repositorycommit your changes, and create a [[http://help.github.com/pull-requests/|pull request]]. You can use your Git client of choice, but for new users we recommend [[http://www.syntevo.com/smartgit/index.html|SmartGit]], which is free for non-commercial purposes.+When you submit pull request on GitHub, your translator code will be reviewed, and you will receive comments from the Zotero developers or experienced volunteersOnce you've made any necessary changes, your translator will be added to the Zotero translator repository
  
 ==== Licensing ==== ==== Licensing ====
dev/translators.txt · Last modified: 2023/08/18 09:15 by zoe