-
Notifications
You must be signed in to change notification settings - Fork 447
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
Empty string should be translated to whatever translated and not the PO nonsense info #157
Comments
I don't want to change the behavior and break the compatibilities with gettext. Also, I use the behavior in http://trac-hacks.org/browser/tractimedeltaupdatorplugin/0.12/tractimedeltaupdator/web_ui.py?rev=12076&marks=142#L136. |
😢 |
That code is a part of my Trac plugin, which updates automatically relative time displays by javascript in Trac. To implement auto-updating feature, the plugin retrieves |
maybe we should add some flag which change the behavior? You must admit that this behavior is very quirky and unexpected when using babel! |
@erickwilder @etanol could I have your attention for this bug please? I do think this deserves a change, the behaviour of gettext in this case is totally bogus. However it breaks a defined API if we do it. Adding some flag which needs to be enabled explicitly might be a solution. I could see us changing the default on that for Babel 3 as this is indeed an API breaking change and thus needs a new major version. @jun66j5 I see that there is a usecase for grabbing that kind of data but translating an empty message to some data isn't really a well thought out solution, a new function for that might do this as well and is way better readable and more obvious. |
I found another way to retrieve metadata of MO file using
I'm going to change my Trac plugin with the |
I'd appreciate a simple made up example for this particular scenario. |
@sils1297 Thanks for the attention and the detailed response. No need to translate empty string to something else. Translating to just old simple empty string will be quite enough! |
I just encountered this weird bug and would love to see it fixed. |
Any decisions on that matter? I have the feeling that even if I'll create a pull request fixing that, it will be rejected... |
This project is basically dead and you will likely just not get any reviews, anyone volunteering to maintain it would be appreciated, we'll then figure out how to do a takeover. |
I know that the GNU gettext is overriding whatever we think and just replace empty string with nonsense information. Its time to stop the crime! Its time that we can control the empty string!
Most likely, it will be just super convenient to translate empty strings to empty strings!
I just make gzilion of problems that empty string is translated to this weird PO information. Is anybody see any reason to keep working that way even in the modern world of python??
Reference:
http://www.gnu.org/software/gettext/manual/gettext.html#MO-Files
The text was updated successfully, but these errors were encountered: