Module: wine Branch: master Commit: 32b310c737e80c9080c7031a46164aa105dd652d URL: http://source.winehq.org/git/wine.git/?a=commit;h=32b310c737e80c9080c7031a46...
Author: Francois Gouget fgouget@free.fr Date: Wed Aug 24 14:40:53 2011 +0200
wrc: If the message context is 'do not translate', then don't add the string to the PO file.
---
tools/wrc/po.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/tools/wrc/po.c b/tools/wrc/po.c index 3efd208..e882a7c 100644 --- a/tools/wrc/po.c +++ b/tools/wrc/po.c @@ -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) {