You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Erik Huelsmann <e....@gmx.net> on 2004/04/18 09:27:35 UTC
[PATCH] Describe l10n in HACKING
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
Re: [PATCH] Describe l10n in HACKING
Posted by kf...@collab.net.
"Erik Huelsmann" <e....@gmx.net> writes:
> Ok. Could you correct them? I couldn't find them :-) Also while at it, you
> might want to add a sentence stressing the fact that the result from both
> _() and (d)gettext() is UTF-8 encoded, even if the input sentence is pure
> ascii, since we will be binding the UTF-8 encoding to the subversion domain.
I'll let you add that, you understand it better.
r9431 and r9432 are the massages, hope they look okay to you.
Thanks!
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Describe l10n in HACKING
Posted by Erik Huelsmann <e....@gmx.net>.
> "Erik Huelsmann" <e....@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.
Ok. Could you correct them? I couldn't find them :-) Also while at it, you
might want to add a sentence stressing the fact that the result from both
_() and (d)gettext() is UTF-8 encoded, even if the input sentence is pure
ascii, since we will be binding the UTF-8 encoding to the subversion domain.
> The patch got wrapped by your mailer, by the way, though of course it
> was still reviewable.
I know. My "mailer" does not go by very high standards.
> 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 :-).
Done.
Committed in r9426.
bye,
Erik.
--
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgeb�hr: http://www.gmx.net/dsl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Describe l10n in HACKING
Posted by kf...@collab.net.
"Erik Huelsmann" <e....@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