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

Re: [PATCH] Describe l10n in HACKING

From: <kfogel_at_collab.net>
Date: 2004-04-19 17:09:06 CEST

"Erik Huelsmann" <e.huelsmann@gmx.net> writes:
> 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.)

This looks good, and clarified a lot (for me, anyway). There are one
or two slightly odd grammars, but we can just fix those up after
commit. They don't impede understanding.

The patch got wrapped by your mailer, by the way, though of course it
was still reviewable. Oh, also, if you put two spaces after the
period at the end of a sentence, you'll be consistent with the rest of
the documentation, and certain editors' sentence-motion commands will
work. But it's your call; I don't want to add Yet Another Guideline
to this project :-).

-Karl

> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 19 18:25:24 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.