Blender  V3.3
Classes | Macros | Functions
BLT_translation.h File Reference
#include "BLI_utildefines.h"

Go to the source code of this file.

Classes

struct  BLT_i18n_contexts_descriptor
 

Macros

#define TEXT_DOMAIN_NAME   "blender"
 
#define N_(msgid)   msgid
 
#define CTX_N_(context, msgid)   msgid
 
#define IFACE_(msgid)   BLT_translate_do_iface(NULL, msgid)
 
#define TIP_(msgid)   BLT_translate_do_tooltip(NULL, msgid)
 
#define DATA_(msgid)   BLT_translate_do_new_dataname(NULL, msgid)
 
#define CTX_IFACE_(context, msgid)   BLT_translate_do_iface(context, msgid)
 
#define CTX_TIP_(context, msgid)   BLT_translate_do_tooltip(context, msgid)
 
#define CTX_DATA_(context, msgid)   BLT_translate_do_new_dataname(context, msgid)
 
#define BLT_I18N_MSGID_MULTI_CTXT(msgid, ...)
 
#define BLT_I18NCONTEXT_DEFAULT   NULL
 
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA   "*"
 
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT   "Operator"
 
#define BLT_I18NCONTEXT_UI_EVENTS   "UI_Events_KeyMaps"
 
#define BLT_I18NCONTEXT_PLURAL   "Plural"
 
#define BLT_I18NCONTEXT_ID_ACTION   "Action"
 
#define BLT_I18NCONTEXT_ID_ARMATURE   "Armature"
 
#define BLT_I18NCONTEXT_ID_BRUSH   "Brush"
 
#define BLT_I18NCONTEXT_ID_CAMERA   "Camera"
 
#define BLT_I18NCONTEXT_ID_CACHEFILE   "CacheFile"
 
#define BLT_I18NCONTEXT_ID_COLLECTION   "Collection"
 
#define BLT_I18NCONTEXT_ID_CURVE_LEGACY   "Curve"
 
#define BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE   "FreestyleLineStyle"
 
#define BLT_I18NCONTEXT_ID_GPENCIL   "GPencil"
 
#define BLT_I18NCONTEXT_ID_CURVES   "Curves"
 
#define BLT_I18NCONTEXT_ID_ID   "ID"
 
#define BLT_I18NCONTEXT_ID_IMAGE   "Image"
 
#define BLT_I18NCONTEXT_ID_SHAPEKEY   "Key"
 
#define BLT_I18NCONTEXT_ID_SIMULATION   "Simulation"
 
#define BLT_I18NCONTEXT_ID_LIGHT   "Light"
 
#define BLT_I18NCONTEXT_ID_LIBRARY   "Library"
 
#define BLT_I18NCONTEXT_ID_LATTICE   "Lattice"
 
#define BLT_I18NCONTEXT_ID_MATERIAL   "Material"
 
#define BLT_I18NCONTEXT_ID_METABALL   "Metaball"
 
#define BLT_I18NCONTEXT_ID_MESH   "Mesh"
 
#define BLT_I18NCONTEXT_ID_NODETREE   "NodeTree"
 
#define BLT_I18NCONTEXT_ID_OBJECT   "Object"
 
#define BLT_I18NCONTEXT_ID_PAINTCURVE   "PaintCurve"
 
#define BLT_I18NCONTEXT_ID_PALETTE   "Palette"
 
#define BLT_I18NCONTEXT_ID_PARTICLESETTINGS   "ParticleSettings"
 
#define BLT_I18NCONTEXT_ID_POINTCLOUD   "PointCloud"
 
#define BLT_I18NCONTEXT_ID_LIGHTPROBE   "LightProbe"
 
#define BLT_I18NCONTEXT_ID_SCENE   "Scene"
 
#define BLT_I18NCONTEXT_ID_SCREEN   "Screen"
 
#define BLT_I18NCONTEXT_ID_SEQUENCE   "Sequence"
 
#define BLT_I18NCONTEXT_ID_SPEAKER   "Speaker"
 
#define BLT_I18NCONTEXT_ID_SOUND   "Sound"
 
#define BLT_I18NCONTEXT_ID_TEXTURE   "Texture"
 
#define BLT_I18NCONTEXT_ID_TEXT   "Text"
 
#define BLT_I18NCONTEXT_ID_VFONT   "VFont"
 
#define BLT_I18NCONTEXT_ID_VOLUME   "Volume"
 
#define BLT_I18NCONTEXT_ID_WORLD   "World"
 
#define BLT_I18NCONTEXT_ID_WORKSPACE   "WorkSpace"
 
#define BLT_I18NCONTEXT_ID_WINDOWMANAGER   "WindowManager"
 
#define BLT_I18NCONTEXT_ID_MOVIECLIP   "MovieClip"
 
#define BLT_I18NCONTEXT_ID_MASK   "Mask"
 
#define BLT_I18NCONTEXT_EDITOR_VIEW3D   "View3D"
 
#define BLT_I18NCONTEXTS_ITEM(ctxt_id, py_id)
 
#define BLT_I18NCONTEXTS_DESC
 

Functions

bool BLT_is_default_context (const char *msgctxt)
 
const char * BLT_pgettext (const char *msgctxt, const char *msgid)
 
bool BLT_translate (void)
 
bool BLT_translate_iface (void)
 
bool BLT_translate_tooltips (void)
 
bool BLT_translate_new_dataname (void)
 
const char * BLT_translate_do (const char *msgctxt, const char *msgid)
 
const char * BLT_translate_do_iface (const char *msgctxt, const char *msgid)
 
const char * BLT_translate_do_tooltip (const char *msgctxt, const char *msgid)
 
const char * BLT_translate_do_new_dataname (const char *msgctxt, const char *msgid)
 

Macro Definition Documentation

◆ BLT_I18N_MSGID_MULTI_CTXT

#define BLT_I18N_MSGID_MULTI_CTXT (   msgid,
  ... 
)

Definition at line 49 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_DEFAULT

#define BLT_I18NCONTEXT_DEFAULT   NULL

Definition at line 66 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_DEFAULT_BPYRNA

#define BLT_I18NCONTEXT_DEFAULT_BPYRNA   "*"

Definition at line 67 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_EDITOR_VIEW3D

#define BLT_I18NCONTEXT_EDITOR_VIEW3D   "View3D"

Definition at line 126 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_ACTION

#define BLT_I18NCONTEXT_ID_ACTION   "Action"

Definition at line 82 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_ARMATURE

#define BLT_I18NCONTEXT_ID_ARMATURE   "Armature"

Definition at line 83 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_BRUSH

#define BLT_I18NCONTEXT_ID_BRUSH   "Brush"

Definition at line 84 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_CACHEFILE

#define BLT_I18NCONTEXT_ID_CACHEFILE   "CacheFile"

Definition at line 86 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_CAMERA

#define BLT_I18NCONTEXT_ID_CAMERA   "Camera"

Definition at line 85 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_COLLECTION

#define BLT_I18NCONTEXT_ID_COLLECTION   "Collection"

Definition at line 87 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_CURVE_LEGACY

#define BLT_I18NCONTEXT_ID_CURVE_LEGACY   "Curve"

Definition at line 88 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_CURVES

#define BLT_I18NCONTEXT_ID_CURVES   "Curves"

Definition at line 91 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE

#define BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE   "FreestyleLineStyle"

Definition at line 89 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_GPENCIL

#define BLT_I18NCONTEXT_ID_GPENCIL   "GPencil"

Definition at line 90 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_ID

#define BLT_I18NCONTEXT_ID_ID   "ID"

Definition at line 92 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_IMAGE

#define BLT_I18NCONTEXT_ID_IMAGE   "Image"

Definition at line 93 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_LATTICE

#define BLT_I18NCONTEXT_ID_LATTICE   "Lattice"

Definition at line 99 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_LIBRARY

#define BLT_I18NCONTEXT_ID_LIBRARY   "Library"

Definition at line 98 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_LIGHT

