Bug 1057681

Summary: [abrt] system-config-language: gettext.py:93:c2py:ValueError: plural forms expression could be dangerous
Product: [Fedora] Fedora Reporter: Mindaugas <mindaugasceliesius>
Component: system-config-languageAssignee: Parag Nemade <pnemade>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: i18n-bugs, nav007, pnemade, psatpute
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/3af0263b08e6952ebbd7c299d0b204436ecb7238
Whiteboard: abrt_hash:2e9c03e5e6d3275bca7fb3385765541dd2f815d7
Fixed In Version: system-config-language-1.4.0-8.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 03:41:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Mindaugas 2014-01-24 15:29:32 UTC
Description of problem:
System-config-language do not launch, it crashed without warning.

Version-Release number of selected component:
system-config-language-1.4.0-7.fc20

Additional info:
reporter:       libreport-2.1.11
cmdline:        /usr/bin/python /usr/share/system-config-language/system-config-language.py
dso_list:       python-libs-2.7.5-9.fc20.x86_64
executable:     /usr/share/system-config-language/system-config-language.py
kernel:         3.12.8-300.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
gettext.py:93:c2py:ValueError: plural forms expression could be dangerous

Traceback (most recent call last):
  File "/usr/share/system-config-language/system-config-language.py", line 68, in <module>
    print _("Starting graphical mode failed.  Starting text mode instead.")
  File "/usr/share/system-config-language/system-config-language.py", line 29, in <lambda>
    _ = lambda x: gettext.ldgettext("system-config-language", x)
  File "/usr/lib64/python2.7/gettext.py", line 540, in ldgettext
    codeset=_localecodesets.get(domain))
  File "/usr/lib64/python2.7/gettext.py", line 480, in translation
    t = _translations.setdefault(key, class_(fp))
  File "/usr/lib64/python2.7/gettext.py", line 180, in __init__
    self._parse(fp)
  File "/usr/lib64/python2.7/gettext.py", line 317, in _parse
    self.plural = c2py(plural)
  File "/usr/lib64/python2.7/gettext.py", line 93, in c2py
    raise ValueError, 'plural forms expression could be dangerous'
ValueError: plural forms expression could be dangerous

Local variables in innermost frame:
StringIO: <built-in function StringIO>
danger: [(1, 'or', (1, 49), (1, 51), '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 or n%100>=20) ? 1 : 2)')]
tokens: <generator object generate_tokens at 0x31fd690>
token: <module 'token' from '/usr/lib64/python2.7/token.pyc'>
tokenize: <module 'tokenize' from '/usr/lib64/python2.7/tokenize.pyc'>
x: (0, '', (2, 0), (2, 0), '')
plural: '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 or n%100>=20) ? 1 : 2)'

Comment 1 Mindaugas 2014-01-24 15:29:38 UTC
Created attachment 855041 [details]
File: backtrace

Comment 2 Mindaugas 2014-01-24 15:29:41 UTC
Created attachment 855042 [details]
File: environ

Comment 3 Parag Nemade 2014-01-25 08:57:24 UTC
I see your locale is lt_LT.UTF-8 and the issue you faced has come from lt translations in iok submitted by translator. See the translation file 
https://git.fedorahosted.org/cgit/system-config-language.git/tree/po/lt.po#n19

I will check correct plural-form for lt.

Comment 4 Fedora Update System 2014-01-27 06:13:17 UTC
system-config-language-1.4.0-8.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/system-config-language-1.4.0-8.fc20

Comment 5 Fedora Update System 2014-01-27 06:26:47 UTC
system-config-language-1.4.0-8.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/system-config-language-1.4.0-8.fc19

Comment 6 Fedora Update System 2014-01-28 04:43:14 UTC
Package system-config-language-1.4.0-8.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-config-language-1.4.0-8.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-1657/system-config-language-1.4.0-8.fc19
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-02-05 03:41:50 UTC
system-config-language-1.4.0-8.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2014-02-05 03:44:42 UTC
system-config-language-1.4.0-8.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.