Page MenuHome

Operator bl_translation_context attribute does nothing
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 860M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.48

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-08-03 05:14, hash: rB144f780c71ed

Short description of error
Operator bl_translation_context attribute does not change translation context.
Here is comparison between bl_translation_context and text_ctxt on the same operator.

Exact steps for others to reproduce the error

  1. Open attached blend file.
  2. Go to Preferences > Interface > Translation panel, and change Language property to either Spanish, French or Russian.
  3. Run script.

In popup panel you will see that the same operator have different translations, that is because unlike text_ctxt, bl_translation_context does not change translation context.

Event Timeline

I can't test the operator on a Debug build because of this assertion:

assert(!"setting the bl_translation_context on a non-builtin operator");

It even looks like bl_translation_context was not meant to work.
It may be a bug, but I'm not familiar with this area.