[PATCH 1 of 2] merge: use labels in prompts to the user

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Mon Aug 15 09:41:07 EDT 2016


At Sun, 14 Aug 2016 10:08:20 +0900,
Yuya Nishihara wrote:
> 
> On Sat, 13 Aug 2016 21:54:11 +0900, FUJIWARA Katsunori wrote:
> > Making labels more descriptive would resolve this problem (e.g.
> > "destination revision" instead of "destination"). But it makes
> > prompting message in English very redundant, doesn't it ?
> > 
> > Or introducing "gettext with context" ? :-)
> > 
> >   # i18n: "destination" at merging. omit after "@" at translation
> >   l10ntext = _c('destination at merging')
> >   # _c() returns "destination", if there is no translation
> >   # corresponded to "destination at merging" msgid
> 
> You can specify msgctxt by 2nd argument of _() for example, and pass
> "--keyword=_:1,2c" or "--keyword=_:1,2c,2t" to xgettext to collect them.
> 
> https://developer.mozilla.org/en-US/docs/gettext#Using_context_with_msgctxt
> https://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/xgettext-Invocation.html
> 
> msgctxt is concatenated with '\004'.
> 
> https://github.com/django/django/blob/master/django/utils/translation/trans_real.py#L346
> 

Oh, thank you for information !

I'll work for "gettext with context".

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp


More information about the Mercurial-devel mailing list