Skip to content

Commit

Permalink
Don't create translations for choice without condition and for label …
Browse files Browse the repository at this point in the history
…without display name
  • Loading branch information
jrb0001 committed Dec 31, 2024
1 parent 9f71491 commit 0175fae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion addons/dialogic/Modules/Choice/event_choice.gd
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ func is_valid_event(string:String) -> bool:
################################################################################

func _get_translatable_properties() -> Array:
return ['text', 'disabled_text']
if allow_alt_text():
return ['text', 'disabled_text']
else:
return ['text']


func _get_property_original_translation(property:String) -> String:
Expand Down
5 changes: 4 additions & 1 deletion addons/dialogic/Modules/Jump/event_label.gd
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ func get_shortcode_parameters() -> Dictionary:


func _get_translatable_properties() -> Array:
return ["display_name"]
if display_name.is_empty():
return []
else:
return ["display_name"]


func _get_property_original_translation(property_name:String) -> String:
Expand Down

0 comments on commit 0175fae

Please sign in to comment.