A tool/macro to separate single-spaced list
Thread poster: OTMed (X)
OTMed (X)
OTMed (X)
Poland
Local time: 02:13
English to Polish
+ ...
Nov 23, 2004

Hello All,

We are to translate rather large number of SW strings that were delivered as a .txt file. Our planned approach is to feed this file into word and 'Tradoslate' it as a table/tab delimited txt or similar.
The structure of each SW string line is as follows:
xxxyyyzzz,
where:
xxx is the ID number
YYY is the max. allowed length of the string
zzz is the SW entry to be translated

The question is whether it is possible to import su
... See more
Hello All,

We are to translate rather large number of SW strings that were delivered as a .txt file. Our planned approach is to feed this file into word and 'Tradoslate' it as a table/tab delimited txt or similar.
The structure of each SW string line is as follows:
xxxyyyzzz,
where:
xxx is the ID number
YYY is the max. allowed length of the string
zzz is the SW entry to be translated

The question is whether it is possible to import such a structure to a MSWord table? (And, when translation is completed export it back to the .txt recreating the above format).
Would it be a matter of using a macro? Other ready-made tool? Perhaps some of you had similar problems and managed to find a solution?
Any input will be much appreciated.
(to be continued...)
Collapse


 
Robert Zawadzki (X)
Robert Zawadzki (X)  Identity Verified
Local time: 02:13
English to Polish
+ ...
Napisanie czegoœ takiego powinno byæ proste Nov 24, 2004

Niestety, mogê to zrobiæ najwczeœniej w poniedzia³ek po po³udniu. Czy móg³bym prosiæ o próbkê (ze 4 linijki pliku wejœciowego i odpowiadaj¹ca im rêcznie wyprodukowana tabelka)

 
OTMed (X)
OTMed (X)
Poland
Local time: 02:13
English to Polish
+ ...
TOPIC STARTER
A tool/macro to separate single-spaced list - Update Nov 24, 2004

rzawadzk wrote:
Niestety, mogê to zrobiæ najwczeœniej w poniedzia³ek po po³udniu. Czy móg³bym prosiæ o próbkê (ze 4 linijki pliku wejœciowego i odpowiadaj¹ca im rêcznie wyprodukowana tabelka)


Bardzo dziêkujê za chêæ pomocy, odpowiadam po ang., a nu¿ ktoœ pozapolskojêzyczny te¿ to czyta?

Update: in the meantime we have come to the following ugly-but seemingly-working solution:
1. open empty Excel worksheet,
2. import the .txt file (Data>Import external data)
3. select Fixed with column.

This seems to work quite OK, and the table gets imported to Word via Excel.
Such approach does have a glitch though. Each section of SW strings is separated by a heading indicating dialog window/screen/option for this particular section. Fixed column import obviously 'slices' the headings into 3 columns. Nevertheless this is a minor problem and has to be fixed manually.


 
Hynek Palatin
Hynek Palatin  Identity Verified
Czech Republic
Local time: 02:13
Member (2003)
English to Czech
+ ...
Search and replace Nov 24, 2004

How about this (I assume the ID and max length have 3 digits each):

Search for:
<(???)(???)(*)>

Replace with:
\1^t\2^t\3

Use wildcards.

And then convert the text to table (3 columns separated by tab).


[Edited at 2004-11-24 11:36]


 
OTMed (X)
OTMed (X)
Poland
Local time: 02:13
English to Polish
+ ...
TOPIC STARTER
Search/replace works OK but headings get also separated by tabs Nov 25, 2004

Hynek Palatin wrote:
How about this (I assume the ID and max length have 3 digits each):


Thanks a lot for this hint. Search&Replace works OK and is much more elegant than previous importing to Excel.

The only remaining thing is that groups of strings have their headings/descriptions:

// Dialog 12: Insert Report Items in Configured Report
27104 030 Insert Report Items
27124 030 Report Template Name

// Dialog 14: Insert Report Items in Configured Printout
27144 030 Insert Printed Items
27164 030 Report Printout Name

Obviously your search/replace method introduces tabs in the headings as well. Do you think it would it be possible to skip headings?


 
Hynek Palatin
Hynek Palatin  Identity Verified
Czech Republic
Local time: 02:13
Member (2003)
English to Czech
+ ...
Skipping the headings Nov 25, 2004

Now the source text looks a bit different. To skip the headings:

Search for (note the spaces!):
([0-9]{5}) ([0-9]{3}) (*)^13

Replace with:
\1^t\2^t\3^p

And again, use wildcards (^13 means end of paragraph, it's not possible to use ^p in the search formula).

Hope that helps.


 
OTMed (X)
OTMed (X)
Poland
Local time: 02:13
English to Polish
+ ...
TOPIC STARTER
Problem solved - thank you Nov 26, 2004

Hynek Palatin wrote:
Now the source text looks a bit different. To skip the headings:
Search for (note the spaces!):
([0-9]{5}) ([0-9]{3}) (*)^13
Replace with:
\1^t\2^t\3^p
Hope that helps.


It did help a lot. This is exactly what I have been looking for. Thank you, the problem is solved!


 


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

Moderator(s) of this forum
Laureana Pavon[Call to this topic]

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

A tool/macro to separate single-spaced list






Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »