-
Notifications
You must be signed in to change notification settings - Fork 49
android resource files with hyphens in filename #48
Copy link
Copy link
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels