Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#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: UI/UX:


In a number of locale 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/, 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)

locale.diff (4.6 KB) - added by Martin v. Löwis 8 years ago.
12980-r13045.diff (3.8 KB) - added by Ramiro Morales 8 years ago.
loewis' patch updated to post [13039] and [13045].

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by Martin v. Löwis

Attachment: locale.diff added

comment:1 Changed 8 years ago by Jannis Leidel

Component: UncategorizedTranslations
Has patch: set
milestone: 1.2
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Ramiro Morales

Yes, this is something I had noted and tried to fix for es_AR in r12108 (wasn't sure about going either the raw string or the backslash escaping route), although I forgot a '\' before a 's' in DATETIME_FORMAT. We will try to fix this with Fabián Ramirez during the March 6 sprint.

Changed 8 years ago by Ramiro Morales

Attachment: 12980-r13045.diff added

loewis' patch updated to post [13039] and [13045].

comment:3 Changed 8 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [13050]) Fixed #12980 - Use raw strings for locale formats which contain single backslahes. Thanks for report and patch, Martin von Löwis and Ramiro Morales.

comment:4 Changed 7 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top