subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1380056 - in /subversion/trunk: build/generator/ build/generator/templates/build_locale.ezt build/ subversion/libsvn_subr/nls.c subversion/svn_private_config.hw
Date Sun, 02 Sep 2012 21:03:15 GMT
Author: rdonch
Date: Sun Sep  2 21:03:14 2012
New Revision: 1380056

On Windows, don't strip the Content-Type field from .po files during their compilation.

GNU libintl, by default, converts the l10n strings into the locale encoding, while Subversion
requires UTF-8. This conversion can be suppressed by calling bind_textdomain_codeset, but
certain old versions of libintl don't have that, so the Unix build system checks for the existence
of that function, and if it's not present, strips the Content-Type header from the .po files
(which prevents encoding conversion, as well, but makes msgfmt complain).

When building on Windows, this stripping is done unconditionally, but is completely unnecessary:

- On Windows, we only support linking with svn-win32-libintl, which is hacked to disable all
encoding conversions.
- Even if someone links with with his own version of libintl, it's a safe bet that it will
be new enough to support bind_textdomain_codeset, so we can just call that.

This patch removes Content-Type stripping on Windows, which gets rid of msgfmt warnings, as
well as simplifies the build system.

* build/generator/build_locale.ezt: Remove the invocation.

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

* build/ Delete.

* subversion/libsvn_subr/nls.c:
    (svn_nls_init): Move the bind_textdomain_codeset call out of the #ifdef WIN32 block, so
it's executed on Windows, as well.

* subversion/svn_private_config.hw: Indicate that bind_textdomain_codeset is available if
NLS is enabled.

Approved by: brane


Modified: subversion/trunk/build/generator/
--- subversion/trunk/build/generator/ (original)
+++ subversion/trunk/build/generator/ Sun Sep  2 21:03:14 2012
@@ -1615,7 +1615,6 @@ class POFile:
   "Item class for holding po file info"
   def __init__(self, base):
     self.po = base + '.po'
-    self.spo = base + '.spo' = base + '.mo'
 # MSVC paths always use backslashes regardless of current platform

Modified: subversion/trunk/build/generator/templates/build_locale.ezt
--- subversion/trunk/build/generator/templates/build_locale.ezt (original)
+++ subversion/trunk/build/generator/templates/build_locale.ezt Sun Sep  2 21:03:14 2012
@@ -22,11 +22,8 @@ cd ..\..\..\subversion\po
 mkdir ..\..\%1\mo
 set exitcode=0
 [for pofiles]echo Running msgfmt on [pofiles.po]...
-python ..\..\build\ [pofiles.po] [pofiles.spo]
+msgfmt.exe -c -o ..\..\%1\mo\[] [pofiles.po]
 if errorlevel 1 goto err
-msgfmt.exe -c -o ..\..\%1\mo\[] [pofiles.spo]
-if errorlevel 1 goto err
-del [pofiles.spo]
 goto end
 @rem **************************************************************************

Modified: subversion/trunk/subversion/libsvn_subr/nls.c
--- subversion/trunk/subversion/libsvn_subr/nls.c (original)
+++ subversion/trunk/subversion/libsvn_subr/nls.c Sun Sep  2 21:03:14 2012
@@ -121,10 +121,12 @@ svn_nls_init(void)
 #else /* ! WIN32 */
       bindtextdomain(PACKAGE_NAME, SVN_LOCALE_DIR);
+#endif /* WIN32 */
   bind_textdomain_codeset(PACKAGE_NAME, "UTF-8");
-#endif /* WIN32 */
 #endif /* ENABLE_NLS */
   return err;

Modified: subversion/trunk/subversion/svn_private_config.hw
--- subversion/trunk/subversion/svn_private_config.hw (original)
+++ subversion/trunk/subversion/svn_private_config.hw Sun Sep  2 21:03:14 2012
@@ -83,6 +83,7 @@
 #include <libintl.h>
 #define _(x) dgettext(PACKAGE_NAME, x)
 #define Q_(x1, x2, n) dngettext(PACKAGE_NAME, x1, x2, n)
 #define _(x) (x)
 #define Q_(x1, x2, n) (((n) == 1) ? x1 : x2)

View raw message