Merge lp:~openerp-dev/openobject-client/6.1-opw-575181-rha into lp:openobject-client/6.1

Proposed by Rifakat Husen (OpenERP)
Status: Work in progress
Proposed branch: lp:~openerp-dev/openobject-client/6.1-opw-575181-rha
Merge into: lp:openobject-client/6.1
Diff against target: 15 lines (+0/-5)
1 file modified
bin/tools/user_locale_format.py (+0/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client/6.1-opw-575181-rha
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Needs Information
Review via email: mp+107921@code.launchpad.net

Description of the change

Hello,

When we have a language configured with thousand separator as white space then GTK
client should take care of the thousand separator as ' '.

Float values are correctly displayed whith white space in web client, but gtk doesn't.

Thanks for your review.

Regards,
Rifakat Haradwala

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

The patch want fix anything because the default values for the separator, decimal point will be taken from the locale of the system if the language does not provide a one. so you want be able to have space there. something like :

>>> from locale import localeconv
>>> localeconv()
{'mon_decimal_point': '', 'int_frac_digits': 127, 'p_sep_by_space': 127, 'frac_digits': 127, 'thousands_sep': '', 'n_sign_posn': 127, 'decimal_point': '.', 'int_curr_symbol': '', 'n_cs_precedes': 127, 'p_sign_posn': 127, 'mon_thousands_sep': '', 'negative_sign': '', 'currency_symbol': '', 'n_sep_by_space': 127, 'mon_grouping': [], 'p_cs_precedes': 127, 'positive_sign': '', 'grouping': []}

If we want to allow white space as a thousand separator then we need to check that prior to assigning the default format values.

could please check this.

Thanks,
Naresh

review: Needs Information

Unmerged revisions

2064. By Rifakat Husen (OpenERP)

[FIX] tools: removed the code which was removing white space from the floeat values

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/tools/user_locale_format.py'
2--- bin/tools/user_locale_format.py 2011-11-22 09:03:26 +0000
3+++ bin/tools/user_locale_format.py 2012-05-30 07:26:18 +0000
4@@ -186,11 +186,6 @@
5 parts[0], seps = group(parts[0], monetary=monetary, grouping=lang_grouping, thousands_sep=thousands_sep)
6
7 formatted = decimal_point.join(parts)
8- while seps:
9- sp = formatted.find(' ')
10- if sp == -1: break
11- formatted = formatted[:sp] + formatted[sp+1:]
12- seps -= 1
13 elif percent[-1] in 'diu':
14 if grouping:
15 formatted = group(formatted, monetary=monetary, grouping=lang_grouping, thousands_sep=thousands_sep)[0]

Subscribers

People subscribed via source and target branches