Problem was caused by trying to set locale to short named "es" locale
which failed. It's not really obvious which full locale name should
be used here (there are plenty of dialects), so rather than keeping
locale stuff on state when both of locale and utf-8 locale names
failed, restore default settings (restore environment variables and
use default locale for gettext).
This will resolve cases when spanish language is native on the system,
but it will fail in cases when somebody will want to have spanish
interface in non-spanish system. This might be worked around by setting
LANG and LANGUAGE environment variables to es_<dialect>.UTF-8 and it
should work fine,
This commit implements a way to define context of property which is used by
localization stuff and which is needed to resolve translation context when
some word wit the same english spelling is used in different meanings
(like Manual in meaning of tutorial, and Manual in meaning of something is
setting up by hand).
To define property's context there's a function RNA_def_property_translation_context.
If property doesn't have context, regular BLF_gettext function is used to get
translation of property name, otherwise BLF_pgettext is used for this.
Hence, for correct translation, messages in .po files should be marked
by "msgctxt" context, otherwise property with context declared wouldn't
be translated at all. Toolchain scripts from bf-translation project
would be updated soon.
If context for some values of enumerator property, property itself should
be moved to other context and all items from this enum would be moved to
this context automatically (it's impossible to move one few items to
another context).
P.S. Think context like "BRUSH" or "MODIFIER" are preferable than "NOUN" and "VERB"
because in some cases the same english noun used in different areas better be
translated differently to make translation more native.
Crash was caused by data segment corruption near "string" in view3d_modeselect_pup().
Enlarged size of this static buffer, so it's now enough to store translated modeselect string.
It's not actually fixes because in some other language this modeline might be much longer
and it'll lead to corruptions again.
note: if alpha is negative the code will still produce non-optimal results.
This is a separate issue though, the patch fix the premul assumption that
alpha can be zero and rgb still be valid.
this is a part of patch 29534, being applied separately
from patch [#29534] Change Matrix Representation and Access in Python to Conform with Standard Notation
by Andrew Hale (trumanblending)
Reformatted all lines longer than 120 characters in sculpt.c. Should
be no functional changes. Thanks to Campbell for pointing out the
issue.
I wouldn't normally do this, but just for reference, here is a
screenshot that hopefully makes clear why I think this is worth doing:
nicholasbishop.net/random/longlines00.png
* 1. Resize 4x4, code was ridiculously complex (cleanup only)
* 2. matrix * matrix checking for compatibility wasn't working right (bug in last release)
* 3. fix for result size for matrix * vector if matrix is 4x4 and vector size 3 (bug in recent patch)
* 4. fix for result size vector * matrix if matrix is 4x4 and vector size 3 (bug in recent patch)
This commit prevents adding empty groups to Add Modifier menu making
this menu small and nice for objects which don't support all modifiers
from some group (like Curves don't support Modify modifiers).
* Added serbian_latin locale (sr@latin).
* Changed serbian UI to "Serbian (Српски)" (as requested by Nikola Radovanovic, serbian translator).
* Reordered languages in menu in alphabetical order!
Also, allow applying to obdata those modifiers, even with shapekeys, but do not allow applying them *as* shapekey (as shapekeys do not have CD layers).
Fix [#29636] Vertex Weight Mix modifier "apply" button don't work.
Note: applying whit shape keys currently always uses base shape, not current one (for apply to obdata as well as apply to shapekey), but this is another topic...
Structures passing to DM callbacks as userData used to be defined in both callee
and callbacks itself which made it difficult and unsafe to add new properties
to user data.
Added typedefs for this structures and use them in callbacks and callee functions.