From 3b1e1aa4ed3b3b4696e29bc7b30503ce8794bb0c Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 25 May 2008 23:02:22 +0200 Subject: [PATCH] Some fixes. Do not use get_files_list to generate the .pot, just enumerate python files. --- src/sugar/activity/bundlebuilder.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sugar/activity/bundlebuilder.py b/src/sugar/activity/bundlebuilder.py index 1a449957..240921d5 100644 --- a/src/sugar/activity/bundlebuilder.py +++ b/src/sugar/activity/bundlebuilder.py @@ -142,11 +142,10 @@ class Packager(object): def get_files(self): files = _get_file_list(self.config.manifest) files.extend(_get_l10n_list(self.config)) + return files class XOPackager(Packager): def package(self): - file_list = _get_file_list(self.config.manifest) - zipname = self.config.xo_name bundle_zip = zipfile.ZipFile(zipname, 'w', zipfile.ZIP_DEFLATED) base_dir = self.config.bundle_root_dir @@ -237,10 +236,10 @@ def cmd_genpot(config, options, args): os.mkdir(po_path) python_files = [] - file_list = _get_file_list(config.manifest) - for file_name in file_list: - if file_name.endswith('.py'): - python_files.append(file_name) + for root, dirs, files in os.walk(config.source_dir): + for file_name in files: + if file_name.endswith('.py'): + python_files.append(file_name) # First write out a stub .pot file containing just the translated # activity name, then have xgettext merge the rest of the