[PATCH 5 of 6] check-code: detect "missing _() in ui message" more exactly

timeless timeless at gmail.com
Wed Jun 1 12:25:09 EDT 2016


Yuya Nishihara wrote:
> timeless wrote:
> > FUJIWARA Katsunori wrote:
> > > This patch also applies "()" instead of "_()" on messages below to
> > > hide false-positives:
> >
> > I'd really rather have a function for this. See the other thread where
> > you wanted to remove `_()`.
>
> I don't get it. Why do we need a function for py3k? Can you elaborate?

While we like to think about localized strings as Unicode and unlocalized
strings as bytes, at the end of the day our output stream (stdout/stderr)
can only be one or the other. It's going to be Unicode, having some bytes
sent to the thing that tries to generate output in Unicode means that in
one code path we're stuck doing a conversion. We can do it there (in warn),
I suppose, but I don't think we are today, and in some ways it's easier to
just have all callers provide the same encoding.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160601/b19338f7/attachment.html>


More information about the Mercurial-devel mailing list