#12980 closed (fixed)
locale formats should use raw strings
| Reported by: | Martin v. Löwis | Owned by: | nobody |
|---|---|---|---|
| Component: | Translations | Version: | 1.2-beta |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
In a number of locale formats.py files, single backslashes are used to escape letters from datetime formatting. However, in some cases, these escapes now form Python escape characters (e.g. in es/locale.py, which contains backslash-a, denoting the BEL control character).
This patch uses raw strings in all cases where single backslashes are used, even if they wouldn't be strictly necessary. The only exception are files that already use double backslashes.
Attachments (2)
Change History (6)
by , 16 years ago
| Attachment: | locale.diff added |
|---|
comment:1 by , 16 years ago
| Component: | Uncategorized → Translations |
|---|---|
| Has patch: | set |
| milestone: | → 1.2 |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
by , 16 years ago
| Attachment: | 12980-r13045.diff added |
|---|
comment:3 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Yes, this is something I had noted and tried to fix for
es_ARin r12108 (wasn't sure about going either the raw string or the backslash escaping route), although I forgot a'\'before a's'inDATETIME_FORMAT. We will try to fix this with Fabián Ramirez during the March 6 sprint.