The var settings.no_empty_message is used in autocomplete_deluxe.js but not defined in settings forms, so it's always 'undefined' and fired the default value.

this.no_empty_message = typeof settings.no_empty_message == 'undefined' ? 'No terms could be found. Please type in order to add a new term.' : settings.no_empty_message;
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oriol_e9g created an issue. See original summary.

oriol_e9g’s picture

Status: Active » Needs review
FileSize
5.35 KB
oriol_e9g’s picture

FileSize
3.3 KB

Oh! I'm touching code that's out of scope, minimizing changes.

oriol_e9g’s picture

Title: You can't set no_empty_message in widget settings » no_empty_message is missing in widget settings
oriol_e9g’s picture

If you apply tthe solution in #3025308: Drupal.t cannot translate strings passed through vars we need to translate the string in php side. If you prefer other solution for message translations you can apply patch in #2.

oriol_e9g’s picture

Fixing missing semicolon in previos patches. Attach two patches with t function and without t function.

oriol_e9g’s picture

edwardchiapet’s picture

Thank you, @oriol_e9g!

I have tested the patch and confirmed that it adds the empty message to the widget settings.

Will merge into 8.x-1.x-dev.

edwardchiapet’s picture

Assigned: oriol_e9g » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.