How to convert string text for translation
Copyright © ProZ.com, 1999-2017. All rights reserved.
More and more clients are giving us strings to translate, particularly since so many things are now going "web".
It does not matter what the language pair is, they are still a pain to deal with because you to overwrite the text to be translated, careful not to erase any important part. A few lines is no problem, but when the project is large, it is very tedious, particularly since the clients always ask that the translation be done into Notepad (in my case, Notepad++, see my article on Notepad++ if don't know this shareware at: http://www.proz.com/translation-articles/articles/2050/1/How-do-you-start-your-day%3F-Save-time-with-these-3-free-programs).
Recently, a client gave me a large project which looked like this:
// Shutdown Settings dialog (IDD_SHUTDOWN_SETTINGS)
//Note: Not displayed in current version
IDC_SHUTDOWN_CHECK=FR_Shutdown after all uploads have completed
The FR_ (meaning translated into French) had to be stripped and only the sentences had to be translated. The FR_ could be searched and replaced globally, and that part was simple.
The sentences starting with // did not need translation since they are only remarks for the programmers.
To make my life easier, I divided the file in a few steps like this:
1. Open the file in Word or copy/paste it into Word.
2. Replace // with xxx=//
3. Choose all text (CTRL A)
4. Convert text to table
5. Make sure you choose 2 columns
6. Make sure you choose = as separator (in the section "Other" in the options)
Bingo, your whole text is now a neat table where only the stuff on the right needs to be translated. You can continue with a table format (even import it into Excel if you want)
or just copy and paste the "right column" into a Notepad file (or Notepad++) or a similar tool, since you cannot use Word to translate strings because Word adds spacing and line breaks at awkward locations and it corrupts the html or xml file. (I know Word can now save into html but web programmers will tell you that it does not work very well, which is why they insist on Notepad).
Make sure that you ABSOLUTELY respect the line spacing since you will want to combine those two columns into one to give it back the same way to the client. In other words, do not add returns even if one line (or one cell if working in Excel) actually contains two sentences.
To return the file to its original format:
1. One easy (or at least easier) way to do that is to import the table into Excel (using Paste Special, unformatted text) if you have done the work with another tool than Excel.
2. You then add one column in between the two columns (right click, insert, column),
3. Fill the new column with =
4. Make this column as small as the one character symbol for the next step,
5. Then copy/paste the whole table into Word again,
6. CTRL (to choose ALL),
7. Convert table to text and use the space as separator,
8. Then search and replace "space=space" (the space character here, not the word "space") simply with the = symbol,
9. And finally replace the xxx=// with // throughout the document.
Bingo again! Your document looks the same as when the client sent it - do proofread it to make sure that you have not gone out of step and one line has not been shifted down. If it's well programmed, the line command part should match the text part like this: IDC_SHUTDOWN_CHECK=FR_Shutdown...
With this, you can check that all is well: SHUTDOWN=Shutdown...
Also make sure that you save it as .txt and NOT as .doc or .docx format (which are Word formats by default, depending on your version of Word).
Although those steps take time, they actually save a lot more time and frustration than doing it the hard way.
Thanks to JCEC who shared with me the first steps of this process.
You may want to keep this as reference for the next time you need to translate web pages. You may have a different method which you would like to share with your colleagues on Proz. Or you wish to add embellishments to this process. Do not hesitate to share.
Georgette Blanchard, alias DocteurPC