Start a new topic

How to create a project template for a new client automatically

  

<key>currentProject</key>
<string>/Users/john/Dropbox/CT/Pro/tmp/tmp/tmp.xlf</string>
<key>original</key>
<string>/Users/john/Dropbox/CT/Pro/tmp/tmp/tmp_de-DE.docx</string>
<key>projectTemplates</key>
<string>/Users/john/Documents/tmp_pt.xml|</string>
<key>projectdirectory</key>
<string>/Users/john/Dropbox/CT/Pro/tmp/tmp</string>
<key>projectlocation</key>
<string>/Users/john/Dropbox/CT/Pro/tmp</string>
<key>projectlocations</key>
<string>/Users/john/Dropbox/CT/Pro/tmp</string>
<key>projects</key>
<string>/Users/john/Dropbox/CT/Pro/tmp/tmp/tmp.xlf|</string>
<key>sourceFilesDirectory</key>
<string>/Users/john/Dropbox/CT/Pro/tmp/tmp</string>
<key>projectlocation</key>
<string>/Users/john/Dropbox/CT/Pro/tmp</string>
<key>sourceFilesDirectory</key>
<string>/Users/john/Dropbox/CT/Pro/tmp/tmp</string>
<key>templatesMap/</key>
<dict>
<key>tmp.xlf</key>
<string>tmp_pt.xml</string>
</dict>

  


Still exploring here ...


I found this way to display the recent projects and the assigned templates:


image


The first project I opened was 'tmp', the second 'abc' and the third one was 'xyz'. As you can see, the projects aren't saved in chronological order. Not sure if that's relevant for my purposes ;).

This info is for Mac users only. 


When CafeTran Espresso is launched, it reads the file /Users/john/Library/Preferences/com.apple.java.util.prefs.plist that contains the keys above.


Before you start experimenting: make a backup of this file!


  1. Create a new Document tmp.docx and place it in the folder /Users/john/Dropbox/CT/Pro/tmp/tmp/tmp.docx
  2. Create a new project template: /Users/john/Documents/tmp_pt.xml
  3. Create a new project and open tmp.docx
  4. Quit CafeTran Espresso
  5. We will now clone all settings and files from 'tmp' to 'abc' (an imaginary new client): Copy /Users/john/Dropbox/CT/Pro/tmp to /Users/john/Dropbox/CT/Pro/abc
  6. /Users/john/Dropbox/CT/Pro/tmp/tmp/tmp.xlf to
    /Users/john/Dropbox/CT/Pro/abc/abc/abc.xlf
  7. Copy /Users/john/Documents/tmp_pt.xml to
    /Users/john/Documents/abc_pt.xml
8. There are two ways to modify the plist file: via PlistBuddy and via BBEdit. For now we will use BBEdit: Open the plist and replace 'tmp' with 'abc'.
9. Save the plist.
10. Start CafeTran Espresso. In the Dashboard you will see the project template abc_pt and in the project selector you will see the project 'abc'.
11. You can now create a new project and the newly created project template abc_pt will be used.

So what’s this all about? I want to create a macro that creates all necessary resource files and folders, places a selected file or folder with files at the correct location in my project folder tree, an starts CafeTran with the newly created project template loaded. So all I’ll have to do is: type the name of the new end client!!!

And here is the macro (that you can glue to your resource creation macro). Note that previous projects and templates will be removed from the recent files lists (hamburger and project selector). For now it is too complicated to keep the recent projects and templates listed.

image


Related to this is an already existing project management macro that creates the correct project subfolder in the projects tree and even inherits any existing client-specific Hunspell user.dic files. Here I can add selection of the correct template too. Nice.
So, wil it be possible to create a version that keeps the previous projects (and the attached templates) listed? Yep, but it will be a lot of work to create this.
Login to post a comment