Dwayne,

The situation is a bit confusing because I'm not involved in the 
length of the loop (meaning that the dangerous plural error 
reported is something that happened to others, not me).

The bottom line is that if I define a language (through the GUI):
# Icelandic
    is.fullname = u'Icelandic'
    is.nplurals = '2'
    is.pluralequation = '(n != 1)'

When I add the language to a project through the GUI, Pootle 
generates the /is/ directory with all the PO files. Fine, but the 
"Plural-forms" line in them is the one noted below -- iow, a non 
valid line.

The unsafeness or dangerousness error reported downstream could 
just be result of the invalid line, but the first issue is why 
does Pootle generate it in the first place?


As a side issue, is there a 'central repository' for plural 
formulas? I failed to find one.  Improvising on this is something 
I would like to avoid...

Cheers,
Xavier

On Wednesday 21 November 2007 05:50, Dwayne Bailey wrote:
DB> Hi Xavier,
DB>
DB> You seem to be asking multiple questions here, I'll give some
DB> feedback and hopefully we can get to the root of the
DB> problem. 
DB>
DB> On Tue, 2007-11-20 at 16:24 -0300, Xavier Alvarez wrote:
DB> > Hi,
DB> >
DB> > I'm being notified of the following error after noting that
DB> > the developers were doing plural handling by code instead
DB> > of gettext: 
DB> >
DB> > > The error appears to originate in a common file to all
DB> > > these activities: "/usr/lib/python2.5/gettext.py"
DB> > >
DB> > > build error report in all modules is:
DB> > >
DB> > > File "/usr/lib/python2.5/gettext.py", line 93, in c2py
DB> > >
DB> > > raise ValueError, 'plural forms expression could be
DB> > > dangerous' 
DB>
DB> We use the Python gettext.py when working with the Pootle
DB> server translations.  That is for the translation of the
DB> Pootle interface, this is not used by any other projects
DB> that you host.  We do this to allow Pootle to be translated
DB> live and thus we don't use gettext which requires .mo files.
DB>
DB> I haven't seen this error before.  Did you add a plural
DB> equation for any of the languages that you are hosting or is
DB> this with a default setup? 
DB>
DB> What language are you using when you access Pootle? Is this
DB> one that you added?
DB>
DB> > I'm assuming that some of the formulas in the POs are
DB> > invalid... which happens in many (all?) of the POs
DB> > initially generated by Pootle, even when a valid formula
DB> > has been declared for the language the result is:
DB> >
DB> >  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
DB> >
DB> > Forcing an update from templates fails to rectify it.
DB>
DB> When you say generated are these files that you have
DB> initialised within Pootle?
DB>
DB> I saw a commit from Friedel to not add 'Plural-Forms' if the
DB> template has none.
DB>
DB> > Solutions?
DB>
DB> I need a better understanding of the problem.  If you can
DB> help me replicate it then that would help.
DB>

-- 
XA
=========
Don't Panic!  The Answer is 42

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to