Wednesday, January 15, 2025

Enhance Your Excel Glossaries with a Dynamic Search Bar

Even though there are several tools on the market that allow interpreters to store and retrieve terminology quickly and safely, many of us still rely on Excel to create and share glossaries with our colleagues. And many of us still use a simple search via Ctrl + F to find our terms.

This is not only inefficient, as it doesn't display all the relevant terms grouped together, but rather jumps from hit to hit, making it impractical for the real-time searches required by interpreters. To achieve this, filtering is the best solution. However, setting up and using a filter while interpreting is not ideal either. A dynamic search box, on the other hand, would mimic the behavior we get from dedicated terminology management tools. 

A dynamic search box enhances glossary usability


The purpose of this post is not to explain how to create such a search box (that will be the subject of a separate post, when I can find a bit more time), but rather to share a ready-to-use Excel glossary file where I have added a dynamic search box. This file can be used as a template to create your own glossaries with dynamic search capabilities.

To use it, follow the steps below.

1. Download the Excel file, save it and open it. You may need to click Enable editing if you see a message appear at the top of the file. It may also be a good idea to use "Save As" and make a copy of the file.

2. Replace the sample terms in the Glossary tab with your own terms. You can type or paste your terms. 



3. To use the glossary, go to the Search tab and start typing your desired term in the Search box (indicated by the magnifying glass). You will see all the terms that match the search string immediately listed under the search box.



The file is set up for English and Spanish. If you'd like to change the language labels, you will need to:

1. Edit the column titles in the Glossary and Search tabs.

2. In the Search tab, click cell A5 and look at the formula bar. You will see the formula that makes all the magic happen. Replace "English" and "Spanish" with the appropriate language names. Make sure they match exactly the names that you gave to your columns in the previous step. Be very careful not to change anything else.



If you'd like to see all of this in action, here's a short video.



And that's it. Time to convert your Excel terminology files into enhanced dynamic glossaries!


Monday, January 13, 2025

Regex for Translators: Filtering Segments Starting with a Spanish Infinitive in Trados Studio

 

When working with CAT tools like Trados Studio, regex (regular expressions) can be a powerful ally. It allows you to identify specific patterns in text, saving time and effort. 

Today, let’s look at a simple but effective regex pattern designed to filter segments that start with a Spanish verb in the infinitive form. A specific use case would be a review job where there are inconsistencies, with some segments translated using the infinitive and others using the imperative form of the verb at the beginning of a segment. If we decide to change all the infinitives to imperatives, then it comes in handy to be able to filter and see only the segments that fit this criterion.

The Regex Pattern

Here is the regex pattern:

^\b(?:[a-záéíóúüñ]+ar|[a-záéíóúüñ]+er|[a-záéíóúüñ]+ir)\b

Let’s break it down:

  • ^: Ensures the pattern matches from the beginning of the segment.
  • \b: Marks a word boundary to capture entire words.
  • (?: ... ): Groups the options for non-capturing purposes, which means the parentheses won’t create a separate match group.
  • [a-záéíóúüñ]+: Matches the root of the verb, allowing for lowercase letters and accented vowels commonly found in Spanish.
  • ar|er|ir: Specifies the endings for verbs in the infinitive form.
  • \b: Ensures the word ends here.

What Does This Regex Do?

This regex identifies segments that start with verbs in the infinitive form. For example, it will match segments like:

  • "Vincular la información."
  • "Escribir un informe detallado."
  • "Responder de manera oportuna."

However, it will ignore other types of segments, such as:

  • "Vincule la información."
  • "Escriba un informe detallado."
  • "Responda de manera oportuna."

    Trados Studio file, no filtering




    Trados Studio file, regex-based filtering

    A word of warning: The regex doesn't actually match "infinitive verbs", but actually words that end in -ar, -er, or -ir, which is the structure of infinitive verbs in Spanish. This means that the regex will also match other words with the same structure that are not verbs, such as ayer, tapir, or hogar

Why Is This Useful for Translators?

As translators, we often need to apply specific rules or filters to certain types of text. In the case of Spanish, infinitives are frequently used for:

  • Instructional text (e.g., in manuals or guides): "Llenar el formulario."
  • Headings or titles: "Comprar boletos."
  • General-purpose commands: "Configurar el dispositivo."

However, some clients may prefer the imperative form, and we may find ourselves in a situation where we need to identify segments where an edit is needed.

By using this regex in Trados Studio, or any other CAT tool that supports regex, you can quickly locate and isolate these segments for editing, consistent formatting, terminology application, or quality assurance checks.

How to Use the Regex in Trados Studio

  1. Open your document in Trados Studio.
  2. Go to the "Review" tab.
  3. Paste the regex into the filter field*, making sure you have Source or Target selected, as appropriate.
  4. Apply the filter, and the tool will display only the segments starting with an infinitive.
This approach is not only efficient but also ensures consistency in handling these segments throughout your translation project.

*The regular filter in Trados Studio uses regex by default. To use regex in the Advanced Display Filter, make sure to check the "Use regex" checkbox.


Leveraging GenAI for Regex

Does writing a regex look too complicated? No need to worry. With GenAI, getting a regex like the one above is as simple as going to ChatGPT (or your chatbot of choice) and saying "Give me a regex that will find segments that begin with a Spanish verb in the infinitive form".

While learning regex continues to be a valuable skill for a translator, being able to describe the pattern you need to match can be just as useful when using a GenAI tool.

ChatGPT can help you write regexes


Learn More

Regex can seem intimidating at first, but with a few practical examples, it quickly becomes an indispensable tool. To dive deeper into how regex can enhance your work as a translator, check out The Translator's Tool Box book. It offers clear explanations, examples, and step-by-step instructions tailored to translators. 

Thursday, August 22, 2024

How Dropbox Saved the Day: Recovering Files with the Version History Feature

 We've all been there. You're working on an important project, fully focused on your work, and then suddenly, you realize you've overwritten a crucial file. Panic sets in—what now? Fortunately, if you're using Dropbox, there's a simple and effective solution to recover your files: the Version History feature.

The Problem

A couple of weeks ago, I was preparing a new PowerPoint presentation. I wanted to use the style from a previous presentation, so I opened the old presentation, based my new slides on it, and deleted the slides I didn’t need. What I should have done at this point was use “Save As” to create a new file. But instead, I accidentally saved over the original presentation.

I kept working for a while, and then it hit me—I had just overwritten the original file. I tried using Ctrl + Z to undo the changes, but it was impossible to go back to the previous state of the file. The original presentation seemed lost... until I remembered that the file was saved in Dropbox.

The Solution: Using Dropbox's Version History

Thankfully, Dropbox has a fantastic feature that keeps a history of your file versions. This means that even if you accidentally overwrite a file, you can easily revert to a previous version with just a few simple steps. Here’s how to do it:

  1. Open Dropbox: Go to the Dropbox website and log in to your account.



  1. Locate the File: Navigate to the folder where your file is stored and find the file you want to restore.

  2. Access Version History: Click on the three dots (more options) in the file preview pane. Then, select "Version history" from the dropdown menu.



  1. Choose a Previous Version: In the Version history window, you’ll see a list of previous versions with timestamps. Select the version you want to restore by clicking on it.

         


  1. Restore the Version: Click the "Restore" button to bring back the selected version.



This story had a happy ending. Thanks to Dropbox’s Version History feature, I was able to recover the original file without losing any of my work. So, if you ever find yourself in a similar situation and you’re a Dropbox user, remember that the Version History feature can save the day!

Tuesday, July 30, 2024

How to Disable Protected View in Word Files

If you've ever received a Word document via Gmail and noticed the yellow warning banner saying, "Be careful—files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View," you're not alone. While this feature is designed to protect your computer from potentially harmful content, it can sometimes be a hindrance, especially if you're certain the file is safe and need to make edits immediately.

Here's a quick guide on how to disable Protected View for Word files, using Gmail as an example. This can be particularly useful if you're frequently downloading and editing documents and want to streamline your workflow.

Why Does Protected View Exist?

Protected View is a read-only mode where most editing functions are disabled. It’s an added layer of security, designed to protect your computer from files that might be unsafe. Files from the internet, email attachments, or files located in potentially unsafe locations are typically opened in Protected View.

Steps to Disable Protected View

  1. Open the Word Document in Protected View When you first open a Word document from an online email client, such as Gmail, you'll see the Protected View warning. This yellow bar indicates that the document is in a restricted mode.



  2. Access the Trust Center To disable Protected View, you'll need to access the Trust Center settings in Word. Here’s how:

    • Click on File in the top-left corner of Word.
    • Go to Options.
    • In the Word Options window, select Trust Center from the left-hand menu.
    • Click on Trust Center Settings.
  3. Navigate to Protected View Settings In the Trust Center window, find the Protected View section. You’ll see options for enabling or disabling Protected View for various scenarios.



  4. Disable Protected View Options You can choose to disable Protected View for:

    • Files originating from the Internet
    • Files located in potentially unsafe locations
    • Outlook attachments

    Uncheck the boxes according to your preference. For instance, if you're comfortable disabling Protected View for all documents downloaded from the Internet (like those from Gmail), uncheck the first box.

  5. Confirm Your Changes Click OK to save your changes and exit the Trust Center. Then click OK again in the Word Options window. The next time you open a Word document from Gmail, it should no longer open in Protected View.

Final Thoughts

While disabling Protected View can save you time, it's essential to remember that this feature exists to protect your computer. Always ensure that the documents you download and open are from trusted sources. If you're unsure about the safety of a file, it's better to leave Protected View enabled and scan the document with your antivirus software before proceeding with any edits.

Disabling Protected View can streamline your work, especially if you deal with a large volume of documents daily. However, use this feature judiciously and prioritize your computer's security.

Wednesday, June 26, 2024

Understanding the Power of the Caret (^) in Regular Expressions

Regular expressions, or regex, are a powerful tool for searching and manipulating text. One of the essential special characters in regex is the caret (^). This character has different uses depending on its context, making it a versatile component of regex patterns.

The Caret at the Beginning of a Pattern

When placed at the beginning of a regex pattern, the caret asserts the position at the start of a line. This means the regex engine will match any text that begins with the specified pattern.

Example:

  • Pattern: ^Hello
  • Matches: "Hello world", "Hello everyone"
  • Doesn't Match: "world Hello", "Hi Hello"

This usage is particularly useful for filtering and validating inputs where the start of a string needs to be checked. For instance, in a translator's CAT tool, using ^\d can help filter all segments that start with a number, ensuring numeric consistency in translations.

The Caret Inside Character Classes

Inside square brackets, the caret has a completely different meaning. When used at the beginning of a character class (inside []), it negates the character class, meaning it matches any character not listed in the brackets.

Example:

  • Pattern: [^a-z]
  • Matches: "1", "!", "@"
  • Doesn't Match: "a", "b", "z"

This is useful when you need to find characters that do not belong to a specific set, such as non-alphabetic characters in a string.

Combining the Caret with Other Characters

The caret can be combined with other regex elements to create complex patterns. For example, ^[A-Z] matches any string that starts with an uppercase letter, which is useful for filtering proper nouns or specific names in text data.

Example:

  • Pattern: ^[A-Z]
  • Matches: "Apple", "Banana"
  • Doesn't Match: "apple", "banana"

Practical Applications

  1. Data Validation: Ensure segments start with specific characters or numbers.
  2. Text Filtering: Quickly locate and process lines or segments that match particular criteria.
  3. Error Checking: Identify and correct patterns that do not conform to expected formats.

Understanding how to use the caret (^) in regex can greatly enhance your ability to manage and manipulate text efficiently. Whether you’re filtering segments in a CAT tool, validating input data, or searching through logs, mastering this small yet powerful character will make your work more precise and effective.

Happy Regex-ing! 🚀



Tuesday, June 28, 2022

Easy Zoom Controls with an AutoHotkey Script

During remote simultaneous interpretation on Zoom, it can be a hassle to reach for the mouse and move the cursor to the microphone or camera icon to mute/unmute or turn the camera on or off. The Zoom windows may not even be in focus when one needs to mute/unmute, which adds to the cognitive load and stress in an already demanding situation.




An alternative solution that has given me much more control is creating an AutoHotkey script to perform the following actions:

    1. Bring the Zoom window into focus (make it active)

    2. Press the microphone or camera button

    3. Return focus to the original window 

Once the AutoHotkey script is ready and running, I simply press my chosen hotkey (shortcut) to control my microphone and camera. I like F1 for the microphone and F2 for the camera.

Watch it in action!


Here's how you can do it too.

1. Get AutoHotkey 

If you're already an AutoHotkey user, you can skip this part and simply grab the script, which you can find here. The script includes the following hotkeys:

F1 - Mute/unmute 

                    F2 - Start/stop video

                    F3 - Open chat window

                    F4 - Open/close participant list

                    F5 - Start/stop screen sharing

Please note that with the exception of opening the chat window, all other actions return the focus to whatever window was active when the hotkey was pressed.                    

If you are new to AutoHotkey, download the program here and install it. After installation, nothing opens, that's normal. AutoHotkey runs in the background and allows you to run your own scripts. You can learn more about it here.

2. Get and run the script

After you've installed AutoHotkey, download the Zoom Controls script here.

Unzip the file and save the file called Zoom controls.ahk in an easy-to-find folder. Once safely saved, double-click on the file. Note that you can easily inspect the contents of the script by opening with a plain text editor, such as Notepad.

A green box with a white H should appear in your system tray, indicating that the file is now active. 



3. Use your new shortcuts!

Now you're ready to use your shortcuts. Open Zoom and try them out. Try opening another window, such as Notepad, for example, and pressing one of your shortcuts (F1 to mute/unmute, for example) while you're typing in Notepad and watch your Zoom microphone change state while your cursor remains in Notepad.


4. Add your shortcuts to devices other than your keyboard

If you have an Elgato Stream Deck, you probably know that it provides a plug-in that offers Zoom microphone and camera control capabilities. However, the plug-in actions cause the Zoom window to gain and retain focus, which may not always be desirable, for example, if you need to mute/unmute while scrolling through a reference PDF or Powerpoint. 

Furthermore, I have found that there is some lag between pressing the button on the Stream Deck and the action actually being performed in Zoom, which is not ideal during simultaneous interpretation. See the difference in responsiveness between the Elgato plugin and the AutoHotkey script in the video below.


Fortunately, the AutoHotkey hotkeys can easily be added to the Stream Deck, using the Hotkey or Hotkey Switch options under System.




In addition to the Stream Deck, I also use a Logitech mouse with programmable keys, so I have a third option to quickly mute/unmute and start/stop video.



You're probably wondering if you can do the same with other platforms, and the answer is, probably yes. It's only a matter of telling AutoHotkey to activate the appropriate window, sending the appropriate shortcut for whatever action you want to perform, and then returning the focus to the original window. You can always use my script as a starting point and simply modify the appropriate parts as needed. 




Tuesday, June 21, 2022

Restoring file type associations and icons

I can't remember exactly when this happened, but for the past couple of days, all sdlxliff files on my computer are displaying a MemoQ icon instead of the actual Trados Studio one.



Not only that, but the sdlxliff file type is associated with MemoQ, which means that if I double-click on an sdlxliff file, my computer tries to open it with MemoQ.



If you've encountered the same inconvenience with this file type or any other, here's how to fix it.


File type associations

1. On the Windows File Explorer, right click on any of the problem files and select Properties, then click the Change button on the Properties dialog box.



2. Select the right program from the list to restore the file type association. 


The icon will also change to reflect the one for the program you have chosen. If that's still not the right file type icon, keep reading to learn how to change it.

If the program you want to use is not in the short list, click on "More apps" and locate the appropriate program on your computer.*

3. After clicking OK, you should see the new program icon associated with your files.




In the example above, I've associated the sdlxliff file type with Trados Studio 2021, which shows in the short list. To associate the file type with Trados Studio 2022, so that sdlxliff files will open in the new version when I double-click on them, all I need to do is find the program in the path shown in the screenshot below.




Icons

After completing the steps above, you may still not have the right icons. For example, I'm currently seeing this:


If you're familiar with Trados Studio files, you know that this isn't right. The project file type is showing a blank page icon and the sdlxliff file type is showing the Trados Studio program icon. 

Unfortunately, changing icons is not a simple process, and it involves tweaking the Windows registry. Fortunately, RWS has provided an article with 3 possible solutions to this issue, one of which is a nicely packaged file that you can simply download and run.

A word of caution: Make sure to make a backup of your current registry. You will find a link to detailed instructions in the RWS article.

Here's the result, after running the .reg file:


Now each file type is showing the correct icon.

And that's all there is to it. No more hijacked file type associations and icons!