[PATCH 2 of 2 STABLE] i18n: look translation of both "DEPRECATED" and "(DEPRECATED)" up

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Tue Nov 3 05:27:43 CST 2015


At Sun, 1 Nov 2015 22:53:16 +0900,
Yuya Nishihara wrote:
> 
> On Sun, 01 Nov 2015 08:57:33 +0900, FUJIWARA Katsunori wrote:
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> > # Date 1446334736 -32400
> > #      Sun Nov 01 08:38:56 2015 +0900
> > # Branch stable
> > # Node ID 04bd19bf32794ae29fded5865e826fb681d6c148
> > # Parent  6d0e49b14bc092b89b81a15cf31e0ad1f63eb639
> > i18n: look translation of both "DEPRECATED" and "(DEPRECATED)" up
> > 
> > Since 44cc9f63a2f1, deprecated commands, options and so on are
> > detected by "(DEPRECATED)" instead of "DEPRECATED".
> > 
> > "hg.pot" generated from recent source files doesn't contain msgid
> > "DEPRECATED", and looking the translation of "DEPRECATED" up in
> > up-to-date *.po files works incorrectly.
> > 
> > But on the other hand, there are still old *.po files, which contain
> > msgid "DEPRECATED" but not "(DEPRECATED)". Looking the translation of
> > "(DEPRECATED)" up in such old *.po files also works incorrectly.
> > 
> > This patch resolves this problem by looking translation of both
> > "DEPRECATED" and "(DEPRECATED)" up.
> 
> Here's a magic that old *.po files can have "(DEPRECATED)" out of the box.
> 
> https://selenic.com/repo/hg/file/tip/hgext/rebase.py#l103
> 
> So, if it doesn't have "(DEPRECATED)", that message catalogue would be really
> deprecated.
> 

Yes, message catalogue not containing 'msgid "(DEPRECATED)"' should be
out-of-date one.

But if we look up only 'msgid "(DEPRECATED)"' in *.po file, all
"(DEPRECATED)" related translations is treated as "inconsistently
translated (DEPRECATED)", even if it contain reasonable translation of
"DEPRECATED".

For example, *.po files categorized into (1-2) below cause such
meaningless warning.

                       msgID              msgSTR related to
             "DEPRECATED" "(DEPRECATED)"  (DEPRECATED)

  (0)
    fr.po        x           x               x

  (1-1)
    el.po        o           x               x
    zh_TW.po     o           x               x

  (1-2)
    da.po        o           x               o
    it.po        o           x               o
    ro.po        o           x               o
    zh_CN.po     o           x               o

  (2)
    de.po        o           o               o
    ru.po        o           o               o
    sv.po        o           o               o

  (3)
    ja.po        x           o               o
    pt_BR.po     x           o               o

  - (0), (1-1), (1-2) base on hg.pot older than 50f434510da6 (or
    2.3-rc) introducing "(DEPRECATED)"
  - (2) bases on hg.pot newer than 50f434510da6, but older than 3.6-rc
  - (3) bases on up-to-date hg.pot

(table above bases on *.po files at "3.6")

Looking up both "DEPRECATED" and "(DEPRECATED)" can avoid such
meaningless warning.


Or, should we execute "msgmerge" for all *.po files with up-to-date
hg.pot to obsolete (= "#~"-nize) out-of-date *.po file entries, as a
part of release procedure like tagging ?

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


More information about the Mercurial-devel mailing list