#define BLT_I18NCONTEXT_ID_LIGHT   "Light"

Definition at line 97 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_LIGHTPROBE

#define BLT_I18NCONTEXT_ID_LIGHTPROBE   "LightProbe"

Definition at line 109 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_MASK

#define BLT_I18NCONTEXT_ID_MASK   "Mask"

Definition at line 123 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_MATERIAL

#define BLT_I18NCONTEXT_ID_MATERIAL   "Material"

Definition at line 100 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_MESH

#define BLT_I18NCONTEXT_ID_MESH   "Mesh"

Definition at line 102 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_METABALL

#define BLT_I18NCONTEXT_ID_METABALL   "Metaball"

Definition at line 101 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_MOVIECLIP

#define BLT_I18NCONTEXT_ID_MOVIECLIP   "MovieClip"

Definition at line 122 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_NODETREE

#define BLT_I18NCONTEXT_ID_NODETREE   "NodeTree"

Definition at line 103 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_OBJECT

#define BLT_I18NCONTEXT_ID_OBJECT   "Object"

Definition at line 104 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_PAINTCURVE

#define BLT_I18NCONTEXT_ID_PAINTCURVE   "PaintCurve"

Definition at line 105 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_PALETTE

#define BLT_I18NCONTEXT_ID_PALETTE   "Palette"

Definition at line 106 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_PARTICLESETTINGS

#define BLT_I18NCONTEXT_ID_PARTICLESETTINGS   "ParticleSettings"

Definition at line 107 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_POINTCLOUD

#define BLT_I18NCONTEXT_ID_POINTCLOUD   "PointCloud"

Definition at line 108 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_SCENE

#define BLT_I18NCONTEXT_ID_SCENE   "Scene"

Definition at line 110 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_SCREEN

#define BLT_I18NCONTEXT_ID_SCREEN   "Screen"

Definition at line 111 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_SEQUENCE

#define BLT_I18NCONTEXT_ID_SEQUENCE   "Sequence"

Definition at line 112 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_SHAPEKEY

#define BLT_I18NCONTEXT_ID_SHAPEKEY   "Key"

Definition at line 95 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_SIMULATION

#define BLT_I18NCONTEXT_ID_SIMULATION   "Simulation"

Definition at line 96 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_SOUND

#define BLT_I18NCONTEXT_ID_SOUND   "Sound"

Definition at line 114 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_SPEAKER

#define BLT_I18NCONTEXT_ID_SPEAKER   "Speaker"

Definition at line 113 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_TEXT

#define BLT_I18NCONTEXT_ID_TEXT   "Text"

Definition at line 116 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_TEXTURE

#define BLT_I18NCONTEXT_ID_TEXTURE   "Texture"

Definition at line 115 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_VFONT

#define BLT_I18NCONTEXT_ID_VFONT   "VFont"

Definition at line 117 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_VOLUME

#define BLT_I18NCONTEXT_ID_VOLUME   "Volume"

Definition at line 118 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_WINDOWMANAGER

#define BLT_I18NCONTEXT_ID_WINDOWMANAGER   "WindowManager"

Definition at line 121 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_WORKSPACE

#define BLT_I18NCONTEXT_ID_WORKSPACE   "WorkSpace"

Definition at line 120 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_ID_WORLD

#define BLT_I18NCONTEXT_ID_WORLD   "World"

Definition at line 119 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_OPERATOR_DEFAULT

#define BLT_I18NCONTEXT_OPERATOR_DEFAULT   "Operator"

Definition at line 70 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_PLURAL

#define BLT_I18NCONTEXT_PLURAL   "Plural"

Definition at line 78 of file BLT_translation.h.

◆ BLT_I18NCONTEXT_UI_EVENTS

#define BLT_I18NCONTEXT_UI_EVENTS   "UI_Events_KeyMaps"

Definition at line 74 of file BLT_translation.h.

◆ BLT_I18NCONTEXTS_DESC

#define BLT_I18NCONTEXTS_DESC

Definition at line 140 of file BLT_translation.h.

