Showing posts with label Windows Explorer. Show all posts
Showing posts with label Windows Explorer. Show all posts

Nov 4, 2019

Finding a file in some random memoQ project


One of the nice things about new users of any software is that they approach it without the ingrained habits of routine users of that software and often ask useful questions that the rest of us might not have considered. One such question was posed today by Aloísio Ferreira, a translation student at FCSH/NOVA in Lisbon. He thought it would be useful if there were a function to help translators or project managers locate a file in some memoQ project no longer remembered. I can see the point of this; on a number of occasions in the past, I have clicked around through various projects trying to do just such a thing, and I had not considered any better way of achieving my objective.

As many of you already know, the Windows Explorer is able in some cases to index and search the content of files, and I knew that the majorVersionStore.info files in the project subfolders for memoQ included the names of files. So I went through the steps needed to ensure that the file contents would be indexed as plain text. All quite unnecessary it turned out.

Feeling very sophisticated after updating which folders were to be indexed, I tested the idea in the folder window for my memoQ projects, which contains all the subfolders with the name of each project. As you can see from the results in the screenshot above, the projects also contain placeholder files (0 bytes in size) with the names of the files imported to translate.

So the short answer to Aloísio's question is that no new feature programming is needed in memoQ; simply go to your projects folder and do a search with part of the filename (use quotes if there are spaces in the name, as in the example above), and the path for the files in the results will show you which projects have what you ate looking for.

From there you can use part of the project name in the filter field of the memoQ Dashboard to find the project you need, open it and work with the file in some way.


And of course once you have opened the project, if there are a lot of files in the list of Project home > Translations, there is another filter you can use to zero in on the one(s) you want quickly:

This screenshot is from a project with two target languages, created by the useful PM Edition of memoQ

What good is all this? It depends. I usually go on a hunt like this if I am given a new version of some file I translated years ago, and I can't remember where it is to use the X-translate feature so the pretranslation will use and lock any unchanged blocks of text from the old version. This can also be used (indirectly) to figure out which heavy resources (attached to the old project) may be useful for other work. I'm sure you can come up with half a dozen reasons of your own if you think about it.

Jul 27, 2013

The great guessing game: file extensions in Windows!


How many file types are there in the screen shot above?

Use your discerning eye and write your answer in the comments of this post. Anyone who figures out the correct answer and writes it as a comment before I update this post will be offered a special "reward" for clever deduction.

Update #1: A link to the solution has been posted in the comments. I will follow this up soon with a bit more explanation and a short video. In my comment with the solution, you'll also see why I hate Google's Blogger and don't recommend it to anyone, though I use it myself thanks to 5 years of habit. I'm the owner of the blog, and I can't even edit my own typos in comments, just in posts. Obviously, the Gods of Microsoft do not "thing". One would presume that they "think", however often the evidence of their actions may be against this.

Update #2: Hot summer nights are better suited to screencasting than sleep, so here is the video, a little sooner and longer than planned. But the part that actually matters (1:20 - 1:55) is in fact well under a minute.

 
 
This problem of hidden file extensions has come up so often in so many ways over the years. In the translation world of CAT tools I deal with, it comes up too often in discussions of how one can change the extension of an MQXLIFF file, for example, to XLIFF or XLF so that it can be imported by SDL Trados Studio or other tools.
I also have to deal with this problem when I send someone an RTF and a DOC file; these two file types are indistinguishable by icon, and without visible file extensions, it is fairly hopeless to discuss these files with anyone.

Jul 27, 2012

Translating embedded objects in Microsoft Office documents

Yesterday a colleague sent me a note to say he had been searching my blog for information about translating compound Microsoft Office documents (that is documents with embedded objects) in memoQ and couldn't find any. I presume he was referring to the article about how often one CAT tool is not enough - combined workflows with other tools can frequently help solve many tricky translation problems, and DVX2 or STAR TRANSIT are definitely useful options for preparing compound Microsoft Office documents for translation in memoQ. Some time ago I recommended using STAR TRANSIT as a pre-processing tool to one of my agency friends, and he carried out a very large, complex project successfully using memoQ's excellent integration features for STAR TRANSIT projects.

There is, of course, another simple way to translate the embedded objects in a Microsoft Office document that does not involve purchasing other software licenses. I don't usually talk about it, because there are a few limitations, and until recently I had not figured out how to avoid corrupting the files when I tried to do things the "easy" way. This approach is not limited to memoQ and will actually work with most CAT tools - so SDL Trados Studio users can do this as well, for example.

It is useful to know that the Microsoft Office 2007/2010 file formats (DOCX, PPTX, XLSX) are really just ZIP files containing XML and a bunch of other stuff. That stuff includes a folder with the embedded objects in formats that can be dealt with directly.

If you have an older, binary MS Office document (DOC, PPT, XLS) with embedded objects, convert it to a 2007/2010 format.

If you rename the file extension DOCX, PPTX or XSLX to ZIP and unpack the ZIP file, inside the folder you will find a folder called "embeddings". The files in that folder can be copied elsewhere and usually handled directly in your CAT tool. But problems usually arise when you put them back, rezip the folder and change back to the original extension. The compression gets screwed up, and the Microsoft Office file is corrupted and won't open.

The only reliable method I have found for avoiding this is to use the Windows Explorer (under Windows 7) to open the ZIP file:



Here's what the "guts" of one DOCX file with a bunch of embedded Excel tables looks like:

Inside the word folder you'll find the embeddings folder:

The contents of the embeddings folder look like this:


Simply copy the embeddings folder somewhere safe, translate its contents, then copy them back to the ZIP file using Windows Explorer. Then rename the ZIP extension to the original extension for the file.

If you open the file and look at it, you'll get a shock. When you see all the objects in their original language, you might think something went wrong. Nothing bad has happened; you merely need to refresh the objects. This can be done by opening each briefly to edit or using a macro to open each object and close it again quickly. In a job with dozens of embedded objects in a long file, this macro is a helpful shortcut.

Given how easily accessible this embedded content actually is, one has to wonder why other major CAT tool providers like SDL and Kilgray have failed to offer the option of importing embedded content in their filters up to now. Let's hope they do soon. In the meantime, this workaround should enable many people to deal with this complex and irritating file format challenge.

Here's a summary of the procedure once again:
  1. Rename the *.???x file to *.zip 
  2. Under Windows 7, right-click on the ZIP file and open it using the Windows Explorer. Using ZIP tools of any kind risks corruption by changing the compression ratios. 
  3. Find the embeddings folder inside the ZIP structure. Copy this elsewhere and use it as the source for translation. It will contain all the embedded objects as single files. 
  4. Copy the translated content back into the embeddings folder in the ZIP structure.
  5. Rename the ZIP file to its original extension. 
  6. Open the file and refresh each embedded object (which will initially appear not to have been translated) by right-clicking and opening it from the context menu or running a macro to do that.