on python2.4, fall back to non-localized strings

This commit is contained in:
Damien Elmes 2009-03-29 03:52:49 +09:00
parent a958734f8b
commit 4b3532f3eb

View file

@ -19,7 +19,12 @@ except ImportError:
from anki.db import * from anki.db import *
from anki.lang import _, ngettext 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 # Time handling
############################################################################## ##############################################################################