How Smartcat HotFolder works

Smartcat HotFolder — Basic operations

You can do the following operations with a HotFolder projects:

  • push — add or update local files (selected by a mask) in the Smartcat account.
  • pull — export translations of local files from the Smartcat project.
  • sync — synchronize, i.e., "push" and then "pull".

You can start HotFolder from the command prompt or as a Windows service. In the former case, you have to specify the operation to be executed for all projects set for the current working directory. In the service mode, HotFolder will sync all configured projects automatically at regular intervals.

            In both cases, all connection, access and other critical errors are written to %PROGRAMDATA%\SmartCAT\HotFolder\ErrorLog.txt. 

Standard operation sequence

  1. HotFolder retrieves Smartcat project data based on the id set in the HotFolder configuration file.
  2. If another HotFolder instance is working on that project, the operation stops with an error.
  3. HotFolder executes the "pre" commands configured for that operation. If at least one command ends with a non-zero code, the operation stops with an error.
  4. HotFolder selects files meeting the filename masks configured for the project. If one file matches several masks, the operation stops with an error. If export paths are the same for several source files, or if the export path is the same as the path of one of the source files, the operation stops with an error. If no file is found, the operation ends.
  5. HotFolder runs the operation for the retrieved files.
  6. HotFolder executes the "post" commands configured for that operation. If at least one command ends with a non-zero code, the operation stops with an error.

Pushing files into a Smartcat project

  1. HotFolder classifies the selected files As non-updated, updated, moved, deleted, or requiring re-uploading.
  2. HotFolder deletes locally deleted files from the Smartcat project.
  3. For moved files, HotFolder only updates their locally stored statuses.
  4. For updated files, HotFolder updates their statuses in the Smartcat project.
  5. HotFolder checks if the update was successful. If HotFolder fails to update all the files before the configured timeout, the operation stops with an error.
  6. For files requiring re-uploading, HotFolder deletes them from the Smartcat project and uploads them again.
  7. HotFolder uploads new files to the Smartcat project.
  8. If you enabled uploading local translations during the first upload, HotFolder searches for files at the saved-translations paths and loads them as translations for all files that were uploaded and successfully parsed.
  9. HotFolder checks if Smartcat succeeded in parsing the files. If Smartcat fails to parse all the files before the configured timeout, the operation stops with an error.
  10. If local translations were uploaded, HotFolder checks if they were successfully applied. If Smartcat fails to apply any of the local translations, the operation stops with an error.

If you add several files with the same name (regardless of the extension), HotFolder adds a numbering suffix in parentheses.

Example. We add "file.docx" and "file.txt" to the local folder. Smartcat will call the resulting documents "file.docx" and "file (1).txt".

The same applies when the project already has a document with the same name.

Pulling translations into the local storage

  1. HotFolder checks locally stored statuses for the retrieved files. If local statuses are missing for any of the files, the operation stops with an error.
  2. HotFolder checks the document statuses in Smartcat according to the local statuses of the retrieved files.  If at least one of the documents is not found in the project or unparsed, the operation stops with an error.
  3. HotFolder sends an export request for each file
  4. HotFolder saves the exported translations to the local drive. If HotFolder fails to execute all the requests before the configured timeout, the operation stops with an error.

Syncing files

  1. HotFolder pushes local files into the Smartcat project.
  2. HotFolder pulls translations onto the local storage.