mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 07:22:12 -05:00
I18n: Fix multi-context message extraction regex
The BLT_I18N_MSGID_MULTI_CTXT() macro allows extracting a single message into up to 16 different contexts. The regex to do that was slightly wrong because it did not account for the macro potentially ending with a ",". The contexts for "New" were also sorted. Pull Request: https://projects.blender.org/blender/blender/pulls/123793
This commit is contained in:
parent
ac8da6c72e
commit
92c026c39b
2 changed files with 5 additions and 4 deletions
|
@ -312,7 +312,7 @@ PYGETTEXT_KEYWORDS = (() +
|
|||
((r"/\*name_display\*/\s*" + _msg_re + r"\s*,"),) +
|
||||
|
||||
tuple((r"{}\(\s*" + _msg_re + r"\s*,\s*(?:" +
|
||||
r"\s*,\s*)?(?:".join(_ctxt_re_gen(i) for i in range(PYGETTEXT_MAX_MULTI_CTXT)) + r")?\s*\)").format(it)
|
||||
r"\s*,\s*)?(?:".join(_ctxt_re_gen(i) for i in range(PYGETTEXT_MAX_MULTI_CTXT)) + r")?\s*,?\s*\)").format(it)
|
||||
for it in ("BLT_I18N_MSGID_MULTI_CTXT",))
|
||||
)
|
||||
|
||||
|
|
|
@ -1230,13 +1230,15 @@ static uiBut *template_id_def_new_but(uiBlock *block,
|
|||
BLT_I18NCONTEXT_ID_LATTICE,
|
||||
BLT_I18NCONTEXT_ID_LIGHT,
|
||||
BLT_I18NCONTEXT_ID_LIGHTPROBE,
|
||||
BLT_I18NCONTEXT_ID_MASK,
|
||||
BLT_I18NCONTEXT_ID_MATERIAL,
|
||||
BLT_I18NCONTEXT_ID_MASK, );
|
||||
BLT_I18NCONTEXT_ID_MESH, );
|
||||
BLT_I18N_MSGID_MULTI_CTXT("New",
|
||||
BLT_I18NCONTEXT_ID_MESH,
|
||||
BLT_I18NCONTEXT_ID_METABALL,
|
||||
BLT_I18NCONTEXT_ID_NODETREE,
|
||||
BLT_I18NCONTEXT_ID_OBJECT,
|
||||
BLT_I18NCONTEXT_ID_PAINTCURVE,
|
||||
BLT_I18NCONTEXT_ID_PALETTE,
|
||||
BLT_I18NCONTEXT_ID_PARTICLESETTINGS,
|
||||
BLT_I18NCONTEXT_ID_POINTCLOUD,
|
||||
BLT_I18NCONTEXT_ID_SCENE,
|
||||
|
@ -1248,7 +1250,6 @@ static uiBut *template_id_def_new_but(uiBlock *block,
|
|||
BLT_I18NCONTEXT_ID_VOLUME,
|
||||
BLT_I18NCONTEXT_ID_WORKSPACE,
|
||||
BLT_I18NCONTEXT_ID_WORLD, );
|
||||
BLT_I18N_MSGID_MULTI_CTXT("New", BLT_I18NCONTEXT_ID_PAINTCURVE, BLT_I18NCONTEXT_ID_PALETTE, );
|
||||
/* NOTE: BLT_I18N_MSGID_MULTI_CTXT takes a maximum number of parameters,
|
||||
* check the definition to see if a new call must be added when the limit
|
||||
* is exceeded. */
|
||||
|
|
Loading…
Reference in a new issue