From 3b1e1aa4ed3b3b4696e29bc7b30503ce8794bb0c Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 25 May 2008 21:02:22 +0000 Subject: Some fixes. Do not use get_files_list to generate the .pot, just enumerate python files. --- (limited to 'src/sugar/activity/bundlebuilder.py') diff --git a/src/sugar/activity/bundlebuilder.py b/src/sugar/activity/bundlebuilder.py index 1a44995..240921d 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 -- cgit v0.9.1