Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#12980 closed (fixed)

locale formats should use raw strings

Reported by: loewis 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 loewis 7 years ago.
12980-r13045.diff (3.8 KB) - added by ramiro 6 years ago.
loewis' patch updated to post [13039] and [13045].

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by loewis

comment:1 Changed 7 years ago by jezdez

  • Component changed from Uncategorized to Translations
  • Has patch set
  • milestone set to 1.2
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by ramiro

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 6 years ago by ramiro

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

comment:3 Changed 6 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

(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 5 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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