From ff94b49ce5d9a18a0b3742b47468daa6316df422 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 21 Dec 2023 02:36:09 +0900 Subject: [PATCH] doc: Drop description about old translation method Current translation no longer use babel[1] or these setup.cfg entries[2]. [1] 4e907ed2f39329eaa12d1712d49ca8903db15124 [2] 22df2f6395c1426485a7cb97166601823f8a2a28 Change-Id: Ic866a41b00c37c549a83274e33ac18d0aba846bb --- doc/source/contributor/contribute.rst | 33 --------------------------- 1 file changed, 33 deletions(-) diff --git a/doc/source/contributor/contribute.rst b/doc/source/contributor/contribute.rst index d1ddb60a56c..2874a5a31dc 100644 --- a/doc/source/contributor/contribute.rst +++ b/doc/source/contributor/contribute.rst @@ -356,39 +356,6 @@ oslo.i18n registered by **gettext.install()** in ``neutron/__init__.py``. It is now deprecated as described in oslo.18n documentation. -Setting up translation support -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You need to create or edit the following files to start translation support: - -* setup.cfg -* babel.cfg - -We have a good example for an oslo project at -https://review.opendev.org/#/c/98248/. - -Add the following to ``setup.cfg``:: - - [extract_messages] - keywords = _ gettext ngettext l_ lazy_gettext - mapping_file = babel.cfg - output_file = ${MODULE_NAME}/locale/${MODULE_NAME}.pot - - [compile_catalog] - directory = ${MODULE_NAME}/locale - domain = ${MODULE_NAME} - - [update_catalog] - domain = ${MODULE_NAME} - output_dir = ${MODULE_NAME}/locale - input_file = ${MODULE_NAME}/locale/${MODULE_NAME}.pot - -Note that ``${MODULE_NAME}`` is used in all names. - -Create ``babel.cfg`` with the following contents:: - - [python: **.py] - Enable Translation ~~~~~~~~~~~~~~~~~~