Merge lp:~openerp-dev/openobject-server/6.0-opw-5801-ado into lp:openobject-server/6.0

Proposed by Amit Dodiya (OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: 3462
Merged at revision: 3575
Proposed branch: lp:~openerp-dev/openobject-server/6.0-opw-5801-ado
Merge into: lp:openobject-server/6.0
Diff against target: 29 lines (+4/-1)
1 file modified
bin/tools/translate.py (+4/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/6.0-opw-5801-ado
Reviewer Review Type Date Requested Status
Jay Vora (Serpent Consulting Services) (community) Approve
Review via email: mp+67032@code.launchpad.net

Description of the change

Hello Sir,

I have change the size of csv file while loading the data at the time of
Synchronize Translation.

Thanks,
Amit

To post a comment you must log in.
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/tools/translate.py'
--- bin/tools/translate.py 2011-01-20 12:57:58 +0000
+++ bin/tools/translate.py 2011-07-06 12:41:42 +0000
@@ -32,6 +32,7 @@
32import tarfile32import tarfile
33import tempfile33import tempfile
34import threading34import threading
35import sys
35from os.path import join36from os.path import join
3637
37from datetime import datetime38from datetime import datetime
@@ -873,6 +874,8 @@
873 # now, the serious things: we read the language file874 # now, the serious things: we read the language file
874 fileobj.seek(0)875 fileobj.seek(0)
875 if fileformat == 'csv':876 if fileformat == 'csv':
877 #Setting the limit of data while loading a CSV
878 csv.field_size_limit(sys.maxint)
876 reader = csv.reader(fileobj, quotechar='"', delimiter=',')879 reader = csv.reader(fileobj, quotechar='"', delimiter=',')
877 # read the first line of the file (it contains columns titles)880 # read the first line of the file (it contains columns titles)
878 for row in reader:881 for row in reader:
@@ -991,7 +994,7 @@
991def load_language(cr, lang):994def load_language(cr, lang):
992 """Loads a translation terms for a language.995 """Loads a translation terms for a language.
993 Used mainly to automate language loading at db initialization.996 Used mainly to automate language loading at db initialization.
994 997
995 :param lang: language ISO code with optional _underscore_ and l10n flavor (ex: 'fr', 'fr_BE', but not 'fr-BE')998 :param lang: language ISO code with optional _underscore_ and l10n flavor (ex: 'fr', 'fr_BE', but not 'fr-BE')
996 :type lang: str999 :type lang: str
997 """1000 """