[R] Internalization of help pages

Berend Hasselman bhh at xs4all.nl
Sun Aug 4 07:34:49 CEST 2013


On 04-08-2013, at 02:28, Jim Lemon <jim at bitwrit.com.au> wrote:

> On 08/04/2013 10:20 AM, Jim Lemon wrote:
>> On 08/03/2013 05:34 PM, Tomáš Greif wrote:
>>> ...
>>> Any idea how to create proof of concept for this?
>>> ...
>> Hi Tomas,
>> Here is a translation of a short .Rd file for one of the packages I
>> maintain. It took me about five minutes to translate it into Spanish
>> using Google Translate. I am not a good enough Spanish speaker to judge
>> the grammar well, but it seems to adequately convey the intent of the
>> English version, which is also attached.
>> 
>> Jim
>> 
>> 
> Oops, I forgot that .Rd files will get stripped from the message. Here they are inline:
> 
> \name{add.value.labels}
> \alias{add.value.labels}
> \title{Add value labels}
> \description{Añade las etiquetas de valor a una variable.}
> \usage{
> add.value.labels(x,value.labels)
> }
> \arguments{
>  \item{x}{La variable para agregar las etiquetas.}
>  \item{value.labels}{Las etiquetas.}
> }
> \details{
> \ samp {add.value.labels} añade etiquetas de valor como los de un archivo
> .sav SPSS. Esto hace que sea un poco más fácil para pegar en las etiquetas
> de valor que se han perdido o no existe en el primer lugar.}
> \value{
> La variable con las etiquetas añadió.}
> \author{Jim Lemon}
> \examples{
> fgh<-data.frame(sex=sample(1:2,20,TRUE),viviality=sample(1:3,20,TRUE))
> fgh$sex<-add.value.labels(fgh$sex,c("Female","Male"))
> fgh$viviality<-add.value.labels(fgh$viviality,c("Alive","Dead","Zombie"))
> }
> \keyword{misc}
> 
> \name{add.value.labels}
> \alias{add.value.labels}
> \title{Add value labels}
> \description{Adds value labels to a variable.}
> \usage{
> add.value.labels(x,value.labels)
> }
> \arguments{
>  \item{x}{The variable to add the labels.}
>  \item{value.labels}{The labels.}
> }
> \details{
> \samp{add.value.labels} adds value labels like those from an SPSS .sav file.
> It makes it a bit easier to stick on value labels that have been lost or were
> not there in the first place.}
> \value{
> The variable with the labels added.}
> \author{Jim Lemon}
> \examples{
> fgh<-data.frame(sex=sample(1:2,20,TRUE),viviality=sample(1:3,20,TRUE))
> fgh$sex<-add.value.labels(fgh$sex,c("Female","Male"))
> fgh$viviality<-add.value.labels(fgh$viviality,c("Alive","Dead","Zombie"))
> }
> \keyword{misc}


I had a go with Google Translate and translated into Dutch.
The result is terrible. Garbage. Laughable.
It also translated R function names in the examples and some of the Rd directives.
And look at the last line and admire what Google Translate did with \keyword{.
Checking and correcting translations would require a major effort.
I don't think this would be useful at all. 

Berend

The result for Dutch speakers:

\naam {add.value.labels}
\alias {add.value.labels}
\title {Voeg waarde etiketten}
\beschrijving {voegt waarde labels aan een variabele.}
\gebruik {
add.value.labels (x, value.labels)
}
\argumenten {
  \ item {x} {De variabele om de labels toe te voegen.}
  \ item {value.labels} {De labels.}
}
\detail {
\ samp {add.value.labels} voegt waarde etiketten zoals die van een SPSS. sav bestand.
Het maakt het een stuk makkelijker aan de stok over de waarde labels die verloren zijn gegaan of waren
er niet in de eerste plaats.}
\value {
De variabele met de labels toegevoegd.}
\author {Jim Lemon}
\voorbeelden {
fgh <-data.frame (sex = monster (1:2,20, TRUE), viviality = monster (1:3,20, TRUE))
fgh $ sex <-add.value.labels (fgh $ geslacht, c ("Vrouw", "Man"))
fgh $ viviality <-add.value.labels (fgh $ viviality, c ("Alive", "Dead", "Zombie"))
}
\ {keyword misc}



More information about the R-help mailing list