-
Notifications
You must be signed in to change notification settings - Fork 451
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
unorderable types in write_po #606
Comments
Same here, when feeding a catalog via cat.add(
"some translatable string",
locations=("/some/path/to/some/file", 20),
# ...
) write_po() will always fail due to the attempt of sorting strings and integers in one go. |
I'm curious: why the try-except block (giving up on any ordering) instead of a partial ordering function as the approach in my report? |
@mfrasca My reasoning was that it could also fail, but come to think of it, I could have made the |
see issue python-babel#606. if one object has anything that doesn't compare to `int`, bring it to the top, and correctly sort the rest.
see issue #606. if one object has anything that doesn't compare to `int`, bring it to the top, and correctly sort the rest.
I'm using babel-2.6.0, and I'm hitting a problem with generated data, not something I can fix on that end.
I have a standard Makefile for generating
pot
files, then I usemsgcat
to produce a single merged pot, which I then update with the line:and the result is a crash:
which I fixed very brutally by adding a
key
parameter to thesorted
function:The text was updated successfully, but these errors were encountered: