<commit_before>Internationalization
====================

Nova uses the `oslo.i18n library
<http://docs.openstack.org/developer.oslo.i18n/index.html>`_ to support
internationalization. The oslo.i18n library is built on top of `gettext
<http://docs.python.org/library/gettext.html>`_ and provides functions that are
used to enable user-facing strings such as log messages to appear in the
appropriate language in different locales.

Nova exposes the oslo.i18n library support via the ``nova/i18n.py`` integration
module. This module provides the functions needed to wrap translatable strings.
It provides the ``_()`` wrapper for general user-facing messages and specific
wrappers for messages used only for logging. DEBUG level messages do not need
translation but CRITICAL, ERROR, WARNING and INFO messages should be wrapped
with ``_LC()``, ``_LE()``, ``_LW()`` or ``_LI()`` respectively.

For example::

    LOG.debug("block_device_mapping %(mapping)s",
              {'mapping': block_device_mapping})
<commit_msg>Typo in oslo.i18n url<commit_after>Internationalization
====================

Nova uses the `oslo.i18n library
<http://docs.openstack.org/developer/oslo.i18n/index.html>`_ to support
internationalization. The oslo.i18n library is built on top of `gettext
<http://docs.python.org/library/gettext.html>`_ and provides functions that are
used to enable user-facing strings such as log messages to appear in the
appropriate language in different locales.

Nova exposes the oslo.i18n library support via the ``nova/i18n.py`` integration
module. This module provides the functions needed to wrap translatable strings.
It provides the ``_()`` wrapper for general user-facing messages and specific
wrappers for messages used only for logging. DEBUG level messages do not need
translation but CRITICAL, ERROR, WARNING and INFO messages should be wrapped
with ``_LC()``, ``_LE()``, ``_LW()`` or ``_LI()`` respectively.

For example::

    LOG.debug("block_device_mapping %(mapping)s",
              {'mapping': block_device_mapping})

{'fraction_non_alphanumeric': 0.1142156862745098, 'fraction_numerical': 0.010784313725490196, 'mean_word_length': 5.092537313432836, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2820172', 'n_tokens_mistral': 591, 'n_tokens_neox': 557, 'n_words': 225}