diff options
author | Amrith Kumar <amrith@tesora.com> | 2014-12-10 14:05:47 -0500 |
---|---|---|
committer | amrith <amrith@tesora.com> | 2014-12-25 15:10:42 +0000 |
commit | 3e56c2177b30527475b04d0c0c099a55854942dc (patch) | |
tree | 4df76618f5a8bb8f3546061179f1773dcb938473 /trove/common/i18n.py | |
parent | dc66271d9cd5a72fc7ea3f11a3db30386f8bf7d2 (diff) | |
download | trove-3e56c2177b30527475b04d0c0c099a55854942dc.tar.gz |
Obsolete oslo-incubator modules - gettextutils (now oslo.i18n)
This change is part of a multi-part change set to handle obsolete and
graduated oslo modules. This commit handles the gettextutils module
which is now oslo.i18n. The change here is to remove it from
openstack-common.conf and point all people who used to use that at
oslo.i18n. requirements.txt has been updated to point to this
dependency.
We aren't deleting gettextutils.py from openstack/common because it is
used by other oslo-incubator modules.
This change has been rebased on https://review.openstack.org/#/c/129668/
Change-Id: I39fd288fb29a8317f896812a2f64bcd69a6b8e21
Partial-Bug: #1380789
blueprint: retire-unused-oslo-incubator-modules
Diffstat (limited to 'trove/common/i18n.py')
-rw-r--r-- | trove/common/i18n.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/trove/common/i18n.py b/trove/common/i18n.py new file mode 100644 index 00000000..186aa1d3 --- /dev/null +++ b/trove/common/i18n.py @@ -0,0 +1,41 @@ +# Copyright 2014 Tesora, Inc. +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +"""oslo.i18n integration module. + +See http://docs.openstack.org/developer/oslo.i18n/usage.html + +""" + +import oslo.i18n + + +# NOTE(dhellmann): This reference to o-s-l-o will be replaced by the +# application name when this module is synced into the separate +# repository. It is OK to have more than one translation function +# using the same domain, since there will still only be one message +# catalog. +_translators = oslo.i18n.TranslatorFactory(domain='trove') + +# The primary translation function using the well-known name "_" +_ = _translators.primary + +# Translators for log levels. +# +# The abbreviated names are meant to reflect the usual use of a short +# name like '_'. The "L" is for "log" and the other letter comes from +# the level. +_LI = _translators.log_info +_LW = _translators.log_warning +_LE = _translators.log_error +_LC = _translators.log_critical |