Code review comment for lp:~songofacandy/bzr/i18n-msgfmt

Revision history for this message
Martin Pool (mbp) wrote :

Sorry if I missed this in the list thread, but: can you tell me why we're adding a build_mo command, rather than using the external ones?

+ if 'en' in self.lang:
+ if find_executable('msginit') is None:
+ log.warn("GNU gettext msginit utility not found!")
+ log.warn("Skip creating English PO file.")
+ else:
+ log.info('Creating English PO file...')
+ pot = (self.prj_name or 'messages') + '.pot'
+ if self.prj_name:
+ en_po = '%s-en.po' % self.prj_name
+ else:
+ en_po = 'en.po'
+ self.spawn(['msginit',
+ '--no-translator',
+ '-l', 'en',
+ '-i', os.path.join(self.source_dir, pot),
+ '-o', os.path.join(self.source_dir, en_po),
+ ])
+

Could you explain this a bit more to me?

Thanks

review: Needs Information

« Back to merge proposal