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

Re: Translation of Subversion

From: Mattias EngdegÄrd <mattiase_at_acm.org>
Date: Tue, 6 Mar 2018 15:43:12 +0100

6 mars 2018 kl. 14.00 skrev Julian Foad <julianfoad_at_apache.org>:
>
> > What really needs to be done to make life for translators somewhat bearable is to split the long strings into individual paragraphs; this is standard practice. Right now, even if only a single word has changed in the documentation of "svn merge", for example, all we are told is that something in this 300-line string has changed. One ends up having to go back to the source code and spend quite some time to figure out what part needs updating.
>
> Yes please let's fix this. I am happy to do the grunt work if that helps. Can you figure out how to rewrite the source? Try it (if you are able to compile and test) or find docs or examples? I could figure it out if necessary but would really like some help.
>
> My first guess is
> _("paragraph1 line1\n"
> "paragraph1 line2\n"
> "\n")
> _("paragraph2 line1\n")

Static string concatenation won't work; the strings need to be looked up separately. This usually means that what was a single string before now becomes an array of strings.

Thus, instead of

N_("paragraph 1 line 1\n"
   "paragraph 1 line 2\n"
   "\n"
   "paragraph 2 line 1\n"
   "paragraph 2 line 2\n")

we would have

{N_("paragraph 1 line 1\n"
    "paragraph 1 line 2\n"),
 N_("paragraph 2 line 1\n"
    "paragraph 2 line 2\n"),
 NULL}

assuming the strings are static initialisers. The blank line separating the paragraphs can either be included in the paragraph strings or be emitted by the code that translates and prints them.
Received on 2018-03-06 15:43:29 CET

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.