sapling/hgext/dialect.py
Kostia Balytskyi e75b9fc1b1 fb-hgext: move most of hgext3rd and related tests to core
Summary:
This commit moves most of the stuff in hgext3rd and related tests to
hg-crew/hgext and hg-crew/test respectively.

The things that are not moved are the ones which require some more complex
imports.


Depends on D6675309

Test Plan: - tests are failing at this commit, fixes are in the following commits

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675329
2018-01-09 03:03:59 -08:00

29 lines
699 B
Python

# dialect.py
#
# Copyright 2016 Facebook, Inc.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
"""replace terms with more widely used equivalents
With this extension enabled, some terms will be replaced by their more
well-known equivalents. Namely, "changeset" will be replaced by "commit".
"""
testedwith = 'ships-with-fb-hgext'
from mercurial import (
extensions,
i18n,
)
def _ugettext(orig, message):
if orig:
message = orig(message)
message = message.replace('changeset', 'commit')
return message
def uisetup(ui):
extensions.wrapfunction(i18n, '_ugettext', _ugettext)