Word count of only part of the strings in a txt. file
Thread poster: SandraV
SandraV
SandraV  Identity Verified
Mexico
Local time: 12:39
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
... See more
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]
Collapse


 
Heinrich Pesch
Heinrich Pesch  Identity Verified
Finland
Local time: 21:39
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 tex
... See more
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.
Collapse


 
István Hirsch
István Hirsch  Identity Verified
Local time: 20:39
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 t
... See more
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).
Collapse


 
Achim Herrmann
Achim Herrmann
Local time: 20:39
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 yo
... See more
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
Collapse


 
Dejan Škrebić
Dejan Škrebić  Identity Verified
Bosnia and Herzegovina
Local time: 20:39
English to Serbian
+ ...
SITE LOCALIZER
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
... See more
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]
Collapse


 
Andrzej Mierzejewski
Andrzej Mierzejewski  Identity Verified
Poland
Local time: 20:39
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]


 


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






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »