Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'plural_form' #43

Closed
bcaller opened this issue Dec 31, 2015 · 1 comment
Closed

KeyError: 'plural_form' #43

bcaller opened this issue Dec 31, 2015 · 1 comment

Comments

@bcaller
Copy link

bcaller commented Dec 31, 2015

As a test I took the source for the stock android alarm clock (deskclock) available at Google source and ran a2po init.
It crashes due to the plurals. I removed all plurals from the default values/strings.xml (but not the translations) and got the same error.

....
'0021'
   [created] locale\hi.po
'0021'
   [created] locale\hr.po
'0021'
   [created] locale\hu.po
'0021'
    [failed] locale\hy_AM.po
Traceback (most recent call last):
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\Scripts\a2po-script.py", line 9, in <module>
    load_entry_point('android2po==1.2.0', 'console_scripts', 'a2po')()
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\android2po-1.2.0-py2.7.egg\android2po\program.py", line 226, in run
    sys.exit(main(sys.argv) or 0)
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\android2po-1.2.0-py2.7.egg\android2po\program.py", line 214, in main
    command_result = cmd.execute()
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\android2po-1.2.0-py2.7.egg\android2po\commands.py", line 423, in execute
    ignore_exists=show_exists):
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\android2po-1.2.0-py2.7.egg\android2po\commands.py", line 342, in generate_po
    ignore_exists=ignore_exists)
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\android2po-1.2.0-py2.7.egg\android2po\commands.py", line 182, in write_file
    content = content()
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\android2po-1.2.0-py2.7.egg\android2po\commands.py", line 323, in make_catalog
    language_data)
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\android2po-1.2.0-py2.7.egg\android2po\commands.py", line 80, in xml2po
    return convert.xml2po(*a, **kw)
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\android2po-1.2.0-py2.7.egg\android2po\convert.py", line 490, in xml2po
    set_catalog_plural_forms(catalog, translations.language)
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\android2po-1.2.0-py2.7.egg\android2po\convert.py", line 460, in set_catalog_plural_forms
    language.locale.plural_form)
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\babel-1.0.dev0-py2.7.egg\babel\core.py", line 610, in plural_form
    return self._data['plural_form']
  File "C:\Users\Ben\DEV\WinPython-64bit-2.7.9.3\python-2.7.9.amd64\lib\site-packages\babel-1.0.dev0-py2.7.egg\babel\localedata.py", line 195, in __getitem__
    orig = val = dict.__getitem__(self, key)
KeyError: 'plural_form'
@miracle2k
Copy link
Owner

I'm going to close this, because this particular stack trace refers to an error that should no longer exist in master - it should be fixed here: a7fffa6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants