From a0c26499bab82ff69afe60ec68d6001e223e382d Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Fri, 19 Aug 2011 15:37:20 +0000 Subject: [PATCH] add TranslationFileWriter --- daklib/filewriter.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/daklib/filewriter.py b/daklib/filewriter.py index b44fc2a5..d26636dc 100755 --- a/daklib/filewriter.py +++ b/daklib/filewriter.py @@ -151,3 +151,19 @@ class SourcesFileWriter(BaseFileWriter): flags.update(keywords) template = "dists/%(suite)s/%(component)s/source/Sources" BaseFileWriter.__init__(self, template, **flags) + +class TranslationFileWriter(BaseFileWriter): + def __init__(self, **keywords): + ''' + The value of the keywords suite, component and language are strings. + Output files are bzip2 compressed only. + ''' + flags = { + 'uncompressed': False, + 'gzip': False, + 'bzip2': True, + 'language': 'en', + } + flags.update(keywords) + template = "dists/%(suite)s/%(component)s/i18n/Translation-%(language)s" + super(TranslationFileWriter, self).__init__(template, **flags) -- 2.39.5