From ff02f6456fb4d10a6b4c598acb7c15c8da4e8600 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 21 Nov 2008 14:31:37 +0100 Subject: [PATCH] [FIX] Better format detection when importing lang files lp bug: https://launchpad.net/bugs/300624 fixed bzr revid: christophe@tinyerp.com-20081121133137-kku630y4tao1axwm --- bin/addons/base/module/wizard/wizard_import_lang.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/addons/base/module/wizard/wizard_import_lang.py b/bin/addons/base/module/wizard/wizard_import_lang.py index 82b67ab2ae4..3a195b19747 100644 --- a/bin/addons/base/module/wizard/wizard_import_lang.py +++ b/bin/addons/base/module/wizard/wizard_import_lang.py @@ -31,12 +31,13 @@ view_form=""" - + - + """ @@ -56,7 +57,7 @@ class wizard_import_lang(wizard.interface): # now we determine the file format fileobj.seek(0) - first_line = fileobj.readline().strip() + first_line = fileobj.readline().strip().replace('"', '').replace(' ', '') fileformat = first_line.endswith("type,name,res_id,src,value") and 'csv' or 'po' fileobj.seek(0)