[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#383321: su-to-root => localisation ;-)



Am 2006-08-20 08:28:26, schrieb Christian Perrier:
> > I have attached the 5 files (su-to-root, su-to-root.pot, su-to-root_de.po
> > and su-to-root_fr.po su-to-root.1) which are tested and they are working.
> > 
> > Additionaly I have attached the su-to-root_de.mo and su-to-root_fr.mo.
> 
> There are several glitches here and there with regard to i18n:
> 
> > usage() {
> >   GT1=$(gettext 'usage')
> >   GT2=$(gettext 'user')
> >   GT3=$(gettext 'command')
> >   GT4=$(gettext 'command is a X11 program')
> >   echo "${GT1}: $0 '[-X] [-p <${GT2}>] -c <${GT3}>" >&2
> >   echo "-X: ${GT4}" >&2
> >   exit 1
> 
> This makes a few assumptions about the languages syntax. Indeed,
> concatenating strings to rebuild sentences is generally a bad idea in
> i18n programs as various languages can have various syntax.

As you can see from the "echo" command, I took only the words which are
there, and changed nothing. e.g.

    echo "${GT1}: $0 '[-X] [-p <${GT2}>] -c <${GT3}>" >&2
was
    echo "usage: $0 '[-X] [-p <user>] -c <command>" >&2

which will be in german

    echo "anwendung: $0 '[-X] [-p <benutzer>] -c <befehl>" >&2

which is correct.
The french version would be:

    echo "Syntaxe: $0 '[-X] [-p <utilisatur>] -c <command>" >&2

So I see there no problem.

> Here, for instance, the French l10n team generally uses "Syntaxe : "
> as prefix to "usage" lines. Notices the non breakable space before the
> colon....

On <debian-mentors> and other mailinglists they have allready told
me to use the same style as the original.

Since you are DD and must know it, I am confused.

Maybe I should use

    GT1=$(gettext 'usage: ')
    echo "${GT1}$0 '[-X] [-p <${GT2}>] -c <${GT3}>" >&2

instead of

    GT1=$(gettext 'usage')
    echo "${GT1}: $0 '[-X] [-p <${GT2}>] -c <${GT3}>" >&2

which would be correct?

> So, indeed, you should just use *one* string for the whole string to
> be translated.
> 
> Ditto for the "-X: command is a X11 program" string

I have never seen this in other programs.

> >   GT5=$(gettext 'Incorrect password or command failed. Try again?')
> >   echo -n "${GT5} (${ANS})"
> >   read ans
> >   if   [ ${FLAG} -eq 0 ] ; then
> >     if test "${ans}" != "y" -a "${ans}" != "Y"; then exit 1 ; fi
> >   elif [ ${FLAG} -eq 1 ] ; then
> >     if test "${ans}" != "j" -a "${ans}" != "J"; then exit 1 ; fi
> >   elif [ ${FLAG} -eq 2 ] ; then
> >     if test "${ans}" != "o" -a "${ans}" != "N"; then exit 1 ; fi
> >   fi
> > }
> 
> I'm not sure how to do it in shell programming, but this anyway
> doesn't scale very well to other languages. The locale information
> should be used here (the Yes/No shortcuts are part of locale
> files....I'm however not aware of the exact way to use them).

I know and it is a thing, I do not know exactly, HOW to solve.
I need some suggestions...

OK, I will try a gettext thing.
(gotten an idea for 0.1 seconds)

> Any French translation should get a review by the French l10n team
> (I'd recommend the same for the German translation). The fr.po file
> you provided should not be used as Bill will certainly see it by
> himself...

;-)

> (Bill Allombert, who maintains menu, is a French native speaker)

Ufff - fortunatly!

Thanks and Greetings
    Michelle Konzack
    Systemadministrator
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)



Reply to: