Sync CafeTran with Word
Thread poster: xxx2nl
xxx2nl  Identity Verified
Netherlands
Local time: 06:36
Dec 7, 2014

Here is an AppleScript that syncs the content of the source segment box with the underlaying Word document. Whenever you move to the next segment, the source segment is found in the Word document:



Demonstration movie: https://www.youtube.com/watch?v=ZQai6NwtGxk

Solutions for Word for Windows are available too.


Direct link Reply with quote
 

Selcuk Akyuz  Identity Verified
Turkey
Local time: 08:36
Member (2006)
English to Turkish
+ ...
web resource Dec 7, 2014

Synchronisation with the source document, to see the context? What about saving the doc file as html and adding as a web resource in CafeTran?

It can be used for all Office formats. For pdf? Not sure. AFAIK pdf not supported in web resources. Saving a pdf as web page may work.


Direct link Reply with quote
 

Michael Joseph Wdowiak Beijer  Identity Verified
United Kingdom
Local time: 05:36
Member (2009)
Dutch to English
+ ...
AutoHotkey script to automatically preview source document from inside CafeTran (updated) Dec 7, 2014

For all you Windows users out there, I created an AutoHotkey script to view your source document (for preview purposes) while translating in CafeTran. My script automatically selects the text in your current source segment (strips out any tags), switches to your source document (this is a Word document in this video, but PDFs work too; probably also Excel and PowerPoint) and finds the relevant location in the document. All you need to do is enter the relevant document name in the script by right-clicking on the "DocPreview.ahk" icon in your taskbar prior to using it.

I made a video showing how it works: https://www.youtube.com/watch?v=x7f0UoveVBA&feature=youtu.be


; Copies selected text in current segment in CafeTran and runs search in source document
; (works with both PDFs and Word documents)
; Written by Michael Beijer
; http://www.beijerdeas.com
; Note1: Specify name of the .pdf or .docx prior to use by right-clicking on AHK script icon in taskbar
; Note2: Make sure to enable "Edit > Copy source segments to clipboard"
; (which ensures the current source segment text is always copied to the clipboard, without tags)

!p:: ; Shortcut: Alt+P

{
WinActivate, src.docx ; Change focus to source .pdf or .docx; enter name here
Send, ^f ; Open Find dialogue in source document (Ctrl+F)
Send, ^a ; Select any previous text in the Ctrl+F field (Ctrl+A)
Send, ^v ; Paste selected text over previous selection (Ctrl+V)
Send, {Enter} ; Press "Next" in the Ctrl+F dialogue
return

}


Michael


Direct link Reply with quote
 
xxx2nl  Identity Verified
Netherlands
Local time: 06:36
TOPIC STARTER
SearchInPDF Dec 7, 2014

Chris Stone came with the solution for searching in PDF files, using Skim for OS X:

http://youtu.be/ziWoIvToWA0

set textToFind to get the clipboard
tell application "Skim"
set foundText to find front document text textToFind
select foundText with animation
end tell


Direct link Reply with quote
 

Meta Arkadia
Local time: 12:36
English to Indonesian
+ ...
It's even better Dec 8, 2014

By the looks of it, both the AHK and the Keyboard Maestro macro are CafeTran independent, so they can be used by all CAT tool users.

I don't know about AHK, but if 2nl would be kind enough to make the KBM macro available as AppleScript, all Macs can use it (click on “Or by script” at the top of the macro and click “Or by AppleScript”, Cmd-A, followed by Cmd-C in an AppleScript window, save script as applet, assign keyboard shortcut in Keyboard Preferences).

And if you use Preview or File Viewer rather than Skim, you should be able to adjust the script in such way that you can also use it for all formats* that can be opened by those apps, including Office:mac files.

*for Preview, that's basically everything that can be viewed by Quick Look, File Viewer (free) even offers a few more formats.

Cheers,

Hans


[Edited at 2014-12-08 01:52 GMT]


Direct link Reply with quote
 
xxx2nl  Identity Verified
Netherlands
Local time: 06:36
TOPIC STARTER
Turn hyphenation off Dec 9, 2014

In order to get the best results with this script, you should (ask your clients to) turn hyphenation off before the PDF is created. Skim cannot search across hyphenation marks.

Direct link Reply with quote
 
xxx2nl  Identity Verified
Netherlands
Local time: 06:36
TOPIC STARTER
There is a tool to remove the hyphens Dec 10, 2014

I just tested it and you can use Infix Pro to remove the hyphens.

From Inceni Support:

- Open the Preferences panel by selecting "Preferences" from the "File" menu item.

- Select the "Spelling" tab on the panel, change the spelling language to the language that the document is written in and ensure that the check box "Hyphenate words when editing" is unchecked.

- Press "OK" to save your changes.


Select one hyphen at line ending, plus the extra space. Then choose Find/Replace and insert the hypen plus space into the Find field. Leave the Replace field empty.

- Click on the blue underlined link next to the "Replace:" text field to open the "Replace Format" dialog. and change the "Reflow:" combo box from "Containing Line" to "Containing Paragraph".

- Click "OK" to save your changes.

- Click "Replace All" to start the find and replace.


You will get a copy of your PDF with the hyphens removed. Nice!


Direct link Reply with quote
 

Meta Arkadia
Local time: 12:36
English to Indonesian
+ ...
Tested Dec 11, 2014

And if you use Preview or File Viewer rather than Skim, you should be able to adjust the script in such way that you can also use it for all formats* that can be opened by those apps, including Office:mac files


I finally tested my original Automator Applet with .doc, .docx, .xlsx, and .pdf, of course. You can see an animated GIF of a search in a .doc file here: https://dl.dropboxusercontent.com/u/2184204/ProZ/Animated%20Search%20in%20Source.gif (way too big to post on this forum. 2 MB).

Prerequisites:
- the document should be opened in Preview. It seems all formats that can be previewed by Quick Look can be opened in Preview.
- you should enter any search term in Preview before your first search
- copy the search term to the ClipBoard (select, hit Cmd-C)

Then, either run the applet by clicking it (as in the animated GIF), or by hitting a keyboard shortcut, to be assigned in System Preference | Keyboard | Shortcuts | App Shortcuts.

Since this is a Clipboard script, rather than an app specific one, this should work for all documents you can open in Preview, and for a search from within all applications, including all CAT tools.



You can download the app here (Mac only, of course): https://www.dropbox.com/sh/y82xrblvgad3e2v/AADO-asZfGmZey_XLtwSQZ8ea?dl=0

Cheers,

Hans


Direct link Reply with quote
 
xxx2nl  Identity Verified
Netherlands
Local time: 06:36
TOPIC STARTER
Script doesn't work anymore after update of Word Dec 13, 2014

After updating Word to this week's build (14.4.7) the script doesn't work anymore. I'll try to find a solution for this. For the time being I'm saving my DOCX files (with hyphenation turned off!) as PDF files, since the FindInPDF script still works.

Direct link Reply with quote
 
xxx2nl  Identity Verified
Netherlands
Local time: 06:36
TOPIC STARTER
Script is fixed – syncing works again Feb 23, 2015

Please change the script to:



in order to making syncing with Word:mac 2011 14.4.8 again. I'm currently working on temporarily highlighting the found result in Word, since the normal blue selection disappears when Word loses focus.

Hans


[Edited at 2015-02-23 09:34 GMT]


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:

Moderator(s) of this forum
Natalie[Call to this topic]

You can also contact site staff by submitting a support request »

Sync CafeTran with Word

Advanced search






Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search