Word count of only part of the strings in a txt. file
Thread poster: SandraV

SandraV  Identity Verified
Mexico
Local time: 21:32
Member (2004)
English to Spanish
+ ...
Sep 21, 2011

Hi,

A client requested me a quotation for a software localization. He sent me a txt file containing the English strings that are to be translated, but the problem is that there are parts which need no translation, only the part after the = should be translated. Here are two examples:

turnOnScreenOnAlertCheckBox.text=When an alert occurs, turn on the screen.
turnOnVolumeOnAlertCheckBox.text=When an alert occurs, turn on the volume to %d%%.

I have never done this before for a private client, only for agencies which always send only the part of the strings that need translation so words can be counted easily.

I wonder if the only way to count the words for translation is to delete the first part before the = but this would be very time-consuming, or if there is another way to make the word count. I made the analysis with Trados Studio, but obviously it took into account the whole texts.
I would appreciate any suggestions on this.

Thank you.


[Edited at 2011-09-21 03:54 GMT]

[Edited at 2011-09-21 04:21 GMT]


Direct link Reply with quote
 

Heinrich Pesch  Identity Verified
Finland
Local time: 05:32
Member (2003)
Finnish to German
+ ...
Difficult Sep 21, 2011

The simplest way would be to count the characters and assume that half of it represents the translatable text. Divide the amount by the average number of characters in English words, about 8.5, and you have the word count.

It is possible to remove all text between paragraph markers and "=" using Word's functions.

Or you can replace all = by tabulators and use the function convert text to table. This would leave the first parts in the left column and the translatable text in the right column.


Direct link Reply with quote
 

István Hirsch  Identity Verified
Local time: 04:32
English to Hungarian
Hope this is correct Sep 21, 2011

In Word:
If in your example the location of spaces is correct (there is no space in front of the 1st word to translate), the presence of the part in front of this word makes no difference in the word count.

In Trados:
As far as I can see, Trados considers "=„ as a space, so the word count will be higher by one for each segment. Here „turnOnScreenOnAlertCheckBox.text” and „When” are counted as two words. So you should substract the number of segments from the total word count (of course, if each segment is of similar structure).


Direct link Reply with quote
 
Achim Herrmann
Local time: 04:32
English to German
Software localization tool Sep 21, 2011

Hello Sandra

this is the classic use case for a specialized software localization tool as it will extract the ID (before the equal sign) and the text (after the equal sign) into the project. It will provide you with the correct word count and is able to simply update the project when the client is coming up with an updated software file.

Of course you can also use the text file type capabilities of SDL Trados Studio and define structure patterns that corresponds with your file structure. In this case the word count will also be correct.

Achim Herrmann
SDL Passolo Business Consultant


Direct link Reply with quote
 

Dejan Škrebić  Identity Verified
Bosnia and Herzegovina
Local time: 04:32
English to Serbian
+ ...
workaround Sep 21, 2011

Let's try a workaround, in Word

1.
In Word, go to "search and replace". Search for "^p" and replace it with something unique, like "^p$$$" (do not type quotation marks).

This will search for line end and replace it with line end (no change to that line) immediately followed with $$$ (that will come to the beginning of the following line).

2.
Go to "search and replace". Check something like "use wildcards" (I guess, my Word is localized). Search for "$$$*=" replace it with nothing (empty field). This will look for string starting with $$$, followed by any number of characters, and then followed with "=", and when found it will delete it.


I guess this should work.


P.S.
This is much easier in other txt editors, but I guess everyone is used to Word.

[Edited at 2011-09-21 18:14 GMT]


Direct link Reply with quote
 

Andrzej Mierzejewski  Identity Verified
Poland
Local time: 04:32
Polish to English
+ ...
8.5? Sep 23, 2011

Heinrich Pesch wrote:

The simplest way would be to count the characters and assume that half of it represents the translatable text. Divide the amount by the average number of characters in English words, about 8.5, and you have the word count.

It is possible to remove all text between paragraph markers and "=" using Word's functions.

Or you can replace all = by tabulators and use the function convert text to table. This would leave the first parts in the left column and the translatable text in the right column.


8.5 - is that correct?

Heinrich,
your post counts 494 characters including spaces/404 characters excluding spaces.
This results in 5.6 or 4.5 character/word, accordingly.

AM

[Zmieniono 2011-09-23 13:17 GMT]


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Word count of only part of the strings in a txt. file

Advanced search






WordFinder
The words you want Anywhere, Anytime

WordFinder is the market's fastest and easiest way of finding the right word, term, translation or synonym in one or more dictionaries. In our assortment you can choose among more than 120 dictionaries in 15 languages from leading publishers.

More info »
memoQ translator pro
Kilgray's memoQ is the world's fastest developing integrated localization & translation environment rendering you more productive and efficient.

With our advanced file filters, unlimited language and advanced file support, memoQ translator pro has been designed for translators and reviewers who work on their own, with other translators or in team-based translation projects.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search