Ticket #24478: is_formatting.patch

File is_formatting.patch, 1.1 KB (added by Sævar Öfjörð Magnússon, 10 years ago)
  • django/conf/locale/is/formats.py

    From b318c4b2972129521f639ca937dc09e934362b61 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?S=C3=A6var=20=C3=96fj=C3=B6r=C3=B0=20Magn=C3=BAsson?=
     <saevar@saevar.is>
    Date: Fri, 13 Mar 2015 14:58:20 +0000
    Subject: [PATCH] Add default value for NUMBER_GROUPING in Icelandic
    
    The USE_THOUSAND_SEPARATOR setting is not working when format localizing Icelandic numbers.
    A properly formatted number in Icelandic should be: 1.000.000,0 - however - when using the `localize` template tag to format numbers, no thousand separators appear. This is due to the fact that in django/utils/numberformat.py no grouping occurs unless there is a non-zero value for the NUMBER_GROUPING variable in the active locale.
    ---
     django/conf/locale/is/formats.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/django/conf/locale/is/formats.py b/django/conf/locale/is/formats.py
    index 1f122ad..1b328ef 100644
    a b  
    2121# DATETIME_INPUT_FORMATS =
    2222DECIMAL_SEPARATOR = ','
    2323THOUSAND_SEPARATOR = '.'
    24 # NUMBER_GROUPING =
     24NUMBER_GROUPING = 3
Back to Top