I18n: Define NO_TRANSLATION ("Do not translate") context

This new translation context is for some special cases when
translation cannot be avoided, for example in an interface where some
props are built-in (translatable) and others are
user-defined (non-translatable), but we don't know which ones in
advance.

It allows specifying explicitly that translation should not occur
for user data when building the UI.

It is a followup to !145963, in which the context was introduced as a
string literal instead of a defined context.
This commit is contained in:
Damien Picard
2025-09-23 19:54:03 +02:00
committed by Bastien Montagne
parent 13d4829b7b
commit 417792f7fe
2 changed files with 9 additions and 1 deletions

View File

@@ -301,7 +301,7 @@ class TIME_PT_keyframing_settings(TimelinePanelButtons, Panel):
self.bl_label = scene.keying_sets_all.active.bl_label
if scene.keying_sets_all.active.bl_label in scene.keying_sets:
# Do not translate, this keying set is user-defined.
self.bl_translation_context = "Do not translate"
self.bl_translation_context = i18n_contexts.no_translation
else:
# Use the keying set's translation context (default).
self.bl_translation_context = scene.keying_sets_all.active.bl_rna.translation_context