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

android resource files with hyphens in filename #48

Open
farindk opened this issue May 20, 2016 · 0 comments
Open

android resource files with hyphens in filename #48

farindk opened this issue May 20, 2016 · 0 comments

Comments

@farindk
Copy link

farindk commented May 20, 2016

I have a couple of Android resource files named like this: "strings-dialogs.xml".
When processing them with "a2po export", I get crashes saying:
...
File "/home/farindk/.local/ File "/home/farindk/.local/lib/python2.7/site-packages/babel/core.py", line 902, in parse_locale
raise ValueError('expected only letters, got %r' % lang)
ValueError: expected only letters, got u'dialogs-de'

I did not look deeper into this, but my guess what goes wrong is this: in order to get the language code, the script searches for the first hyphen and considers the rest of the name the language code. This fails in this case, because of the two hyphens in the name.

Probably the simple fix would be to search for the last hypen in the name instead of the first one.

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

1 participant