From 8ee2a89731a257e5980f8265bd6b29e8d455aa00 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 10 Oct 2014 15:12:47 +0200 Subject: [PATCH] [FIX] translations: don't skip first line of translations when extracting module names MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Used to be the first line was the CSV headers, the slice was left over after these were removed from the source data. It probably didn't hurt (only issue would be if the first module — alphabetically — has a single translatable term), but it's just as clean not to have that. Also removed now-unused variable (probably leftover of the CSV thing as well) --- openerp/tools/translate.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/openerp/tools/translate.py b/openerp/tools/translate.py index 0528ba2..4eb6b39 100644 --- a/openerp/tools/translate.py +++ b/openerp/tools/translate.py @@ -505,13 +505,8 @@ def trans_export(lang, modules, buffer, format, cr): raise Exception(_('Unrecognized extension: must be one of ' '.csv, .po, or .tgz (received .%s).' % format)) - trans_lang = lang - if not trans_lang and format == 'csv': - # CSV files are meant for translators and they need a starting point, - # so we at least put the original term in the translation column - trans_lang = 'en_US' translations = trans_generate(lang, modules, cr) - modules = set([t[0] for t in translations[1:]]) + modules = set(t[0] for t in translations) _process(format, modules, translations, buffer, lang) del translations -- 1.7.10.4