comparison mercurial/filemerge.py @ 39267:88c5a3ef54b1

filemerge: avoid putting translated text into docstring This is follow up of my mistake in e09fad982ef5. There is no merge tool, which has only one of binary or symlink capabilities, but this patch lists up all combinations of them for safety in the future. Maybe, it is too paranoid, though.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 22 Aug 2018 14:08:27 +0900
parents 82555d7186d0
children f785073f792c
comparison
equal deleted inserted replaced
39266:82555d7186d0 39267:88c5a3ef54b1
988 internals['internal:' + name] = func 988 internals['internal:' + name] = func
989 internalsdoc[fullname] = func 989 internalsdoc[fullname] = func
990 990
991 capabilities = sorted([k for k, v in func.capabilities.items() if v]) 991 capabilities = sorted([k for k, v in func.capabilities.items() if v])
992 if capabilities: 992 if capabilities:
993 capdesc = _("(actual capabilities: %s)") % ', '.join(capabilities) 993 capdesc = " (actual capabilities: %s)" % ', '.join(capabilities)
994 func.__doc__ = (func.__doc__ + 994 func.__doc__ = (func.__doc__ +
995 pycompat.sysstr("\n\n %s" % capdesc)) 995 pycompat.sysstr("\n\n%s" % capdesc))
996
997 # to put i18n comments into hg.pot for automatically generated texts
998
999 # i18n: "binary" and "symlik" are keywords
1000 # i18n: this text is added automatically
1001 _(" (actual capabilities: binary, symlink)")
1002 # i18n: "binary" is keyword
1003 # i18n: this text is added automatically
1004 _(" (actual capabilities: binary)")
1005 # i18n: "symlink" is keyword
1006 # i18n: this text is added automatically
1007 _(" (actual capabilities: symlink)")
996 1008
997 # load built-in merge tools explicitly to setup internalsdoc 1009 # load built-in merge tools explicitly to setup internalsdoc
998 loadinternalmerge(None, None, internaltool) 1010 loadinternalmerge(None, None, internaltool)
999 1011
1000 # tell hggettext to extract docstrings from these functions: 1012 # tell hggettext to extract docstrings from these functions: