From 4b3532f3eb4bbcef0703c7a70f3d66f2a6bbedc1 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 29 Mar 2009 03:52:49 +0900 Subject: [PATCH] on python2.4, fall back to non-localized strings --- anki/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/anki/utils.py b/anki/utils.py index 635785ff2..d3355dfe8 100644 --- a/anki/utils.py +++ b/anki/utils.py @@ -19,7 +19,12 @@ except ImportError: from anki.db import * from anki.lang import _, ngettext -import locale +import locale, sys + +if sys.version_info[1] < 5: + def format_string(a, b): + return a % b + locale.format_string = format_string # Time handling ##############################################################################