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

Revision history for this message
methane (songofacandy) wrote :

On Wed, May 18, 2011 at 12:01 AM, Martin Pool <email address hidden> wrote:
> Review: Needs Information
> 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?

setup.py command or Makefile command is needed with other tool, too.
So the problem is "msgfmt.py or external msgfmt command."

The advantage of msgfmt.py is that users don't need msgfmt command.
Users building bzr from source must have Python, of course.
But msgfmt tool is extra dependency for not only windows users, but also
Ubuntu users. Ubuntu doesn't installs msgfmt default and not all users
have root. Installing msgfmt is pain for non root users. Please imagine
"pip install --user bzr".

On the other hand, I don't imagine advantage of external msgfmt tool.

>
> +        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?

I've copied it from bzr-explorer and have didn't mind...
SImply, adding empty english po file is enough solution to remove
msginit dependency.

>
> Thanks
> --
> https://code.launchpad.net/~songofacandy/bzr/i18n-msgfmt/+merge/61082
> You are the owner of lp:~songofacandy/bzr/i18n-msgfmt.
>

--
INADA Naoki  <email address hidden>

« Back to merge proposal