Permalink
Browse files

Update README.txt, fix locale, v0.3

  • Loading branch information...
1 parent 4ee8654 commit 28e408d1f63076c28765b5837015d5fbad1f746a @nopri committed Oct 13, 2012
Showing with 19 additions and 7 deletions.
  1. +5 −2 README.txt
  2. +1 −1 app.py
  3. +13 −4 nop_number.py
View
@@ -3,17 +3,20 @@ onlinestore-multi, Simple Online Store application
2010
GPL
+Screenshots: https://github.com/nopri/onlinestore-multi/wiki
+
Features:
- Run as WSGI Application
- Multi Language (currently English and Bahasa Indonesia)
-- Template Support
+- Template/Theme Support
- File Manager
- Product Category/Group/Item
- Custom Link
- News Module
- FAQ Module
-- User-Defined Content (Custom URL)
+- User-Defined Content
+- Shopping Cart
- Simple Invoice Management
- Simple Statistics
- Custom Membership Level
View
2 app.py
@@ -70,7 +70,7 @@ def cget(section, option, default='', strip=True):
############################### CONSTANT ###############################
-VERSION = '0.2'
+VERSION = '0.3'
NAME = 'Online Store'
PRECISION = 2
FORCE_PROMOTE = False
View
@@ -3,9 +3,18 @@
def number_format(number, localeset='', places=0):
localeset = str(localeset)
saved = locale.getlocale(locale.LC_NUMERIC)
- locale.setlocale(locale.LC_NUMERIC, localeset)
- ret = locale.format('%.*f', (places, number), True)
- locale.setlocale(locale.LC_NUMERIC, saved)
- return ret
+ try:
+ locale.setlocale(locale.LC_NUMERIC, localeset)
+ except:
+ try:
+ localeset = localeset + '.utf8' #quick+dirty, will be fixed later
+ locale.setlocale(locale.LC_NUMBERIC, localeset)
+ except:
+ pass
+ if locale:
+ ret = locale.format('%.*f', (places, number), True)
+ locale.setlocale(locale.LC_NUMERIC, saved)
+ return ret
+ return number

0 comments on commit 28e408d

Please sign in to comment.