[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Remove po file charset stripping on Windows

From: Roman Donchenko <DXDragon_at_yandex.ru>
Date: Thu, 27 Aug 2009 02:40:46 +0400

Greetings,

As far as I know, the Subversion build system currently strips the
Content-Type header from the po files on systems that don't support
bind_textdomain_codeset(). This is performed to prevent libintl from
converting the translated messages into the locale charset. On Unix, this
is done via a sed invocation in the Makefile. On Windows, it's done with
build/strip-po-charset.py.

However! The libintl implementation that's used on Windows is a slightly
hacked-up version of GNU libintl, which DOES have bind_textdomain_codeset.
Thus, I have no idea why is the stripping done in this case. It's kludgy
and generates msgfmt warnings, so I whipped up the attached patch that
makes Subversion use bind_textdomain_codeset instead. I didn't see any
breakage, but I wouldn't mind some testing from someone actually using one
of the locales that have translations.

[[[
On Windows, don't strip the charset from PO files - use
bind_textdomain_codeset instead.

* build/generator/build_locale.ezt: Remove the strip-po-charset.py
invocation.

* build/generator/gen_win.py:
   (POFile.__init__): don't store the .spo file name.

* build/strip-po-charset.py: Remove.

* subversion/libsvn_subr/nls.c:
   (svn_nls_init): Move the bind_textdomain_codeset invocation out of the
#ifdef WIN32 block.

* subversion/svn_private_config.hw: Indicate that bind_textdomain_codeset
is supported.
]]]

Awaiting your increments,
Roman.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2387739

Received on 2009-08-27 00:41:36 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.