Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-8508: Fixed translation_domain working incorrectly for dropdowns #1286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{% set min_item_width = min_item_width|default(100) %}
{% set custom_form = custom_form is defined ? custom_form : true %}
{% set translation_domain = translation_domain|default(false) %}
{% set choice_translation_domain = choice_translation_domain|default(false) %}
{% set value = value is defined ? value : null %}
{% set multiple = multiple|default(false) %}
{% set no_items = choices_flat|length == 0 %}
Expand Down Expand Up @@ -85,7 +86,7 @@

{% include selected_item_template_path with {
value: first_choice.value,
label: _self.get_translated_label(first_choice.label, translation_domain),
label: _self.get_translated_label(first_choice.label, choice_translation_domain),
icon: first_choice.icon is defined ? first_choice.icon,
} %}
{% endif %}
Expand All @@ -95,7 +96,7 @@
{% if custom_form ? choice.value == value : choice is selectedchoice(value) %}
{% set label = selected_item_label is defined
? selected_item_label
: _self.get_translated_label(choice.label, translation_domain)
: _self.get_translated_label(choice.label, choice_translation_domain)
%}

{% include selected_item_template_path with {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
multiple: form.vars.multiple,
custom_init: attr.dropdown_custom_init|default(false),
class: attr.dropdown_class|default(''),
translation_domain: choice_translation_domain|default(false),
choice_translation_domain: choice_translation_domain|default(false),
konradoboza marked this conversation as resolved.
Show resolved Hide resolved
translation_domain: translation_domain|default(false),
custom_form: false,
is_disabled: attr.disabled|default(false) or disabled|default(false) or dropdown_disabled|default(false),
is_hidden: attr.dropdown_hidden|default(false),
Expand Down
Loading