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

2016-08-15 Thread FUJIWARA Katsunori
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@merging')
> >   # _c() returns "destination", if there is no translation
> >   # corresponded to "destination@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] fo...@lares.dti.ne.jp
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


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

2016-08-13 Thread Yuya Nishihara
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@merging')
>   # _c() returns "destination", if there is no translation
>   # corresponded to "destination@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
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel