Start a new topic

Show comments or ID

Is it possible for CT to show the comments or ID of a string in strings files?

Comments usually appear before a string or section of strings:

/* Comment */


IDs are usually tied to the developers code and appear to the left of the equal sign:

"15.paletteLabel" = "You should translate this part"

"VersionFieldString" = "%@ (%@)";

Comments and IDs usually contextualize the string and appear when a source document is opened as a tab (at the bottom of CT's window), but when working with multiple documents under a single project, I was unable to find a way to make the tab's content change to reflect the selected document.

You can convert both types to glossaries or memories that will show you the content of the comments.
You'll have to do some regex replacements to create a glossary/memory. BTW: in which file format are you translating these strings ? Personally, I'd use Word docx, since that would allow me to use hidden text to ignore all untranslatable text. Another approach would be: prepare the file so that only the translatable text is imported presented for translation. Create a PDF of the whole file, including the comments and IDs. Activate copy source to clipboard. Use a macro to have every source segment searched in the PDF--where you can quickly see the IDs and comments. For better visibility you might want to highlight them when creating the PDF. You can alternatively also use CafeTran's Word online viewer instead of PDF.

This second suggestion sounds very time consuming… I'm working with .strings file, normally used in macOS/iOS software localization. I'm not sure I understand your first suggestion… Do you mean opening the strings file, creating a new glossary, confirming all strings as they are, and then opening the file again to translate? Not practical either, as comments wouldn't be interpreted as translatable strings by CT.

If I'm not mistaken you can instruct CafeTran to search glossaries from right to left. Yes, time consuming. But then again: better a time consuming solution than none.
How do other cat tools and e.g. Okapi handle this? Perhaps you can create an XLIFF with one of them. I know from mqxliff that comments are neatly displayed in CafeTran's left-hand pane.
Doesn't CafeTran have a properties filter? Never used it, so I don't know about the IDs and comments. If they are being displayed, you could use the F/R described here:

I don't see XLIFFs as CT strong suit. Here's how other tools deal with comments and IDs:

MemSource editor:




XLIFF Editor:


If you open the xliff file in CT, you should be able to see the comments as well provided they follow the xliff file specification.

As for the .strings file, try solution with the HTML Source Preview:

1. Open your .strings file in Word and save it as a web page (.html).

2. Open the preview html file via the menu Resources > Open HTML page for source preview... . See it in detail here: 

This does, kind of, work. Although “Most of the currently-translated segments will be highlighted in this view” doesn't really happen. This would be ok for a small file, but not on large ones – as the filter seems to ignore the source preview, making search obsolete (and probably tedious, in case it worked).

Moreover, I believe CT should be able to do this. Even though translators have sometimes to resort to multiple loops of workarounds to finally get to work, this doesn't make CT “fun to use”. No intention to sound sour here, your help is much appreciated.

If you open the xliff file in CT, you should be able to see the comments as well provided they follow the xliff file specification.

Yes, I do see them in XLIFFs. Would it be possible to have this on strings files as well?

You might submit a support ticket and attach a sample .strings file with comments and IDs to implement them in a future update. Thanks!

Will do, thanks!

For the filter: //comments can be placed behind the translatable string too//

Hi brl,


The /* comments */ in .strings files are displayed as CafeTran's notes in the latest build 2017040101. Please download the update 5 and apply it again. You would need to start a new .strings project for the updated filter. 

Login to post a comment