wrc: If the message context is 'do not translate', then don't add the string to the PO file.

This commit is contained in:
Francois Gouget 2011-08-24 14:40:53 +02:00 committed by Alexandre Julliard
parent 7f9972a847
commit 32b310c737
1 changed files with 7 additions and 0 deletions

View File

@ -503,6 +503,7 @@ static po_file_t read_po_file( const char *name )
static void add_po_string( po_file_t po, const string_t *msgid, const string_t *msgstr,
const language_t *lang )
{
static const char dnt[] = "do not translate";
po_message_t msg;
po_message_iterator_t iterator;
int codepage;
@ -512,6 +513,12 @@ static void add_po_string( po_file_t po, const string_t *msgid, const string_t *
id_buffer = id = convert_msgid_ascii( msgid, 1 );
context = get_message_context( &id );
if (context && strcmp(context, dnt) == 0)
{
/* This string should not be translated */
free( id_buffer );
return;
}
if (msgstr)
{