◆ BLT_I18NCONTEXTS_ITEM

#define BLT_I18NCONTEXTS_ITEM (   ctxt_id,
  py_id 
)
Value:
{ \
# ctxt_id, py_id, ctxt_id \
}

Definition at line 135 of file BLT_translation.h.

◆ CTX_DATA_

#define CTX_DATA_ (   context,
  msgid 
)    BLT_translate_do_new_dataname(context, msgid)

Definition at line 42 of file BLT_translation.h.

◆ CTX_IFACE_

#define CTX_IFACE_ (   context,
  msgid 
)    BLT_translate_do_iface(context, msgid)

Definition at line 40 of file BLT_translation.h.

◆ CTX_N_

#define CTX_N_ (   context,
  msgid 
)    msgid

Definition at line 33 of file BLT_translation.h.

◆ CTX_TIP_

#define CTX_TIP_ (   context,
  msgid 
)    BLT_translate_do_tooltip(context, msgid)

Definition at line 41 of file BLT_translation.h.

◆ DATA_

#define DATA_ (   msgid)    BLT_translate_do_new_dataname(NULL, msgid)

Definition at line 39 of file BLT_translation.h.

◆ IFACE_

#define IFACE_ (   msgid)    BLT_translate_do_iface(NULL, msgid)

Definition at line 37 of file BLT_translation.h.

◆ N_

#define N_ (   msgid)    msgid

Definition at line 32 of file BLT_translation.h.

◆ TEXT_DOMAIN_NAME

#define TEXT_DOMAIN_NAME   "blender"

Definition at line 12 of file BLT_translation.h.

◆ TIP_

#define TIP_ (   msgid)    BLT_translate_do_tooltip(NULL, msgid)

Definition at line 38 of file BLT_translation.h.

Function Documentation

◆ BLT_is_default_context()

bool BLT_is_default_context ( const char *  msgctxt)

Definition at line 29 of file blt_translation.c.

References BLT_I18NCONTEXT_DEFAULT_BPYRNA.

Referenced by BLT_pgettext(), and UI_but_string_info_get().

◆ BLT_pgettext()

const char* BLT_pgettext ( const char *  msgctxt,
const char *  msgid 
)

◆ BLT_translate()

bool BLT_translate ( void  )

◆ BLT_translate_do()

const char* BLT_translate_do ( const char *  msgctxt,
const char *  msgid 
)

Definition at line 101 of file blt_translation.c.

References BLT_pgettext(), BLT_translate(), and void.

Referenced by IMB_thumb_ensure_translations().

◆ BLT_translate_do_iface()

const char* BLT_translate_do_iface ( const char *  msgctxt,
const char *  msgid 
)

Definition at line 116 of file blt_translation.c.

References BLT_pgettext(), BLT_translate_iface(), and void.

Referenced by app_translations_pgettext_iface().

◆ BLT_translate_do_new_dataname()

const char* BLT_translate_do_new_dataname ( const char *  msgctxt,
const char *  msgid 
)

Definition at line 146 of file blt_translation.c.

References BLT_pgettext(), BLT_translate_new_dataname(), and void.

Referenced by app_translations_pgettext_data().

◆ BLT_translate_do_tooltip()

const char* BLT_translate_do_tooltip ( const char *  msgctxt,
const char *  msgid 
)

Definition at line 131 of file blt_translation.c.

References BLT_pgettext(), BLT_translate_tooltips(), and void.

Referenced by app_translations_pgettext_tip().

◆ BLT_translate_iface()

bool BLT_translate_iface ( void  )

◆ BLT_translate_new_dataname()

bool BLT_translate_new_dataname ( void  )

Definition at line 92 of file blt_translation.c.

References BLT_translate(), and USER_TR_NEWDATANAME.

Referenced by BLT_translate_do_new_dataname().

◆ BLT_translate_tooltips()

bool BLT_translate_tooltips ( void  )

Definition at line 83 of file blt_translation.c.

References BLT_translate(), and USER_TR_TOOLTIPS.

Referenced by BLT_translate_do_tooltip().