Cleanup: rst style
This commit is contained in:
@@ -3,6 +3,7 @@ Intro
|
||||
-----
|
||||
|
||||
.. warning::
|
||||
|
||||
Most of this object should only be useful if you actually manipulate i18n stuff from Python.
|
||||
If you are a regular addon, you should only bother about :const:`contexts` member,
|
||||
and the :func:`register`/:func:`unregister` functions! The :func:`pgettext` family of functions
|
||||
@@ -12,12 +13,12 @@ Intro
|
||||
| ``{locale: {msg_key: msg_translation, ...}, ...}``
|
||||
| where:
|
||||
|
||||
* locale is either a lang iso code (e.g. ``fr``), a lang+country code (e.g. ``pt_BR``),
|
||||
- locale is either a lang iso code (e.g. ``fr``), a lang+country code (e.g. ``pt_BR``),
|
||||
a lang+variant code (e.g. ``sr@latin``), or a full code (e.g. ``uz_UZ@cyrilic``).
|
||||
* msg_key is a tuple (context, org message) - use, as much as possible, the predefined :const:`contexts`.
|
||||
* msg_translation is the translated message in given language!
|
||||
- msg_key is a tuple (context, org message) - use, as much as possible, the predefined :const:`contexts`.
|
||||
- msg_translation is the translated message in given language!
|
||||
|
||||
Then, call ``bpy.app.translations.register(__name__, your_dict)`` in your ``register()`` function, and \n"
|
||||
Then, call ``bpy.app.translations.register(__name__, your_dict)`` in your ``register()`` function, and
|
||||
``bpy.app.translations.unregister(__name__)`` in your ``unregister()`` one.
|
||||
|
||||
The ``Manage UI translations`` addon has several functions to help you collect strings to translate, and
|
||||
|
@@ -12,6 +12,7 @@ For example to override ``bpy.context.active_object``,
|
||||
you would pass ``{'active_object': object}``.
|
||||
|
||||
.. note::
|
||||
|
||||
You will nearly always want to use a copy of the actual current context as basis
|
||||
(otherwise, you'll have to find and gather all needed data yourself).
|
||||
"""
|
||||
|
@@ -9,9 +9,11 @@ Notice the 'CATEGORY_MT_name' in :class:`Menu.bl_idname`, this is a naming
|
||||
convention for menus.
|
||||
|
||||
.. note::
|
||||
|
||||
Menu subclasses must be registered before referencing them from blender.
|
||||
|
||||
.. note::
|
||||
|
||||
Menus have their :class:`Layout.operator_context` initialized as
|
||||
'EXEC_REGION_WIN' rather than 'INVOKE_DEFAULT' (see :ref:`Execution Context <operator-execution_context>`).
|
||||
If the operator context needs to initialize inputs from the
|
||||
|
Reference in New Issue
Block a user