[issue12425] gettext breaks on empty plural-forms value

2017-09-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, I don't see a value of issuing warning if the following line of the code 
is failed. Why not raise an exception instead?

A warning can be issued in the case of lacking nplurals= which is not used in 
Python implementation.

I think additional checks should be added in msgfmt.py. GNU msgfmt checks that 
plural= and nplurals= are specified if there are plural form translations.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12425] gettext breaks on empty plural-forms value

2015-04-13 Thread Ned Deily

Ned Deily added the comment:

LGTM

--
nosy: +ned.deily

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12425
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12425] gettext breaks on empty plural-forms value

2015-04-13 Thread A.M. Kuchling

A.M. Kuchling added the comment:

Here's a patch against 3.5. This patch is atop the fix for #17898, so it won't 
apply cleanly to a stock 3.5.

The patch uses warnings.warn() to issue a warning if the plural header is 
empty. There seems to be precedent for issuing warnings in the case of odd 
incoming data or behaviour, so I'm comfortable doing this; I think that 
warnings need not be only for Python language features, like deprecated things.

But this does mean that importing gettext will also import warnings as a 
result, increasing memory usage.  Probably this doesn't matter -- on any 
sizable program, you probably already have the warnings module imported.  
Otherwise we could print to sys.stderr.

--
nosy: +akuchling
Added file: http://bugs.python.org/file38918/issue12425.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12425
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12425] gettext breaks on empty plural-forms value

2013-05-31 Thread Bohuslav Slavek Kabrda

Changes by Bohuslav Slavek Kabrda bkab...@redhat.com:


--
nosy: +bkabrda

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12425] gettext breaks on empty plural-forms value

2013-05-10 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.4 -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12425] gettext breaks on empty plural-forms value

2011-06-29 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

IIUC, this comes up with invalid po files, so this report is about graceful 
error handling, not strictly a bug.

If https://bugzilla.redhat.com/attachment.cgi?id=489427 was applied, gettext 
would not fail anymore, but the invalid line would not be reported IIUC.  I 
think we should print an error message, to let libs/apps find the mistake.

--
keywords: +needs review, patch
nosy: +eric.araujo, lemburg, loewis
stage:  - patch review
type:  - behavior
versions: +Python 3.3 -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12425] gettext breaks on empty plural-forms value

2011-06-28 Thread Dirkjan Ochtman

New submission from Dirkjan Ochtman dirk...@ochtman.nl:

See https://bugzilla.redhat.com/show_bug.cgi?id=692632 for more details and a 
proposed patch.

--
components: Library (Lib)
messages: 139347
nosy: djc
priority: normal
severity: normal
status: open
title: gettext breaks on empty plural-forms value
versions: Python 2.7, Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12425] gettext breaks on empty plural-forms value

2011-06-28 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com