Opened 13 years ago
Closed 13 years ago
#18760 closed Cleanup/optimization (invalid)
Make gettext and ugettext aliases
| Reported by: | Claude Paroz | Owned by: | nobody | 
|---|---|---|---|
| Component: | Internationalization | Version: | dev | 
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Design decision needed | |
| Has patch: | yes | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description
In Python 3, there is no more gettext/ugettext, only gettext. Aymeric has already aliased ugettext to gettext in recent code when run on Python 3. I would suggest to go one step further and alias them even now on Python 2. I don't see any value to keep a gettext call that returns utf-8 encoded strings.
Attachments (1)
Change History (5)
by , 13 years ago
| Attachment: | aliased_ugettext.diff added | 
|---|
comment:1 by , 13 years ago
| Has patch: | set | 
|---|
Note that I didn't deprecate the ugettext/ungettext names yet. It might not be worth the trouble.
comment:2 by , 13 years ago
| Triage Stage: | Unreviewed → Design decision needed | 
|---|
comment:3 by , 13 years ago
If I understand correctly, this patch is backwards incompatible for people who rely on gettext returning a str on Python 2.
I don't think we can change the behavior of these functions on Python 2 without running into trouble.
comment:4 by , 13 years ago
| Resolution: | → invalid | 
|---|---|
| Status: | new → closed | 
I wouldn't be as much conservative, but you have a point. Closing.
Remove the utf-8-encoded version of gettext