Skip to content
SciTools Blog
Menu
  • Home
  • Blog
  • Support
  • Contact
  • Login
  • Pricing
  • Free Trial
Menu

Lost in Translation – Finding Strings

Posted on June 17, 2021

Did you know Understand comes in different languages? We have a major Japanese release coming soon, so this week, like many of the Understand Engineers, I’ve been finding string literals that aren’t getting translated and fixing them. Here’s how I did it, using Understand.

One missing string was “Configuration:” on the page below, which is part of the Understand New Project wizard when building a new Understand project by importing a Visual Studio or XCode project file:

Since the string “Configuration:” isn’t an entity, it isn’t findable with the Entity Filter. Instead, Instant Search (the search box at the top right of the main window) is very convenient. The query “string:configuration” will give search results in strings (the “string:” part) that contain “configuration”. More details on the syntax are available from the “?” link next to the Instant Search box.

There are 81 files with a string containing “configuration” but since the page is part of the New Project wizard, the NewWizard.cpp file seems like a good place to start. In fact, the “tr” translation function was missing from the final result on the list. Double-clicking the result opens an editor at that location for a fast fix.

Instant Search only searches project files. It turns out some of the strings I was looking for weren’t in code files. For example, the styles for the Blame Margin in the Understand Editor (configurable under Tools->Options->Editor->Styles).

Instant Search for “Blame Oldest” has 0 results. In that case, Find In Files (in the Search menu) is useful to search a particular directory. In this case, I was pretty sure it was in a configuration file, so I searched the conf directory:

Unlike Instant Search, Find In Files takes time (11 seconds in my case), but this time I found the missing string:

Unfortunately, the string already looks correct and is wrapped with the tr function. Time to compare the “Blame Oldest” string to one of the styles on this page that is translated correctly. One style name that seems unlikely to appear in too many places is “Fold Margin.” Trying Instant Search first (because it’s faster), I can quickly see the string “Fold Margin” appears in a header file “EditorTrStrings.h.”

Aha, that seems promising. In fact, adding the missing “Blame” string literals to that file fixes the issue and this part of the application can now be translated correctly.

Cover Photo by David Edelstein / Unsplash

  • Instagram
  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

Learn more about Understand's Features

  • Dependency Graph
    View Dependency Graphs
  • Comply with Standards
  • View Useful Metrics
  • Team Annotations
  • Browse Depenedencies
  • Edit and Refactor

Related

Leave a Reply Cancel reply

You must be logged in to post a comment.

  • API
  • Architectures
  • Business
  • Code Comparison
  • Code Comprehension
  • Code Navigation
  • Code Visualization
  • Coding Standards
  • Dependencies
  • Developer Notes
  • DevOps
  • Getting Started
  • Legacy Code
  • Licensing
  • Metrics
  • Platform
  • Plugins
  • Power User Tips
  • Programming Practices
  • Uncategorized
  • Useful Scripts
  • User Stories
  • May 2025
  • January 2025
  • December 2024
  • November 2024
  • August 2024
  • June 2024
  • May 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • June 2023
  • April 2023
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022
  • May 2022
  • April 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

©2025 SciTools Blog | Design: Newspaperly WordPress Theme