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

[PATCH] Describe l10n in HACKING

From: Erik Huelsmann <e.huelsmann_at_gmx.net>
Date: 2004-04-18 11:27:35 CEST

The patch below describes localizing Subversion (from a coders point of
view). Any comments? (Apart from the fact that we need a document to
describe the translators POV.)

bye,

Erik.

Index: HACKING
===================================================================
--- HACKING (revision 9415)
+++ HACKING (working copy)
@@ -36,6 +36,7 @@
    * How to release a distribution tarball
    * Release numbering, compatibility, and deprecation
    * Stabilizing a release branch
+ * Localization (l10n)
  
 
 Participating in the community
@@ -1647,3 +1648,35 @@
 one can review for general sanity, accurate comments, obvious
 mistakes, etc, without being forced to assert "Yes, I understand these
 changes in every detail and have tested them."
+
+
+Localization (l10n)
+===================
+
+Translation has been divided into two domains. First there is the
translation
+of server messages sent to connecting clients. This issue has been punted
for
+now. Second there is the translation of the client and its libraries.
+
+The gettext package provides services required for providing translated
+messages. The gettext package uses the xgettext tool to extract strings
+from the sources for translation. It does so by extracting the arguments
+of the _() and N_() macros. The former is used in context where function
+calls are allowed (typically anything except static initializers). The
latter
+is used whenever _() can't. Strings marked with N_() need to be passed to
+gettext translation routines whenever referenced in the code. For an
example
+look at how the header and footer are handled in
+subversion/clients/cmdline/help-cmd.c.
+
+Whenever using direct calls to gettext routines (*gettext or *dgettext),
keep
+in mind that most of Subversion code is library code. Therefore the default
+domain is not necessarily Subversion's own domain. In library code you
should
+use the dgettext versions of the gettext functions. The domain name is
defined
+in the PACKAGE_NAME define.
+
+All required setup for localization is controlled by the ENABLE_NLS
conditional+in svn_private_config.h (for *nix) and svn_private_config.hw
(for Windows). Be
+sure to:
+
+#include "svn_private_config.h"
+
+as the last include in any file which requires localization.

-- 
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/info
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 18 11:27:53 2004

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.