Merge whole messages in PO files
دھاگا پوسٹ کرنے والے: Samuel Murray
Samuel Murray
Samuel Murray  Identity Verified
نیدر لینڈ
Local time: 04:38
رکن (2006)
افریکانسسےانگریزی
+ ...
Oct 12, 2012

G'day everyone

A client sent me a PO file for editing. The PO file also contained a few non-translated and fuzzy messages. The client did not specifically tell me not to touch the non-translated and fuzzy messages, and becaues I was in a good mood, I simply translated them during the edit process.

Now it turns out that it was actually quite crucial that those segments remained untouched. This means that I must take the non-finalised messages from the original PO file
... See more
G'day everyone

A client sent me a PO file for editing. The PO file also contained a few non-translated and fuzzy messages. The client did not specifically tell me not to touch the non-translated and fuzzy messages, and becaues I was in a good mood, I simply translated them during the edit process.

Now it turns out that it was actually quite crucial that those segments remained untouched. This means that I must take the non-finalised messages from the original PO file and merge them into the updated PO file in such a way that the whole message is merged (including the message headers[1]). I know of tools that can merge messages, but they don't merge the message headers -- they assume that the message header of the target PO file is the correct header. Do you have any advice for me? Is there some gettext magic that I'm unaware of?

I suppose I could just manually search for the messages and replace them one by one by one, but it would make sense if there is an automagic way of doing this, e.g. for future jobs where a manual merge might not be practical.

Thanks
Samuel

[1] When I say "message header" I don't mean the file's header -- I mean the text in each message that precedes the message string. In other words, the place where the status of the message is mentioned.
Collapse


 
Samuel Murray
Samuel Murray  Identity Verified
نیدر لینڈ
Local time: 04:38
رکن (2006)
افریکانسسےانگریزی
+ ...
TOPIC STARTER
Okay, one solution... Oct 12, 2012

Samuel Murray wrote:
This means that I must take the non-finalised messages from the original PO file and merge them into the updated PO file in such a way that the whole message is merged (including the message headers).


Okay, I've thought of one method:

1. Extract all finalised messages from the original file, and turn it into a POT file.
2. Extract all non-finalised messages from the original file into a smaller, temporary text file.
3. Translate the POT file using the edited PO file.
4. Combine the translated POT file with the smaller text file.

I *think* this will work...


 


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


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

Merge whole messages in PO files







Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »
LinguaCore
AI Translation at Your Fingertips

The underlying LLM technology of LinguaCore offers AI translations of unprecedented quality. Quick and simple. Add a human linguistic review at the end for expert-level quality at a fraction of the cost and time.

More info »