<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<instruction xmlns="http://www.across.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.across.net instructions.xsd">
  <!--[required] The list of the documents that should be imported by the connector-->
  <files>
    <!--[required] Information about documents to process. This element can occur multiple times.
    [translate5-mapping] Files will be imported into one single translate5 project with one task per target language.
      
      [required] name: name and relative path of the file
      [optional] workflow: name ofthe workflow to use, spelled exactly as in across, if omitted the default workflow will be used
      [translate5-mapping] If workflow attribute is specified, it should contain the current name of the across workflow, that should be used. It needs to be mapped to a translate5 workflow. This will be done through the workflow name in translate5. So it must be ensured, that we configure workflows in our workflow table, that have the same name as they had in Across. No additional coding needed for the mapping therefore.
      If no workflow is specified, the default translate5 workflow for this client will be selected. If a workflow is specified, but can not be found, the default workflow for this client is selected and a warning is logged to the import log. Since translate5 only knows one workflow setting per project, the workflow setting of the first listed file is chosen for the complete project. The rest of the workflow settings of the following files are ignored.
      
      [optional] deadline: date format: YYYY-MM-DD the maximum of all deadline values is used to compute the project deadline,
                 it is currently not possible to set different deadlines for each document.
                 A different format can be specified in the connector config.
	  [translate5-mapping] If deadline is set on file level, the deadline of the first file where a deadline is set is used for the complete project. If no deadline on file level is set, the deadline set on project level in the instruction.xml is used. If this also does not exist, the translate5 default deadline settings will be applied.
	  
      [optional] template: the document settings template to use, spelled exactly as in across. Please note that the document settings template mus exist for the document type used for checkin.
      [translate5-mapping] If template attribute is specified, it should contain the current name of the across file conversion template, that should be used. It needs to be mapped to a translate5 file conversion collection. To ensure this, the translate5 file conversion collection ("bconf") needs to be named exactly as the one used in the instruction.xml. No mapping is needed therefore. If no template is specified, the default translate5 template for this client will be selected. If a template is specified, but can not be found in the config mapping, the default translate5 file conversion settings for this client are selected and a warning is logged to the import log. Since translate5 only knows one file conversion collection setting per project, the template setting of the first listed file is chosen for the complete project. The rest of the template settings of the following files are ignored.
      
      [optional] doctypeguid: GUID of the document type (Tagged XML = 90A1C774-51B3-4858-93E3-58B65AD90362), if omitted the document type is detected from the file extension.
      [translate5-mapping] Ignored
      
                 Please refer to across -> system settings -> document associations to see which document type is used as default type for a file extension.
      [optional] preprocessing: spcify a set of pre and post processing scripts defined in the connector configuration
      [translate5-mapping] Ignored
      
    -->
    <file name="Project1\Project1SourceFile1.xml" workflow="Translation and correction" deadline="2015-08-13" template="default" doctypeguid="90A1C774-51B3-4858-93E3-58B65AD90362" preprocessing="noAction" />
    <file name="Project1\Project1SourceFile2.xml" workflow="Translation and correction" deadline="2015-08-13" template="default" doctypeguid="90A1C774-51B3-4858-93E3-58B65AD90362" preprocessing="noAction" />
    <file name="Project2\Project2SourceFile2.xml" workflow="Translation, review, correction" deadline="2015-08-13" template="default" doctypeguid="90A1C774-51B3-4858-93E3-58B65AD90362" preprocessing="noAction" />
  </files>
  <!--[optional] Information about the project to create. If omitted the project name will be detected from the parent folder name.
    [required] name: name of the project to create
    [translate5-mapping] name of the project and of the tasks to create
    
    [optional] deadline: date format: yyyy-MM-dd HH:mm 
	[translate5-mapping] used as specified above at the deadline settings of the files
               
    [optional] projectsettings: name of the project settings tempalte exactly as spelled in across
    [translate5-mapping] ignored
    
    [optional] mode: default mode: released projects with automatic assignment of tasks
                     supported values:
                       released                    projects are released and configured assignments are used
                       unreleased                  projects are not released, configured assignments will be ignored
                                                   note: project creation of these projects is reported via cost estimation notification.
                       passthroughpretranslation   temporary project created that is immediately checked out with the results from the pretranslation in across.
                                                   note: behaviour of the checkout depends on the across version.
                       costestimation              temporary project that is not visible in across. Used to generate an MDR report and send a cost estimation notification.
    [translate5-mapping] ignored. All values except "unreleased" could be implemented later, if needed. 
                       
    [optional] checkout: default checkout granualrity: checkout when project is finished.
                         supported values:
                           project                 checkout of all results when project is finished
                           projectlanguage         checkout when for one target language this language is finished in all documents that have the target language.
                                                   Data will not be checked out again at a later time.
                                                   A checkout may contain multiple target languages.
                           document                checkout of documents when all target languages of the document are finished.
                                                   Data will not be checked out again at a later time.
                                                   A checkout may contain multiple documents.
                           documentlanguage        checkout when a target language of a document is finished.
                                                   Data will not be checked out again at a later time.
                                                   A checkout may contain different target languages from multiple documents.
   [translate5-mapping] only values "project" and "projectlanguage" are implemented. Other values will be ignored and instead "projectlanguage" will be used as default.
  -->
  <project name="CrossConnect_extended_instructions" deadline="2015-08-13 23:00" projectsettings="Default" mode="released" checkout="projectlanguage">
    <!--[optional] relation to use for the project
      [required] name: name of the relation exactly as spelled in across
      [translate5-mapping] ignored.
    -->
    <reference name="customer trials"/>
    <!--[optional] project management user,
                   if omitted the default project manager will be used,
                   this tag can occurr multiple times. 
      [required] name: login name of the across user
      [translate5-mapping] translate5 looks for a user with that login name and uses it, if found. Else if e-mail for the PM is defined in the instruction.xml and is valid email, the PM user will be created. Else the default user as set in the translaate5 sys-Config (need to be provided by the plugin) is used. Implement analogous to runtimeOptions.plugins.TermPortal.termsTransferDefaultPM. Contact Pavel for more info.
      
      [optional] email: email adress for project created and project finished notifications.
     
    -->
    <projectmanager name="crossconnect.arbortext" email="projectmanager@instruction.xml" />
    <!--[optional] subject to use for the project, if omitted the default subject (for example "General" will be used)
    [translate5-mapping] is used to find the client of the project within translate5. If not set, the defaultcustomer will be used in translate5.
    
      [required] name: name of the (main) subject
      [translate5-mapping] needs to be mapped to a translate5 client number. If not found, the defaultcustomer will be used in translate5.
      [optional] subname: name of the sub subject
      [translate5-mapping] ignored
    -->
    <topic name="General"/>
    <!--[optional] custom attribute to assign to the project, this element can occurr multiple times
    [translate5-mapping] ignored
    
      [required] name: name of the attribute to assing, exactly as spelled in across
    -->
    <attribute name="Custom">
      <!--[required] value to assign to the project, this element can occur multiple times
        Please note that specifying multiple values for a single value attribute will not cause an error.
      -->
      <value>Overlarge</value> 
      <value>Heavy</value> 
    </attribute>
    <!--[optional] The project description in across.
    [translate5-mapping] identical usage. If it exists, its value will be set as project description in translate5.
    
    -->
    <projectdescription>This is a description.</projectdescription>
    <!-- [optional] Files to attach, can occur multiple times
    [translate5-mapping] ignored. Use DocReferenceFiles instead
    
      [required] path: path of the file to attach
    -->
    <attachment path="attachment1.docx" />
    <attachment path="attachment2.docx" />
    <attachment path="attachment3.docx" />
    <!-- [optional] Folder containing files to attach
          The connector will attach all files in this folder, it will consider files in subdirectories
          can occur multiple times
	  [translate5-mapping] identical usage. To add: If the attachment is a PDF, if will be used as visual source instead of attaching it.
	  
      [required] path: path of the folder
    -->
    <attachmentfolder path="DocReferenceFiles" />
    <!-- [optional] Project contact emails to use as receivers for cost estimation, project created, project finished and checkout notifications,
                    this tag can occurr multiple times
      [translate5-mapping] ignored. The needed people will be set by default as "visitors" for the client in question in translate5 and this way will receive an e-mail notification with every finished workflow step and with the initial assignment
      => Must be tested in translate5, if this works out of the box, or if something needs to be implemented to make it work
                    
      [required] email: email to send notifications to
      [optional] cconly: flag that indicates that the email should be set cc instead of to (default falue is false, meaningthe email is set as to)
    -->
    <projectcontact email="asdf@asdf.de" />
    <projectcontact email="asdf@qwert.de" cconly="true" />
  </project>
  <!--[required] source language of the documents to check in
  [translate5-mapping] identical usage
  
  -->
  <source>
    <!--[required]-->
    <language>
      <!--[required] definition of the source language-->
      <languageDef>
        <!--[required] defines the language as LCID. -->
        <LCID>
          <!--[required] the LCID of the language
          [translate5-mapping] identical usage
          
          -->
          <id>1033</id>
        </LCID>
      </languageDef>
    </language>
  </source>
  <!-- [required] defines the target languages that should be used for the documents
  [translate5-mapping] identical usage
  
  
    [optional] autostore: Specifies whether to store 100% pretranslations directly to paragraphs or not
    please note that this value is ignored by the connector.
    [translate5-mapping] ignored. We will always use the translate5 default setting and its client overwrite to determine pre-translations.
    
  -->
  <target autostore="true">
    <!--[required] This tag can occur multiple times
    [translate5-mapping] identical usage
    -->
    <language>
      <languageDef>
        <!--[required] defines the language as LCID.-->
        <LCID>
          <!--[required] the LCID of the language
          [translate5-mapping] identical usage
          
          -->
          <id>1031</id>
        </LCID>
      </languageDef>
      <!--[optional] server elements to specify trusted servers to assign to the tasks
      [translate5-mapping] ignored
      
        [required] name: name of the crossGrid server, exactly as spelled in across
        [required] task: name of the task to assign, exactly as spelled in across
        [optional] email: aditional email address to use for the server
        [optional] template: crossGrid packaging template to use.
            If omitted the configured default crossgird packaging template is used.
        
        please note: crossGrid packages can only contain consecutive tasks.
        In case of a workflow with an internal review step and follow up steps
        that are assigned to a server the connector will wait until all documents
        of a target language are ready to be asigned back to the server.
        Only then will the tasks be assigned and a new crossGrid package built.
        Please do not asign the unassigned tasks manually while the connector is waiting.
        
        Please also note that the connector only supports waiting a one place in the workflow.
        It is therefore not possible to assign  the first task to a user, assign the second task to a server,
        assign the third task to a user, and then assgin a fourth task to a server again.
      -->
      <server name="XYZ" task="Document translation" email="xyz@server.mail" template="Default" />
      <!--[optional] user elements to specify across users to assign to the tasks
      [translate5-mapping] ignored. Could be implemented, but to use client specific pre-sets in translate5 is better option.
      
        [required] name: login of the across user
        [required] task: name of the task to assign, exactly as spelled in across
        [optional] email: aditional email address to use for the user
      -->
      <user name="test.translator" task="Document review" email="testuser@instruction.xml" />
      <!--[optional] crowd elements to specify across crowds to assign to the tasks
      [translate5-mapping] ignored. Could be implemented, but to use client specific pre-sets in translate5 is better option.
      
        [required] name: name of the across crowd, exactly as spelled in across
        [required] task: name of the task to assign, exactly as spelled in across
        [optional] email: aditional email address to use for the crowd
      -->
      <crowd name="test crowd" task="Document correction" email="testcrowd@instruction.xml"/>
    </language>
  </target>
  <meta />
</instruction>
