Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
| Show First 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | def walk_properties(cls): | ||||
| msgctxt = prop.translation_context or default_context | msgctxt = prop.translation_context or default_context | ||||
| if prop.name and (prop.name != prop.identifier or msgctxt != default_context): | if prop.name and (prop.name != prop.identifier or msgctxt != default_context): | ||||
| process_msg(msgs, msgctxt, prop.name, msgsrc, reports, check_ctxt_rna, settings) | process_msg(msgs, msgctxt, prop.name, msgsrc, reports, check_ctxt_rna, settings) | ||||
| if prop.description: | if prop.description: | ||||
| process_msg(msgs, default_context, prop.description, msgsrc, reports, check_ctxt_rna_tip, settings) | process_msg(msgs, default_context, prop.description, msgsrc, reports, check_ctxt_rna_tip, settings) | ||||
| if isinstance(prop, bpy.types.EnumProperty): | if isinstance(prop, bpy.types.EnumProperty): | ||||
| done_items = set() | |||||
| for item in prop.enum_items: | for item in prop.enum_items: | ||||
| msgsrc = "bpy.types.{}.{}:'{}'".format(bl_rna.identifier, prop.identifier, item.identifier) | msgsrc = "bpy.types.{}.{}:'{}'".format(bl_rna.identifier, prop.identifier, item.identifier) | ||||
| done_items.add(item.identifier) | |||||
| if item.name and item.name != item.identifier: | |||||
| process_msg(msgs, msgctxt, item.name, msgsrc, reports, check_ctxt_rna, settings) | |||||
| if item.description: | |||||
| process_msg(msgs, default_context, item.description, msgsrc, reports, check_ctxt_rna_tip, | |||||
| settings) | |||||
| for item in prop.enum_items_static: | |||||
| if item.identifier in done_items: | |||||
| continue | |||||
| msgsrc = "bpy.types.{}.{}:'{}'".format(bl_rna.identifier, prop.identifier, item.identifier) | |||||
| done_items.add(item.identifier) | |||||
| if item.name and item.name != item.identifier: | if item.name and item.name != item.identifier: | ||||
| process_msg(msgs, msgctxt, item.name, msgsrc, reports, check_ctxt_rna, settings) | process_msg(msgs, msgctxt, item.name, msgsrc, reports, check_ctxt_rna, settings) | ||||
| if item.description: | if item.description: | ||||
| process_msg(msgs, default_context, item.description, msgsrc, reports, check_ctxt_rna_tip, | process_msg(msgs, default_context, item.description, msgsrc, reports, check_ctxt_rna_tip, | ||||
| settings) | settings) | ||||
| blacklist_rna_class = class_blacklist() | blacklist_rna_class = class_blacklist() | ||||
| ▲ Show 20 Lines • Show All 623 Lines • Show Last 20 Lines | |||||