diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-26 02:24:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-26 07:32:40 +0300 |
commit | 7354f07eadcc276c0daf83954aced41a0d6a265a (patch) | |
tree | 7ccb75a03693c403ddbff5f43b0d7cca2e4b1c30 /source/blender/python/intern | |
parent | ba8d819c9b1ccb7dae50167755167dc3e54bd657 (diff) |
Cleanup: use doxy sections & add missing sections
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_app_translations.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c index cf4550089ba..190d4eb1855 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -45,6 +45,10 @@ # include "BLI_string.h" #endif +/* ------------------------------------------------------------------- */ +/** \name Local Struct to Store Translation + * \{ */ + typedef struct { PyObject_HEAD /** The string used to separate context from actual message in PY_TRANSLATE RNA props. */ @@ -63,9 +67,14 @@ typedef struct { /* Our singleton instance pointer */ static BlenderAppTranslations *_translations = NULL; +/** \} */ + #ifdef WITH_INTERNATIONAL -/***** Helpers for ghash *****/ +/* ------------------------------------------------------------------- */ +/** \name Helpers for GHash + * \{ */ + typedef struct GHashKey { const char *msgctxt; const char *msgid; @@ -111,7 +120,11 @@ static void _ghashutil_keyfree(void *ptr) # define _ghashutil_valfree MEM_freeN -/***** Python's messages cache *****/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Python'S Messages Cache + * \{ */ /* We cache all messages available for a given locale from all py dicts into a single ghash. * Changing of locale is not so common, while looking for a message translation is, @@ -389,7 +402,12 @@ static PyObject *app_translations_py_messages_unregister(BlenderAppTranslations Py_RETURN_NONE; } -/***** C-defined contexts *****/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name C-defined Contexts + * \{ */ + /* This is always available (even when WITH_INTERNATIONAL is not defined). */ static PyTypeObject BlenderAppTranslationsContextsType; @@ -439,7 +457,11 @@ static PyObject *app_translations_contexts_make(void) return translations_contexts; } -/***** Main BlenderAppTranslations Py object definition *****/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Main #BlenderAppTranslations #PyObject Definition + * \{ */ PyDoc_STRVAR(app_translations_contexts_doc, "A named tuple containing all pre-defined translation contexts.\n" @@ -887,3 +909,5 @@ void BPY_app_translations_end(void) _clear_translations_cache(); #endif } + +/** \} */ |