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

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



> 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.

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


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


>   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).


> "Project-Id-Version: menu \n"
> "Report-Msgid-Bugs-To: <linux4michelle@freenet.de>\n"
> "POT-Creation-Date: 2006-08-15 18:28+0200\n"
> "PO-Revision-Date: 2006-08-15 18:42+0200\n"
> "Last-Translator: Michelle Konzack <linux4michelle@freenet.de>\n"
> "Language-Team: french <fr@li.org>\n"
> "MIME-Version: 1.0\n"
> "Content-Type: text/plain; charset=iso-8859-1\n"
> "Content-Transfer-Encoding: 8bit\n"
> 
> #: su-to-root:22
> msgid "usage"
> msgstr "utilisation"

.../...

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)


Attachment: signature.asc
Description: Digital signature


Reply to: